Author: dick
Date: 2005-04-10 16:49:04 -0400 (Sun, 10 Apr 2005)
New Revision: 42767

Modified:
   branches/dick/io-layer-no-daemon/ChangeLog
   branches/dick/io-layer-no-daemon/atomic.c
   branches/dick/io-layer-no-daemon/atomic.h
   branches/dick/io-layer-no-daemon/collection.c
   branches/dick/io-layer-no-daemon/io-layer.h
   branches/dick/io-layer-no-daemon/io-private.h
   branches/dick/io-layer-no-daemon/io.c
   branches/dick/io-layer-no-daemon/sockets.c
   branches/dick/io-layer-no-daemon/sockets.h
   branches/dick/io-layer-no-daemon/threads.c
   branches/dick/io-layer-no-daemon/threads.h
   branches/dick/io-layer-no-daemon/timed-thread.c
Log:
Merge revisions 41642:42764 into this branch



Modified: branches/dick/io-layer-no-daemon/ChangeLog
===================================================================
--- branches/dick/io-layer-no-daemon/ChangeLog  2005-04-10 20:17:03 UTC (rev 
42766)
+++ branches/dick/io-layer-no-daemon/ChangeLog  2005-04-10 20:49:04 UTC (rev 
42767)
@@ -1,3 +1,25 @@
+2005-04-07 Gonzalo Paniagua Javier <[EMAIL PROTECTED]>
+
+       * io-private.h:
+       * threads.c:
+       * threads.h:
+       * io.c:
+       * sockets.c:
+       * sockets.h: removed dead code that deals with async IO.
+
+2005-03-30  Zoltan Varga  <[EMAIL PROTECTED]>
+
+       * atomic.c (InterlockedIncrement): Fix fallback implementation of
+       InterlockedIncrement and InterlockedDecrement. Fixes #74228.
+
+2005-03-29  Sebastien Pouliot  <[EMAIL PROTECTED]>
+
+       * io-layer.h: Add required header files for compiling with VS.NET.
+
+2005-03-17 Miguel de Icaza <[EMAIL PROTECTED]>
+
+       * io.c: don't fail on NFS when there are no more locks available.
+
 2005-03-09  Dick Porter  <[EMAIL PROTECTED]>
 
        * error.c (_wapi_get_win32_file_error): ENFILE and EMFILE should

Modified: branches/dick/io-layer-no-daemon/atomic.c
===================================================================
--- branches/dick/io-layer-no-daemon/atomic.c   2005-04-10 20:17:03 UTC (rev 
42766)
+++ branches/dick/io-layer-no-daemon/atomic.c   2005-04-10 20:49:04 UTC (rev 
42767)
@@ -91,8 +91,8 @@
                              (void *)&spin);
        thr_ret = pthread_mutex_lock(&spin);
        g_assert (thr_ret == 0);
-       
-       *dest++;
+
+       (*dest)++;
        ret= *dest;
        
        thr_ret = pthread_mutex_unlock(&spin);
@@ -115,7 +115,7 @@
        thr_ret = pthread_mutex_lock(&spin);
        g_assert (thr_ret == 0);
        
-       *dest--;
+       (*dest)--;
        ret= *dest;
        
        thr_ret = pthread_mutex_unlock(&spin);

Modified: branches/dick/io-layer-no-daemon/atomic.h
===================================================================
--- branches/dick/io-layer-no-daemon/atomic.h   2005-04-10 20:17:03 UTC (rev 
42766)
+++ branches/dick/io-layer-no-daemon/atomic.h   2005-04-10 20:49:04 UTC (rev 
42767)
@@ -464,7 +464,7 @@
 
 static inline gint32 InterlockedExchange(volatile gint32 *dest, gint32 exch)
 {
-       gint32 tmp;
+       gint32 tmp = 0;
 
        __asm__ __volatile__ ("\n1:\n\t"
                              "lwarx  %0, 0, %2\n\t"

Modified: branches/dick/io-layer-no-daemon/collection.c
===================================================================
--- branches/dick/io-layer-no-daemon/collection.c       2005-04-10 20:17:03 UTC 
(rev 42766)
+++ branches/dick/io-layer-no-daemon/collection.c       2005-04-10 20:49:04 UTC 
(rev 42767)
@@ -35,6 +35,13 @@
                _wapi_handle_update_refs ();
                nanosleep (&sleepytime, NULL);
        }
+
+#ifndef __GNUC__
+       /* Even though we tell gcc that this function doesn't return,
+        * other compilers won't see that.
+        */
+       return(NULL);
+#endif
 }
 
 void _wapi_collection_init (void)

