Lines Matching refs:strerror_r
1 # strerror_r.m4 serial 20
12 dnl Persuade Solaris <string.h> to declare strerror_r().
15 dnl Some systems don't declare strerror_r() if _THREAD_SAFE and _REENTRANT
17 AC_CHECK_DECLS_ONCE([strerror_r])
26 dnl The system's strerror_r has bugs. Replace it.
30 dnl The system's strerror_r() has a wrong signature. Replace it.
34 dnl The system's strerror_r() cannot know about the new errno values we
41 # Prerequisites of lib/strerror_r.c.
49 # Detect if strerror_r works, but without affecting whether a replacement
50 # strerror_r will be used.
57 AC_CHECK_FUNCS_ONCE([strerror_r])
60 dnl The POSIX prototype is: int strerror_r (int, char *, size_t);
61 dnl glibc, Cygwin: char *strerror_r (int, char *, size_t);
62 dnl AIX 5.1, OSF/1 5.1: int strerror_r (int, char *, int);
63 AC_CACHE_CHECK([for strerror_r with POSIX signature],
68 int strerror_r (int, char *, size_t);
75 dnl AIX 6.1 strerror_r fails by returning -1, not an error number.
76 dnl HP-UX 11.31 strerror_r always fails when the buffer length argument
78 dnl FreeBSD 8.s strerror_r claims failure on 0
79 dnl Mac OS X 10.5 strerror_r treats 0 like -1
80 dnl Solaris 10 strerror_r corrupts errno on failure
81 AC_CACHE_CHECK([whether strerror_r works],
90 if (strerror_r (EACCES, buf, 0) < 0)
93 if (strerror_r (EACCES, buf, sizeof buf) != 0)
96 if (strerror_r (0, buf, sizeof buf) != 0)
104 if (strerror_r (-3, buf, sizeof buf) < 0)