]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(NAME_MAX_IN_DIR): Rename from PATH_MAX_IN_DIR. Use _POSIX_NAME_MAX,
authorJim Meyering <jim@meyering.net>
Sun, 18 Apr 1999 15:44:03 +0000 (15:44 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 18 Apr 1999 15:44:03 +0000 (15:44 +0000)
not _POSIX_PATH_MAX.  Guard with #if HAVE_PATHCONF rather than
#if HAVE_UNISTD_H.

src/sort.c

index d932f409ccfbe0d4f738f5e0a2a88fa26c859f8b..d69cb4f0500b95989bb718c32b4ebc830cc624c3 100644 (file)
 # 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));