summaryrefslogtreecommitdiff
path: root/m4/getcwd.m4
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2006-06-18 21:52:03 +0000
committerJim Meyering <jim@meyering.net>2006-06-18 21:52:03 +0000
commit48d2f622135c22a99f5733f8019dfc261aaf4058 (patch)
tree3ec2847190875b33782378cb8a48ce768616a318 /m4/getcwd.m4
parenta40e199756443e32e68db0a9686a662a97af8b30 (diff)
downloadcoreutils-48d2f622135c22a99f5733f8019dfc261aaf4058.tar.xz
Test for a bug that causes glibc's getcwd to suffer a failed assertion.
* getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and macro. * getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null, also check for glibc-2.4's abort-inducing bug.
Diffstat (limited to 'm4/getcwd.m4')
-rw-r--r--m4/getcwd.m411
1 files changed, 7 insertions, 4 deletions
diff --git a/m4/getcwd.m4 b/m4/getcwd.m4
index 35d0b53bd..8f17432b5 100644
--- a/m4/getcwd.m4
+++ b/m4/getcwd.m4
@@ -1,6 +1,6 @@
# getcwd.m4 - check for working getcwd that is compatible with glibc
-# Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -40,12 +40,15 @@ AC_DEFUN([gl_FUNC_GETCWD],
[
AC_REQUIRE([gl_FUNC_GETCWD_NULL])
+ gl_abort_bug=no
case $gl_cv_func_getcwd_null in
- yes) gl_FUNC_GETCWD_PATH_MAX;;
+ yes)
+ gl_FUNC_GETCWD_PATH_MAX
+ gl_FUNC_GETCWD_ABORT_BUG([gl_abort_bug=yes]);;
esac
- case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max in
- yes,yes) ;;
+ case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_path_max,$gl_abort_bug in
+ yes,yes,no) ;;
*)
AC_LIBOBJ([getcwd])
AC_DEFINE([__GETCWD_PREFIX], [[rpl_]],