Modified: branches/dick/io-layer-no-daemon/io-layer.h
===================================================================
--- branches/dick/io-layer-no-daemon/io-layer.h 2005-04-10 20:17:03 UTC (rev 
42766)
+++ branches/dick/io-layer-no-daemon/io-layer.h 2005-04-10 20:49:04 UTC (rev 
42767)
@@ -16,10 +16,12 @@
 #define UNICODE
 #define _UNICODE
 #define __USE_W32_SOCKETS
-#include <w32api.h>
+#include <winsock2.h>
 #include <windows.h>
+#include <WinBase.h>
 #include <ws2tcpip.h>
 #include <psapi.h>
+#include <shlobj.h>
 #else  /* EVERYONE ELSE */
 #include "mono/io-layer/wapi.h"
 #include "mono/io-layer/uglify.h"

Modified: branches/dick/io-layer-no-daemon/io-private.h
===================================================================
--- branches/dick/io-layer-no-daemon/io-private.h       2005-04-10 20:17:03 UTC 
(rev 42766)
+++ branches/dick/io-layer-no-daemon/io-private.h       2005-04-10 20:49:04 UTC 
(rev 42767)
@@ -36,8 +36,6 @@
        guint32 fileaccess;
        guint32 sharemode;
        guint32 attrs;
-       gboolean async;
-       WapiOverlappedCB callback;
 };
 
 struct _WapiHandle_find
@@ -48,10 +46,4 @@
        size_t count;
 };
 
-G_BEGIN_DECLS
-extern gboolean _wapi_io_add_callback (gpointer handle,
-                                      WapiOverlappedCB callback,
-                                      guint64 flags);
-G_END_DECLS
-
 #endif /* _WAPI_IO_PRIVATE_H_ */

Modified: branches/dick/io-layer-no-daemon/io.c
===================================================================
--- branches/dick/io-layer-no-daemon/io.c       2005-04-10 20:17:03 UTC (rev 
42766)
+++ branches/dick/io-layer-no-daemon/io.c       2005-04-10 20:49:04 UTC (rev 
42767)
@@ -20,18 +20,6 @@
 #include <stdio.h>
 #include <utime.h>
 
-#ifndef PLATFORM_WIN32
-#ifdef HAVE_AIO_H
-#include <aio.h>
-#define USE_AIO        1
-#elif defined(HAVE_SYS_AIO_H)
-#include <sys/aio.h>
-#define USE_AIO 1
-#else
-#undef USE_AIO
-#endif
-#endif
-
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
 #include <mono/io-layer/handles-private.h>
@@ -274,38 +262,6 @@
        return(FILE_TYPE_DISK);
 }
 
-#ifdef USE_AIO
-typedef struct {
-       struct aiocb *aio;
-       WapiOverlapped *overlapped;
-       WapiOverlappedCB callback;
-} notifier_data_t;
-
-#define SIGPTR(a) a.SIGVAL_PTR
-
-static void
-async_notifier (union sigval sig)
-{
-       notifier_data_t *ndata = SIGPTR (sig);
-       guint32 error;
-       guint32 numbytes;
-
-       error = aio_return (ndata->aio);
-       if (error < 0) {
-               error = _wapi_get_win32_file_error (error);
-               numbytes = 0;
-       } else {
-               numbytes = error;
-               error = 0;
-       }
-
-       ndata->callback (error, numbytes, ndata->overlapped);
-       g_free (ndata->aio);
-       g_free (ndata);
-}
-
-#endif /* USE_AIO */
-
 static gboolean file_read(gpointer handle, gpointer buffer,
                          guint32 numbytes, guint32 *bytesread,
                          WapiOverlapped *overlapped)
