diff src/w32.c @ 90732:bc10a33dd40b

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 563-582) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 177-185) - Merge from emacs--devo--0 - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-158
author Miles Bader <miles@gnu.org>
date Mon, 01 Jan 2007 03:21:06 +0000
parents c358d0861b16 357bd3ca981a
children 95d0cdf160ea
line wrap: on
line diff
--- a/src/w32.c	Wed Dec 20 07:28:28 2006 +0000
+++ b/src/w32.c	Mon Jan 01 03:21:06 2007 +0000
@@ -153,7 +153,8 @@
     PSID pSid);
 
   /* ** A utility function ** */
-static BOOL is_windows_9x ()
+static BOOL
+is_windows_9x ()
 {
   static BOOL s_b_ret=0;
   OSVERSIONINFO os_ver;
@@ -2871,7 +2872,8 @@
 /* function to set h_errno for compatability; map winsock error codes to
    normal system codes where they overlap (non-overlapping definitions
    are already in <sys/socket.h> */
-static void set_errno ()
+static void
+set_errno ()
 {
   if (winsock_lib == NULL)
     h_errno = EINVAL;
@@ -2892,7 +2894,8 @@
   errno = h_errno;
 }
 
-static void check_errno ()
+static void
+check_errno ()
 {
   if (h_errno == 0 && winsock_lib != NULL)
     pfn_WSASetLastError (0);
@@ -3676,7 +3679,8 @@
   return cp->status;
 }
 
-int _sys_wait_accept (int fd)
+int
+_sys_wait_accept (int fd)
 {
   HANDLE hEv;
   child_process * cp;
@@ -3698,10 +3702,10 @@
     {
       rc = WaitForSingleObject (hEv, INFINITE);
       pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0);
-      pfn_WSACloseEvent (hEv);
       if (rc == WAIT_OBJECT_0)
 	cp->status = STATUS_READ_SUCCEEDED;
     }
+  pfn_WSACloseEvent (hEv);
 
   return cp->status;
 }
@@ -4127,7 +4131,7 @@
       shut_down_emacs (0, 0, Qnil);
     }
 
-  /* Allow other handlers to handle this signal.  */  
+  /* Allow other handlers to handle this signal.  */
   return FALSE;
 }
 
@@ -4136,7 +4140,8 @@
 	must always be initialized on startup even when the global variable
 	initialized is non zero (see the function main in emacs.c).
 */
-void globals_of_w32 ()
+void
+globals_of_w32 ()
 {
   g_b_init_is_windows_9x = 0;
   g_b_init_open_process_token = 0;