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

(cherry picked from commit d16d5c031274e05ea27f12965e094ae42d8af9e5)

src/WINNT/afsd/cm_utils.c

index 338f5ba..1c7de61 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef DJGPP
 #include <windows.h>
 #include <winsock2.h>
-#include <afs/unified_afs.h>
 #ifndef EWOULDBLOCK
 #define EWOULDBLOCK             WSAEWOULDBLOCK
 #define EINPROGRESS             WSAEINPROGRESS
@@ -64,6 +63,7 @@
 #define EREMOTE                 WSAEREMOTE
 #endif /* EWOULDBLOCK */
 #endif /* !DJGPP */
+#include <afs/unified_afs.h>
 
 #include <string.h>
 #include <malloc.h>
@@ -251,8 +251,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 */