@@ -339,86 +295,27 @@
                return(FALSE);
        }
 
-       if (file_handle->async == FALSE) {
-               do {
-                       ret=read(fd, buffer, numbytes);
-               } while (ret==-1 && errno==EINTR &&
-                        !_wapi_thread_cur_apc_pending());
+       do {
+               ret = read (fd, buffer, numbytes);
+       } while (ret == -1 && errno == EINTR &&
+                !_wapi_thread_cur_apc_pending());
                        
-               if(ret==-1) {
-                       gint err = errno;
+       if(ret==-1) {
+               gint err = errno;
 
 #ifdef DEBUG
-                       g_message("%s: read of handle %p error: %s", __func__,
-                                 handle, strerror(err));
+               g_message("%s: read of handle %p error: %s", __func__,
+                         handle, strerror(err));
 #endif
-                       SetLastError (_wapi_get_win32_file_error (err));
-                       return(FALSE);
-               }
+               SetLastError (_wapi_get_win32_file_error (err));
+               return(FALSE);
+       }
                
-               if(bytesread!=NULL) {
-                       *bytesread=ret;
-               }
-               
-               return(TRUE);
+       if (bytesread != NULL) {
+               *bytesread = ret;
        }
-
-#ifndef USE_AIO
-       SetLastError (ERROR_NOT_SUPPORTED);
-       return FALSE;
-#else
-       if (overlapped == NULL || file_handle->callback == NULL) {
-               SetLastError (ERROR_INVALID_PARAMETER);
-               return FALSE;
-       }
-
-       {
-       struct aiocb *aio;
-       int result;
-       notifier_data_t *ndata;
-
-       ndata = g_new0 (notifier_data_t, 1);
-       aio = g_new0 (struct aiocb, 1);
-       ndata->overlapped = overlapped;
-       ndata->aio = aio;
-       ndata->callback = file_handle->callback;
-
-       aio->aio_fildes = fd;
-       aio->aio_lio_opcode = LIO_READ;
-       aio->aio_nbytes = numbytes;
-       aio->aio_offset = overlapped->Offset + (((gint64) 
overlapped->OffsetHigh) << 32);
-       aio->aio_buf = buffer;
-       aio->aio_sigevent.sigev_notify = SIGEV_THREAD;
-       aio->aio_sigevent.sigev_notify_function = async_notifier;
-       SIGPTR (aio->aio_sigevent.sigev_value) = ndata;
-
-       result = aio_read (aio);
-       if (result == -1) {
-               _wapi_set_last_error_from_errno ();
-               return FALSE;
-       }
-
-       result = aio_error (aio);
-#ifdef DEBUG
-       g_print ("aio_error (read) returned %d for %d\n", result, fd);
-#endif
-       if (result == 0) {
-               numbytes = aio_return (aio);
-#ifdef DEBUG
-               g_print ("numbytes %d for %d\n", numbytes, fd);
-#endif
-       } else {
-               errno = result;
-               _wapi_set_last_error_from_errno ();
-               return FALSE;
-       }
-
-       if (bytesread)
-               *bytesread = numbytes;
-
-       return TRUE;
-       }
-#endif
+               
+       return(TRUE);
 }
 
 static gboolean file_write(gpointer handle, gconstpointer buffer,
@@ -428,6 +325,7 @@
        struct _WapiHandle_file *file_handle;
        gboolean ok;
        int ret;
+       off_t current_pos;
        int fd = GPOINTER_TO_UINT(handle);
        
        ok=_wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
@@ -453,112 +351,49 @@
                return(FALSE);
        }
        
