# HG changeset patch # User Paolo Bonzini # Date 1223051039 -7200 # Node ID ac46e8160cc980266255a9bc7f762d9e3400bf7a # Parent a1abe7f158c1898acbc66825e7a97df7378cc570 Define EWOULDBLOCK to the same value as EAGAIN. diff -r a1abe7f158c1 -r ac46e8160cc9 ChangeLog --- a/ChangeLog Fri Oct 03 10:31:28 2008 +0200 +++ b/ChangeLog Fri Oct 03 18:23:59 2008 +0200 @@ -1,3 +1,10 @@ +2008-10-03 Paolo Bonzini + Bruno Haible + + * 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 filevercmp: new module diff -r a1abe7f158c1 -r ac46e8160cc9 lib/errno.in.h --- a/lib/errno.in.h Fri Oct 03 10:31:28 2008 +0200 +++ b/lib/errno.in.h Fri Oct 03 18:23:59 2008 +0200 @@ -30,13 +30,15 @@ /* 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 . */ -# define EWOULDBLOCK 10035 # define EINPROGRESS 10036 # define EALREADY 10037 # define ENOTSOCK 10038 diff -r a1abe7f158c1 -r ac46e8160cc9 lib/strerror.c --- a/lib/strerror.c Fri Oct 03 10:31:28 2008 +0200 +++ b/lib/strerror.c Fri Oct 03 18:23:59 2008 +0200 @@ -49,8 +49,7 @@ # 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: @@ -134,8 +133,8 @@ /* 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 */ diff -r a1abe7f158c1 -r ac46e8160cc9 lib/winsock.c --- a/lib/winsock.c Fri Oct 03 10:31:28 2008 +0200 +++ b/lib/winsock.c Fri Oct 03 18:23:59 2008 +0200 @@ -91,6 +91,9 @@ case WSA_INVALID_PARAMETER: errno = EINVAL; break; + case WSAEWOULDBLOCK: + errno = EWOULDBLOCK; + break; case WSAENAMETOOLONG: errno = ENAMETOOLONG; break;