- ]])],
- [gl_cv_func_getcwd_path_max=yes],
- [gl_cv_func_getcwd_path_max=no],
- [gl_cv_func_getcwd_path_max=no])])
+ ]])],
+ [gl_cv_func_getcwd_path_max=yes],
+ [case $? in
+ 1) gl_cv_func_getcwd_path_max='no, but it is partly working';;
+ *) gl_cv_func_getcwd_path_max=no;;
+ esac],
+ [gl_cv_func_getcwd_path_max=no])
+ ])
+ case $gl_cv_func_getcwd_path_max in
+ 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.]);;
+ esac