+2008-10-03 Paolo Bonzini <bonzini@gnu.org>
+ Bruno Haible <bruno@clisp.org>
+
+ * lib/errno.in.h (EWOULDBLOCK) [win32]: Define to EAGAIN.
+ * lib/winsock.c (set_winsock_errno): Map WSAEWOULDBLOCK to EWOULDBLOCK.
+ * lib/strerror.c (rpl_strerror): Remove error string for EWOULDBLOCK.
+
2008-10-03 Kamil Dudka <kdudka@redhat.com>
filevercmp: new module
/* On native Windows platforms, many macros are not defined. */
# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */
+# define EWOULDBLOCK EAGAIN
+
/* Values >= 100 seem safe to use. */
# define ETXTBSY 100
# define GNULIB_defined_ETXTBSY 1
/* These are intentionally the same values as the WSA* error numbers, defined
in <winsock2.h>. */
-# define EWOULDBLOCK 10035
# define EINPROGRESS 10036
# define EALREADY 10037
# define ENOTSOCK 10038
# endif
# if GNULIB_defined_ESOCK /* native Windows platforms */
- case EWOULDBLOCK:
- return "Operation would block";
+ /* EWOULDBLOCK is the same as EAGAIN. */
case EINPROGRESS:
return "Operation now in progress";
case EALREADY:
/* WSAEACCES maps to EACCES */
/* WSAEFAULT maps to EFAULT */
/* WSAEINVAL maps to EINVAL */
- /* WSAEMFILE maos to EMFILE */
- /* WSAEWOULDBLOCK is EWOULDBLOCK */
+ /* WSAEMFILE maps to EMFILE */
+ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
/* WSAEINPROGRESS is EINPROGRESS */
/* WSAEALREADY is EALREADY */
/* WSAENOTSOCK is ENOTSOCK */
case WSA_INVALID_PARAMETER:
errno = EINVAL;
break;
+ case WSAEWOULDBLOCK:
+ errno = EWOULDBLOCK;
+ break;
case WSAENAMETOOLONG:
errno = ENAMETOOLONG;
break;