Put more information about failed tests into the test return codes.
[gnulib.git] / m4 / strsignal.m4
index 6cb8d9d..2563b94 100644 (file)
@@ -1,4 +1,4 @@
-# strsignal.m4 serial 4
+# strsignal.m4 serial 5
 dnl Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -28,8 +28,14 @@ AC_DEFUN([gl_FUNC_STRSIGNAL],
             [[#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