X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstrerror_r.m4;h=341f9836b560e548042df62e6739f3291831d532;hb=da8054d48dc22e1c051db54049e005d51a006e69;hp=f6aceff642f063be48f504d3c1e75dfbc02bcfa6;hpb=c74873191b6e585cdd5a3b2ce5e07edae1427cef;p=gnulib.git diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4 index f6aceff64..341f9836b 100644 --- a/m4/strerror_r.m4 +++ b/m4/strerror_r.m4 @@ -1,5 +1,5 @@ -# strerror_r.m4 serial 12 -dnl Copyright (C) 2002, 2007-2011 Free Software Foundation, Inc. +# strerror_r.m4 serial 15 +dnl Copyright (C) 2002, 2007-2013 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. @@ -43,6 +43,7 @@ AC_DEFUN([gl_PREREQ_STRERROR_R], [ dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r. AC_CHECK_FUNCS_ONCE([__xpg_strerror_r]) AC_CHECK_FUNCS_ONCE([catgets]) + AC_CHECK_FUNCS_ONCE([snprintf]) ]) # Detect if strerror_r works, but without affecting whether a replacement @@ -75,7 +76,7 @@ AC_DEFUN([gl_FUNC_STRERROR_R_WORKS], dnl HP-UX 11.31 strerror_r always fails when the buffer length argument dnl is less than 80. dnl FreeBSD 8.s strerror_r claims failure on 0 - dnl MacOS X 10.5 strerror_r treats 0 like -1 + dnl Mac OS X 10.5 strerror_r treats 0 like -1 dnl Solaris 10 strerror_r corrupts errno on failure AC_CACHE_CHECK([whether strerror_r works], [gl_cv_func_strerror_r_works], @@ -138,7 +139,11 @@ changequote([,])dnl [AC_LANG_PROGRAM( [[#include #include - extern int __xpg_strerror_r(int, char *, size_t); + extern + #ifdef __cplusplus + "C" + #endif + int __xpg_strerror_r(int, char *, size_t); ]], [[int result = 0; char buf[256] = "^";