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-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a77f28a31f55bc13c92f2485e5fe13f67a967be9;p=pspp (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,