getaddrinfo: Doc fix.
[pspp] / m4 / strerror_r.m4
index abb66228067b4c1179be7ee50ec88a6bebfb1ff0..1883458c03a4ec64cd56e60eec4036b0e3a4acde 100644 (file)
@@ -1,5 +1,5 @@
-# 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.
@@ -24,7 +24,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R],
   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],
@@ -49,9 +49,13 @@ AC_DEFUN([gl_FUNC_STRERROR_R],
                   #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],