-       if (file_handle->async == FALSE) {
-               off_t current_pos;
-               
-               /* Need to lock the region we're about to write to,
-                * because we only do advisory locking on POSIX
-                * systems
-                */
-               current_pos = lseek (fd, (off_t)0, SEEK_CUR);
-               if (current_pos == -1) {
+       /* Need to lock the region we're about to write to, because we
+        * only do advisory locking on POSIX systems
+        */
+       current_pos = lseek (fd, (off_t)0, SEEK_CUR);
+       if (current_pos == -1) {
 #ifdef DEBUG
-                       g_message ("%s: handle %p lseek failed: %s", __func__,
-                                  handle, strerror (errno));
+               g_message ("%s: handle %p lseek failed: %s", __func__, handle,
+                          strerror (errno));
 #endif
-                       _wapi_set_last_error_from_errno ();
-                       return(FALSE);
-               }
+               _wapi_set_last_error_from_errno ();
+               return(FALSE);
+       }
                
-               if (_wapi_lock_file_region (fd, current_pos,
-                                           numbytes) == FALSE) {
-                       /* The error has already been set */
-                       return(FALSE);
-               }
+       if (_wapi_lock_file_region (fd, current_pos, numbytes) == FALSE) {
+               /* The error has already been set */
+               return(FALSE);
+       }
                
-               do {
-                       ret=write(fd, buffer, numbytes);
-               } while (ret==-1 && errno==EINTR &&
-                        !_wapi_thread_cur_apc_pending());
+       do {
+               ret = write (fd, buffer, numbytes);
+       } while (ret == -1 && errno == EINTR &&
+                !_wapi_thread_cur_apc_pending());
 
-               _wapi_unlock_file_region (fd, current_pos, numbytes);
+       _wapi_unlock_file_region (fd, current_pos, numbytes);
 
-               if (ret == -1) {
-                       if (errno == EINTR) {
-                               ret = 0;
-                       } else {
-                               _wapi_set_last_error_from_errno ();
+       if (ret == -1) {
+               if (errno == EINTR) {
+                       ret = 0;
+               } else {
+                       _wapi_set_last_error_from_errno ();
                                
 #ifdef DEBUG
-                               g_message("%s: write of handle %p error: %s",
-                                         __func__, handle, strerror(errno));
+                       g_message("%s: write of handle %p error: %s",
+                                 __func__, handle, strerror(errno));
 #endif
 
-                               return(FALSE);
-                       }
+                       return(FALSE);
                }
-               if(byteswritten!=NULL) {
-                       *byteswritten=ret;
-               }
-               return(TRUE);
        }
-
-#ifndef USE_AIO
-       SetLastError (ERROR_NOT_SUPPORTED);
-       return FALSE;
-#else
-       if (overlapped == NULL || file_handle->callback == NULL) {
-               SetLastError (ERROR_INVALID_PARAMETER);
-               return FALSE;
+       if (byteswritten != NULL) {
+               *byteswritten = ret;
        }
-
-       {
-       struct aiocb *aio;
-       int result;
-       notifier_data_t *ndata;
-
-       ndata = g_new0 (notifier_data_t, 1);
-       aio = g_new0 (struct aiocb, 1);
-       ndata->overlapped = overlapped;
-       ndata->aio = aio;
-       ndata->callback = file_handle->callback;
-
-       aio->aio_fildes = fd;
-       aio->aio_lio_opcode = LIO_WRITE;
-       aio->aio_nbytes = numbytes;
-       aio->aio_offset = overlapped->Offset + (((gint64) 
overlapped->OffsetHigh) << 32);
-       aio->aio_buf = (gpointer) buffer;
-       aio->aio_sigevent.sigev_notify = SIGEV_THREAD;
-       aio->aio_sigevent.sigev_notify_function = async_notifier;
-       SIGPTR (aio->aio_sigevent.sigev_value) = ndata;
-
-       result = aio_write (aio);
-       if (result == -1) {
-               _wapi_set_last_error_from_errno ();
-               return FALSE;
-       }
-
-       result = aio_error (aio);
-#ifdef DEBUG
-       g_print ("aio_error (write) returned %d for %d\n", result, fd);
-#endif
-       if (result == 0) {
-               numbytes = aio_return (aio);
-#ifdef DEBUG
-       g_print ("numbytes %d for %d\n", numbytes, fd);
-#endif
-       } else {
-               errno = result;
-               _wapi_set_last_error_from_errno ();
-               return FALSE;
-       }
-
-       if (byteswritten)
-               *byteswritten = numbytes;
-
-       return TRUE;
-       }
-#endif
+       return(TRUE);
 }
 
 static gboolean file_flush(gpointer handle)
@@ -1595,9 +1430,10 @@
        gpointer handle;
        int flags=convert_flags(fileaccess, createmode);
        /*mode_t perms=convert_perms(sharemode);*/
-       /* we don't use sharemode, because that relates to sharing of the file
-        * when the file is open and is already handled by other code, perms 
instead
-        * are the on-disk permissions and this is a sane default.
+       /* we don't use sharemode, because that relates to sharing of
+        * the file when the file is open and is already handled by
+        * other code, perms instead are the on-disk permissions and
+        * this is a sane default.
         */
        mode_t perms=0644;
        gchar *filename;
@@ -1704,7 +1540,6 @@
                return(INVALID_HANDLE_VALUE);
        }
        
-       file_handle.async = ((attrs & FILE_FLAG_OVERLAPPED) != 0);
        file_handle.filename = filename;
 
        if(security!=NULL) {
@@ -3600,51 +3435,6 @@
        return(ret);
 }
 
-gboolean
-_wapi_io_add_callback (gpointer handle,
-                      WapiOverlappedCB callback,
-                      guint64 flags G_GNUC_UNUSED)
-{
-       struct _WapiHandle_file *file_handle;
-       gboolean ok;
-       int thr_ret;
-       gboolean ret = FALSE;
-       
-       ok = _wapi_lookup_handle (handle, WAPI_HANDLE_FILE,
-                                 (gpointer *) &file_handle);
-
-       if (ok == FALSE) {
-               ok = _wapi_lookup_handle (handle, WAPI_HANDLE_PIPE,
-                                         (gpointer *) &file_handle);
-
-       }
-
-       if (ok == FALSE || file_handle->async == FALSE) {
-               SetLastError (ERROR_INVALID_HANDLE);
-               return FALSE;
-       }
-
-       pthread_cleanup_push ((void(*)(void *))_wapi_handle_unlock_handle,
-                             handle);
-       thr_ret = _wapi_handle_lock_handle (handle);
-       g_assert (thr_ret == 0);
-       
-       if (file_handle->callback != NULL) {
-               SetLastError (ERROR_INVALID_PARAMETER);
-               goto cleanup;
-       }
-       ret = TRUE;
-       
-       file_handle->callback = callback;
-
-cleanup:
-       thr_ret = _wapi_handle_unlock_handle (handle);
-       g_assert (thr_ret == 0);
-       pthread_cleanup_pop (0);
-
-       return(ret);
-}
-
 gint32
 GetLogicalDriveStrings (guint32 len, gunichar2 *buf)
 {
@@ -3745,6 +3535,14 @@
 #endif
 
        if (ret == -1) {
+               /*
+                * if locks are not available (NFS for example),
+                * ignore the error
+                */
+               if (errno == ENOLCK) {
+                       return (TRUE);
+               }
+               
                SetLastError (ERROR_LOCK_VIOLATION);
                return(FALSE);
        }

Modified: branches/dick/io-layer-no-daemon/sockets.c
===================================================================
--- branches/dick/io-layer-no-daemon/sockets.c  2005-04-10 20:17:03 UTC (rev 
42766)
+++ branches/dick/io-layer-no-daemon/sockets.c  2005-04-10 20:49:04 UTC (rev 
42767)
@@ -28,18 +28,6 @@
 #include <signal.h>
 #endif
 
-#ifndef PLATFORM_WIN32
-#ifdef HAVE_AIO_H
-#include <aio.h>
-#define USE_AIO        1
-#elif defined(HAVE_SYS_AIO_H)
-#include <sys/aio.h>
-#define USE_AIO 1
-#else
-#undef USE_AIO
-#endif
-#endif
-
 #include <mono/io-layer/wapi.h>
 #include <mono/io-layer/wapi-private.h>
 #include <mono/io-layer/socket-private.h>
@@ -960,109 +948,3 @@
        FD_SET (fd, set);
 }
 
-#ifdef USE_AIO
-
-typedef struct {
-       struct aiocb *aio;
-       gpointer ares;
-       SocketAsyncCB callback;
-} notifier_data_t;
-
-#define SIGPTR(a) a.SIGVAL_PTR
-
-static void
-async_notifier (union sigval sig)
-{
-       notifier_data_t *ndata = SIGPTR (sig);
-       guint32 error;
-       guint32 numbytes;
-
-       error = aio_return (ndata->aio);
-       if (error < 0) {
-               error = _wapi_get_win32_file_error (error);
-               numbytes = 0;
-       } else {
-               numbytes = error;
-               error = 0;
-       }
-
-       ndata->callback (error, numbytes, ndata->ares);
-       g_free (ndata->aio);
-       g_free (ndata);
-}
-
-static gboolean
-do_aio_call (gboolean is_read, gpointer handle, gpointer buffer,
-               guint32 numbytes, guint32 *out_bytes,
-               gpointer ares,
-               SocketAsyncCB callback)
-{
-       int fd = GPOINTER_TO_UINT (handle);
-       struct aiocb *aio;
-       int result;
-       notifier_data_t *ndata;
-       
-       if (handle == NULL ||
-           _wapi_handle_type (handle) != WAPI_HANDLE_SOCKET) {
-               WSASetLastError (WSAENOTSOCK);
-               return FALSE;
-       }
-
-       ndata = g_new0 (notifier_data_t, 1);
-       aio = g_new0 (struct aiocb, 1);
-       ndata->ares = ares;
-       ndata->aio = aio;
-       ndata->callback = callback;
-
-       aio->aio_fildes = fd;
-       aio->aio_lio_opcode = (is_read) ? LIO_READ : LIO_WRITE;
-       aio->aio_nbytes = numbytes;
-       aio->aio_offset = 0;
-       aio->aio_buf = buffer;
-       aio->aio_sigevent.sigev_notify = SIGEV_THREAD;
-       aio->aio_sigevent.sigev_notify_function = async_notifier;
-       SIGPTR (aio->aio_sigevent.sigev_value) = ndata;
-
-       if (is_read) {
-               result = aio_read (aio);
-       } else {
-               result = aio_write (aio);
-       }
-
-       if (result == -1) {
-               WSASetLastError (errno_to_WSA (errno, "do_aio_call"));
-               return FALSE;
-       }
-
-       result = aio_error (aio);
-       if (result == 0) {
-               numbytes = aio_return (aio);
-       } else {
-               WSASetLastError (errno_to_WSA (result, "do_aio_call"));
-               return FALSE;
-       }
-
-       if (out_bytes)
-               *out_bytes = numbytes;
-
-       return TRUE;
-}
-
-gboolean _wapi_socket_async_read (gpointer handle, gpointer buffer,
-                                 guint32 numbytes,
-                                 guint32 *bytesread, gpointer ares,
-                                 SocketAsyncCB callback)
-{
-       return do_aio_call (TRUE, handle, buffer, numbytes, bytesread, ares, 
callback);
-}
-
-gboolean _wapi_socket_async_write (gpointer handle, gpointer buffer,
-                                 guint32 numbytes,
-                                 guint32 *byteswritten, gpointer ares,
-                                 SocketAsyncCB callback)
-{
-       return do_aio_call (FALSE, handle, buffer, numbytes, byteswritten, 
ares, callback);
-}
-
-#endif /* USE_AIO */
-

Modified: branches/dick/io-layer-no-daemon/sockets.h
===================================================================
--- branches/dick/io-layer-no-daemon/sockets.h  2005-04-10 20:17:03 UTC (rev 
42766)
+++ branches/dick/io-layer-no-daemon/sockets.h  2005-04-10 20:49:04 UTC (rev 
42767)
@@ -49,18 +49,4 @@
                     gchar *output, gint o_len, glong *written,
                     void *unused1, void *unused2);
 
