#include <afs/param.h>
#include <afs/stds.h>
+#include <errno.h>
#ifndef DJGPP
#include <windows.h>
#include <winsock2.h>
#define ETIMEDOUT WSAETIMEDOUT
#define ECONNREFUSED WSAECONNREFUSED
#define ELOOP WSAELOOP
+#ifdef ENAMETOOLONG
+#undef ENAMETOOLONG
+#endif
#define ENAMETOOLONG WSAENAMETOOLONG
#define EHOSTDOWN WSAEHOSTDOWN
#define EHOSTUNREACH WSAEHOSTUNREACH
+#ifdef ENOTEMPTY
+#undef ENOTEMPTY
+#endif
#define ENOTEMPTY WSAENOTEMPTY
#define EPROCLIM WSAEPROCLIM
#define EUSERS WSAEUSERS
#define EREMOTE WSAEREMOTE
#endif /* EWOULDBLOCK */
#endif /* !DJGPP */
+#include <afs/unified_afs.h>
+
#include <string.h>
#include <malloc.h>
-
+#include "afsd.h"
#include <osi.h>
#include <rx/rx.h>
-#include <errno.h>
-#include <afs/unified_afs.h>
-
-#include "afsd.h"
static osi_once_t cm_utilsOnce;
error = CM_ERROR_EXISTS;
else if (error == 20)
error = CM_ERROR_NOTDIR;
- else if (error == 2)
+ else if (error == 2) /* ENOENT */
error = CM_ERROR_NOSUCHFILE;
else if (error == 11 /* EAGAIN, most servers */
|| error == 35) /* EAGAIN, Digital UNIX */
|| error == 122 /* EDQUOT on Linux */
|| error == 1133) /* EDQUOT on Irix */
error = CM_ERROR_QUOTA;
- else if (error == VNOVNODE)
+ else if (error == VNOVNODE) {
+#ifdef COMMENT
error = CM_ERROR_BADFD;
- else if (error == 21)
+#else
+ error = CM_ERROR_RETRY;
+#endif
+ } else if (error == 21)
return CM_ERROR_ISDIR;
return error;
}