# Check for several getcwd bugs with long file names.
# If so, arrange to compile the wrapper function.
# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20.
# I've heard that this is due to a Linux kernel bug, and that it has
# Check for several getcwd bugs with long file names.
# If so, arrange to compile the wrapper function.
# This is necessary for at least GNU libc on linux-2.4.19 and 2.4.20.
# I've heard that this is due to a Linux kernel bug, and that it has
# 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.
# 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.
gl_cv_func_getcwd_path_max,
[# Arrange for deletion of the temporary directory this test creates.
ac_clean_files="$ac_clean_files confdir3"
gl_cv_func_getcwd_path_max,
[# Arrange for deletion of the temporary directory this test creates.
ac_clean_files="$ac_clean_files confdir3"
if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
{
if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
{
if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
c = getcwd (buf, PATH_MAX);
if (!c && errno == ENOENT)
{
c = getcwd (buf, PATH_MAX);
if (!c && errno == ENOENT)
{
no,*)
AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1],
[Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
no,*)
AC_DEFINE([HAVE_PARTLY_WORKING_GETCWD], [1],
[Define to 1 if getcwd works, except it sometimes fails when it shouldn't,
- setting errno to ERANGE, ENAMETOOLONG, or ENOENT. If __GETCWD_PREFIX
- is not defined, it doesn't matter whether HAVE_PARTLY_WORKING_GETCWD
- is defined.]);;
+ setting errno to ERANGE, ENAMETOOLONG, or ENOENT.]);;