Mercurial > hg > octave-kai > gnulib-hg
changeset 2713:9f655071091d
(AC_FUNC_STRERROR_R): Pass a reasonably large buffer to strerror_r.
author | Jim Meyering <jim@meyering.net> |
---|---|
date | Thu, 06 Jul 2000 05:20:15 +0000 |
parents | b0fc13d19b69 |
children | 179407974507 |
files | m4/strerror_r.m4 |
diffstat | 1 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- 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 @@ # 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 @@ 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,