windows-uaewouldblock-20071031
authorJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 31 Oct 2007 15:18:10 +0000 (15:18 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Wed, 31 Oct 2007 15:18:10 +0000 (15:18 +0000)
Reorganize the order of the includes to ensure that EWOULDBLOCK is not
assigned the same value as EIO.

src/WINNT/afsd/cm_utils.c

index 090e3e1..634c925 100644 (file)
@@ -13,7 +13,6 @@
 #include <errno.h>
 #include <windows.h>
 #include <winsock2.h>
-#include <afs/unified_afs.h>
 #ifndef EWOULDBLOCK
 #define EWOULDBLOCK             WSAEWOULDBLOCK
 #define EINPROGRESS             WSAEINPROGRESS
@@ -62,6 +61,7 @@
 #define ESTALE                  WSAESTALE
 #define EREMOTE                 WSAEREMOTE
 #endif /* EWOULDBLOCK */
+#include <afs/unified_afs.h>
 
 #include <string.h>
 #include <malloc.h>
@@ -249,8 +249,9 @@ long cm_MapRPCError(long error, cm_req_t *reqp)
         error = CM_ERROR_NOTDIR;
     else if (error == 2)       /* ENOENT */
         error = CM_ERROR_NOSUCHFILE;
-    else if (error == 11        /* EAGAIN, most servers */
-             || error == 35)   /* EAGAIN, Digital UNIX */
+    else if (error == 11           /* EAGAIN, most servers */
+             || error == 35       /* EAGAIN, Digital UNIX */
+             || error == WSAEWOULDBLOCK)
         error = CM_ERROR_WOULDBLOCK;
     else if (error == VDISKFULL
               || error == 28)   /* ENOSPC */