summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-07-06 05:20:15 +0000
committerJim Meyering <jim@meyering.net>2000-07-06 05:20:15 +0000
commitd148eef81d07b39a601651db4c35d9b4c4cded88 (patch)
tree743ed3a356233f200bc9020a804649b20989882a
parent082c0a9e2326442fa37485a0227dad480706676a (diff)
downloadcoreutils-d148eef81d07b39a601651db4c35d9b4c4cded88.tar.xz
(AC_FUNC_STRERROR_R): Pass a reasonably large buffer to strerror_r.
-rw-r--r--m4/strerror_r.m410
1 files changed, 5 insertions, 5 deletions
diff --git a/m4/strerror_r.m4 b/m4/strerror_r.m4
index eab6916fa..1e57f27c8 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,