update copyright
[gnulib.git] / m4 / strsignal.m4
index 2a20985..856f8af 100644 (file)
@@ -1,5 +1,5 @@
-# strsignal.m4 serial 3
-dnl Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# strsignal.m4 serial 5
+dnl Copyright (C) 2008-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.
@@ -26,9 +26,16 @@ AC_DEFUN([gl_FUNC_STRSIGNAL],
       [AC_RUN_IFELSE(
          [AC_LANG_PROGRAM(
             [[#include <string.h>
+#include <unistd.h> /* NetBSD 5.0 declares it in wrong header. */
             ]],
-            [[char *s = strsignal (-1);
-              return !(s != (char *) 0 && s != (char *) -1);]])],
+            [[int result = 0;
+              char *s = strsignal (-1);
+              if (s == (char *) 0)
+                result |= 1;
+              if (s == (char *) -1)
+                result |= 2;
+              return result;
+            ]])],
          [gl_cv_func_working_strsignal=yes],
          [gl_cv_func_working_strsignal=no],
          [case "$host_os" in