-# strerror_r.m4 serial 2
-dnl Copyright (C) 2002, 2007-2010 Free Software Foundation, Inc.
+# strerror_r.m4 serial 3
+dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
if test $ac_cv_func_strerror_r = yes; then
if test -z "$ERRNO_H"; then
dnl The POSIX prototype is: int strerror_r (int, char *, size_t);
- dnl glibc's prototype: char *strerror_r (int, char *, size_t);
+ dnl glibc, Cygwin: char *strerror_r (int, char *, size_t);
dnl AIX 5.1, OSF/1 5.1: int strerror_r (int, char *, int);
AC_CACHE_CHECK([for strerror_r with POSIX signature],
[gl_cv_func_strerror_r_posix_signature],
#include <string.h>
int strerror_r (int, char *, size_t);
]],
- [[char buf[79];
- return strerror_r (EACCES, buf, 0) < 0
- || strerror_r (EACCES, buf, sizeof (buf)) != 0;
+ [[int result = 0;
+ char buf[79];
+ if (strerror_r (EACCES, buf, 0) < 0)
+ result |= 1;
+ if (strerror_r (EACCES, buf, sizeof (buf)) != 0)
+ result |= 2;
+ return result;
]])],
[gl_cv_func_strerror_r_works=yes],
[gl_cv_func_strerror_r_works=no],