diff options
author | Jim Meyering <jim@meyering.net> | 1999-04-18 15:44:03 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-04-18 15:44:03 +0000 |
commit | 0fe4e6b4435a0dca4e7731e4adac884abec5b271 (patch) | |
tree | 5c0b3199624984deac47a5ed4f4f53395596aa45 | |
parent | 8cee2c67721043ad9e37bad0936e16f5996668ca (diff) | |
download | coreutils-0fe4e6b4435a0dca4e7731e4adac884abec5b271.tar.xz |
(NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX,
not _POSIX_PATH_MAX. Guard with #if HAVE_PATHCONF rather than
#if HAVE_UNISTD_H.
-rw-r--r-- | src/sort.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/sort.c b/src/sort.c index d932f409c..d69cb4f05 100644 --- a/src/sort.c +++ b/src/sort.c @@ -42,10 +42,10 @@ # include <langinfo.h> #endif -#if HAVE_UNISTD_H && defined(_PC_PATH_MAX) && _POSIX_NAME_MAX == 12 -# define PATH_MAX_IN_DIR(Dir) pathconf(Dir, _PC_PATH_MAX) +#if HAVE_PATHCONF && defined _PC_NAME_MAX +# define NAME_MAX_IN_DIR(Dir) pathconf (Dir, _PC_NAME_MAX) #else -# define PATH_MAX_IN_DIR(Dir) 255 +# define NAME_MAX_IN_DIR(Dir) 255 #endif char *xstrdup (); @@ -436,7 +436,7 @@ tempname (void) static unsigned int seq; int len = strlen (temp_dir); char *name = xmalloc (len + 1 + sizeof ("sort") - 1 + 5 + 5 + 1); - int long_file_names = PATH_MAX_IN_DIR (temp_dir) > 12; + int long_file_names = NAME_MAX_IN_DIR (temp_dir) > 12; struct tempnode *node; node = (struct tempnode *) xmalloc (sizeof (struct tempnode)); |