X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstrsignal.m4;h=856f8af8fef2e5ca566b51a2db1d852a168fe501;hb=0e789d4c672de575ec384b2059c4779de5b5c664;hp=d71f0963fb6d99802f04df88eb17044360601f48;hpb=829d0e0cfc21f3eb72ff83d70b7aabc5c9854a17;p=gnulib.git diff --git a/m4/strsignal.m4 b/m4/strsignal.m4 index d71f0963f..856f8af8f 100644 --- a/m4/strsignal.m4 +++ b/m4/strsignal.m4 @@ -1,5 +1,5 @@ -# strsignal.m4 serial 3 -dnl Copyright (C) 2008 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. @@ -24,17 +24,24 @@ AC_DEFUN([gl_FUNC_STRSIGNAL], AC_CACHE_CHECK([whether strsignal always returns a string], [gl_cv_func_working_strsignal], [AC_RUN_IFELSE( - [AC_LANG_PROGRAM( - [[#include - ]], - [[char *s = strsignal (-1); - return !(s != (char *) 0 && s != (char *) -1);]])], - [gl_cv_func_working_strsignal=yes], - [gl_cv_func_working_strsignal=no], - [case "$host_os" in - solaris* | aix*) gl_cv_func_working_strsignal=no;; - *) gl_cv_func_working_strsignal="guessing yes";; - esac])]) + [AC_LANG_PROGRAM( + [[#include +#include /* NetBSD 5.0 declares it in wrong header. */ + ]], + [[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 + solaris* | aix*) gl_cv_func_working_strsignal=no;; + *) gl_cv_func_working_strsignal="guessing yes";; + esac])]) else gl_cv_func_working_strsignal=no fi