From: Jim Meyering Date: Thu, 6 Jul 2000 05:20:15 +0000 (+0000) Subject: (AC_FUNC_STRERROR_R): Pass a reasonably large buffer to strerror_r. X-Git-Tag: FILEUTILS-4_0x~107 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=d148eef81d07b39a601651db4c35d9b4c4cded88;p=thirdparty%2Fcoreutils.git (AC_FUNC_STRERROR_R): Pass a reasonably large buffer to strerror_r. --- diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4 index eab6916fae..1e57f27c8a 100644 --- a/m4/strerror_r.m4 +++ b/m4/strerror_r.m4 @@ -1,4 +1,4 @@ -#serial 1000 +#serial 1001 # Experimental replacement for the function in the latest CVS autoconf. # If the compile-test says strerror_r doesn't work, then resort to a # `run'-test that works on BeOS and segfaults on DEC Unix. @@ -25,8 +25,8 @@ if test $ac_cv_func_strerror_r = yes; then # endif ], [ - char buf; - char x = *strerror_r (0, &buf, sizeof buf); + char buf[100]; + char x = *strerror_r (0, buf, sizeof buf); ], ac_cv_func_strerror_r_works=yes, ac_cv_func_strerror_r_works=no @@ -48,9 +48,9 @@ if test $ac_cv_func_strerror_r = yes; then int main () { - char buf[2]; + char buf[100]; char x = *strerror_r (0, buf, sizeof buf); - exit (x && !isalpha (x)); + exit (!isalpha (x)); } ], ac_cv_func_strerror_r_works=yes,