-#ifndef PLATFORM_WIN32
-typedef void (*SocketAsyncCB) (guint32 error, guint32 numbytes, gpointer ares);
-
-gboolean _wapi_socket_async_read (gpointer handle, gpointer buffer,
-                                 guint32 numbytes,
-                                 guint32 *bytesread, gpointer ares,
-                                 SocketAsyncCB callback);
-
-gboolean _wapi_socket_async_write (gpointer handle, gpointer buffer,
-                                 guint32 numbytes,
-                                 guint32 *bytesread, gpointer ares,
-                                 SocketAsyncCB callback);
-#endif
-
 #endif /* _WAPI_SOCKETS_H_ */

Modified: branches/dick/io-layer-no-daemon/threads.c
===================================================================
--- branches/dick/io-layer-no-daemon/threads.c  2005-04-10 20:17:03 UTC (rev 
42766)
+++ branches/dick/io-layer-no-daemon/threads.c  2005-04-10 20:49:04 UTC (rev 
42767)
@@ -855,21 +855,6 @@
        SleepEx(ms, FALSE);
 }
 
-gboolean
-BindIoCompletionCallback (gpointer handle,
-                         WapiOverlappedCB callback,
-                         guint64 flags)
-{
-       WapiHandleType type;
-       
-       type = _wapi_handle_type (handle);
-       if (type == WAPI_HANDLE_FILE || type == WAPI_HANDLE_PIPE)
-               return _wapi_io_add_callback (handle, callback, flags);
-
-       SetLastError (ERROR_NOT_SUPPORTED);
-       return FALSE;
-}
-
 guint32 QueueUserAPC (WapiApcProc apc_callback, gpointer handle, 
                                        gpointer param)
 {

Modified: branches/dick/io-layer-no-daemon/threads.h
===================================================================
--- branches/dick/io-layer-no-daemon/threads.h  2005-04-10 20:17:03 UTC (rev 
42766)
+++ branches/dick/io-layer-no-daemon/threads.h  2005-04-10 20:49:04 UTC (rev 
42767)
@@ -55,10 +55,6 @@
 extern gboolean TlsSetValue(guint32 idx, gpointer value);
 extern void Sleep(guint32 ms);
 extern guint32 SleepEx(guint32 ms, gboolean alertable);
-extern gboolean BindIoCompletionCallback (gpointer handle,
-                                         WapiOverlappedCB callback,
-                                         guint64 flags);
-
 extern guint32 QueueUserAPC (WapiApcProc apc_callback, gpointer thread_handle, 
                                        gpointer param);
 

Modified: branches/dick/io-layer-no-daemon/timed-thread.c
===================================================================
--- branches/dick/io-layer-no-daemon/timed-thread.c     2005-04-10 20:17:03 UTC 
(rev 42766)
+++ branches/dick/io-layer-no-daemon/timed-thread.c     2005-04-10 20:49:04 UTC 
(rev 42767)
@@ -132,6 +132,13 @@
        }
        
        _wapi_timed_thread_exit(thread->start_routine(thread->arg));
+
+#ifndef __GNUC__
+       /* Even though we tell gcc that this function doesn't return,
+        * other compilers won't see that.
+        */
+       return(NULL);
+#endif
 }
 
 /* Allocate a thread which can be used with timed_thread_join().

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to