strerror_r: fix compilation bug in previous patch
* errno.cc (includes): Avoid compilation failure if <string.h> settles on wrong strerror_r signature.
This commit is contained in:
parent
f6b802d912
commit
96b998db51
@ -1,5 +1,8 @@
|
|||||||
2011-02-10 Eric Blake <eblake@redhat.com>
|
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.
|
* errno.cc (__xpg_strerror_r): New function.
|
||||||
(strerror_r): Update to copy newlib's fixes.
|
(strerror_r): Update to copy newlib's fixes.
|
||||||
(strerror): Set errno on failure.
|
(strerror): Set errno on failure.
|
||||||
|
@ -12,12 +12,14 @@ details. */
|
|||||||
#define _sys_nerr FOO_sys_nerr
|
#define _sys_nerr FOO_sys_nerr
|
||||||
#define sys_nerr FOOsys_nerr
|
#define sys_nerr FOOsys_nerr
|
||||||
#define _sys_errlist FOO_sys_errlist
|
#define _sys_errlist FOO_sys_errlist
|
||||||
|
#define strerror_r FOO_strerror_r
|
||||||
#include "winsup.h"
|
#include "winsup.h"
|
||||||
#include "cygtls.h"
|
#include "cygtls.h"
|
||||||
#include "ntdll.h"
|
#include "ntdll.h"
|
||||||
#undef _sys_nerr
|
#undef _sys_nerr
|
||||||
#undef sys_nerr
|
#undef sys_nerr
|
||||||
#undef _sys_errlist
|
#undef _sys_errlist
|
||||||
|
#undef strerror_r
|
||||||
|
|
||||||
/* Table to map Windows error codes to Errno values. */
|
/* Table to map Windows error codes to Errno values. */
|
||||||
/* FIXME: Doing things this way is a little slow. It's trivial to change
|
/* FIXME: Doing things this way is a little slow. It's trivial to change
|
||||||
|
Loading…
x
Reference in New Issue
Block a user