OSDN Git Service

strerror_r: fix compilation bug in previous patch
authorericb <ericb>
Thu, 10 Feb 2011 20:25:53 +0000 (20:25 +0000)
committerericb <ericb>
Thu, 10 Feb 2011 20:25:53 +0000 (20:25 +0000)
* errno.cc (includes): Avoid compilation failure if <string.h>
settles on wrong strerror_r signature.

winsup/cygwin/ChangeLog
winsup/cygwin/errno.cc

index 2e50d0b..78b3d96 100644 (file)
@@ -1,5 +1,8 @@
 2011-02-10  Eric Blake  <eblake@redhat.com>
 
+       * errno.cc (includes): Avoid compilation failure if <string.h>
+       settles on wrong strerror_r signature.
+
        * errno.cc (__xpg_strerror_r): New function.
        (strerror_r): Update to copy newlib's fixes.
        (strerror): Set errno on failure.
index 33a1038..8ee2a75 100644 (file)
@@ -12,12 +12,14 @@ details. */
 #define _sys_nerr FOO_sys_nerr
 #define sys_nerr FOOsys_nerr
 #define _sys_errlist FOO_sys_errlist
+#define strerror_r FOO_strerror_r
 #include "winsup.h"
 #include "cygtls.h"
 #include "ntdll.h"
 #undef _sys_nerr
 #undef sys_nerr
 #undef _sys_errlist
+#undef strerror_r
 
 /* Table to map Windows error codes to Errno values.  */
 /* FIXME: Doing things this way is a little slow.  It's trivial to change