diff options
author | Jim Meyering <jim@meyering.net> | 2004-11-28 20:55:05 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-11-28 20:55:05 +0000 |
commit | 45eac4b4089216bb9499bbad2f4e4badf098b571 (patch) | |
tree | 64267a0e3e6bcaa14fc3f2f1930c09b0cf6c4517 /m4/chdir.m4 | |
parent | 72dcf681bc226db858935a2fa611556aed6c883f (diff) | |
download | coreutils-45eac4b4089216bb9499bbad2f4e4badf098b571.tar.xz |
*** empty log message ***
Diffstat (limited to 'm4/chdir.m4')
-rw-r--r-- | m4/chdir.m4 | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/m4/chdir.m4 b/m4/chdir.m4 new file mode 100644 index 000000000..c3268b30c --- /dev/null +++ b/m4/chdir.m4 @@ -0,0 +1,30 @@ +#serial 1 + +# From Jim Meyering. +# Use Gnulib's robust replacement chdir function. +# It can handle arbitrarily long directory names, which means +# that when it is given the name of an existing directory, it +# never fails with ENAMETOOLONG. +# +# FIXME: we don't really want to use this function on systems that +# do not define PATH_MAX... +# +# It still fails with ENAMETOOLONG if the specified directory +# name contains a component that would provoke such a failure +# all by itself (e.g. if the component is longer than PATH_MAX +# on systems that define PATH_MAX). + +AC_DEFUN([gl_FUNC_CHDIR], +[ + AC_LIBOBJ([chdir]) + AC_DEFINE([__CHDIR_PREFIX], [[rpl_]], + [Define to rpl_ if the chdir replacement function should be used.]) + gl_PREREQ_CHDIR +]) + +AC_DEFUN([gl_PREREQ_CHDIR], +[ + AM_STDBOOL_H + gl_FUNC_MEMPCPY + gl_FUNC_OPENAT +]) |