Print this page
3188 ignore the comment in limits.h and define NAME_MAX
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Sam Zaydel <szaydel@racktopsystems.com>

@@ -19,10 +19,11 @@
  * CDDL HEADER END
  */
 
 /*
  * Copyright (c) 2013 Gary Mills
+ * Copyright 2017 RackTop Systems.
  *
  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 

@@ -254,15 +255,16 @@
  * equal to or greater than the stated minimum, but where the value can vary
  * depending on the file to which it is applied. The actual value supported for
  * a specific pathname shall be provided by the pathconf() (5.7.1) function.
  *
  * This is clear that any machine supporting multiple file system types
- * and/or a network can not include this define, regardless of protection
- * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
- *
- * #define      NAME_MAX        14
+ * and/or a network should not include this define, regardless of protection
+ * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags. We chose to ignore that
+ * and provide it anyway for compatibility with other platforms that don't
+ * follow the spec as precisely as they should. Its usage is discouraged.
  */
+#define NAME_MAX        255
 
 #define CHILD_MAX       25      /* max # of processes per user id */
 #ifndef OPEN_MAX
 #define OPEN_MAX        256     /* max # of files a process can have open */
 #endif