mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-02-11 14:53:13 -05:00
fix logic of POSIX strerror_r (ITS#4292; refix ITS#4285)
This commit is contained in:
parent
8e7e8c4d04
commit
959a3651b9
1 changed files with 4 additions and 4 deletions
|
|
@ -106,14 +106,14 @@ void * memrchr(const void *b, int c, size_t len);
|
|||
#if defined( HAVE_NONPOSIX_STRERROR_R )
|
||||
# define AC_STRERROR_R(e,b,l) (strerror_r((e), (b), (l)))
|
||||
#elif defined( HAVE_STRERROR_R )
|
||||
# define AC_STRERROR_R(e,b,l) (strerror_r((e), (b), (l)) ? (b) : "")
|
||||
# define AC_STRERROR_R(e,b,l) (strerror_r((e), (b), (l)) == 0 ? (b) : "Unknown error")
|
||||
#elif defined( HAVE_SYS_ERRLIST )
|
||||
# define AC_STRERROR_R(e,b,l) ((e) > -1 && (e) < sys_nerr \
|
||||
? sys_errlist[(e)] : "" )
|
||||
? sys_errlist[(e)] : "Unknown error" )
|
||||
#elif defined( HAVE_STRERROR )
|
||||
# define AC_STRERROR_R(e,b,l) (strerror(e))
|
||||
# define AC_STRERROR_R(e,b,l) (strerror(e)) /* NOTE: may be NULL */
|
||||
#else
|
||||
# define AC_STRERROR_R(e,b,l) ("")
|
||||
# define AC_STRERROR_R(e,b,l) ("Unknown error")
|
||||
#endif
|
||||
|
||||
#endif /* _AC_STRING_H */
|
||||
|
|
|
|||
Loading…
Reference in a new issue