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>

Split Close
Expand all
Collapse all
          --- old/usr/src/head/limits.h
          +++ new/usr/src/head/limits.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  
  22   22  /*
  23   23   * Copyright (c) 2013 Gary Mills
       24 + * Copyright 2017 RackTop Systems.
  24   25   *
  25   26   * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
  26   27   * Use is subject to license terms.
  27   28   */
  28   29  
  29   30  /*      Copyright (c) 1988 AT&T */
  30   31  /*        All Rights Reserved   */
  31   32  
  32   33  
  33   34  #ifndef _LIMITS_H
↓ open down ↓ 215 lines elided ↑ open up ↑
 249  250   * POSIX 1003.1a, section 2.9.5, table 2-5 contains [NAME_MAX] and the
 250  251   * related text states:
 251  252   *
 252  253   * A definition of one of the values from Table 2-5 shall be omitted from the
 253  254   * <limits.h> on specific implementations where the corresponding value is
 254  255   * equal to or greater than the stated minimum, but where the value can vary
 255  256   * depending on the file to which it is applied. The actual value supported for
 256  257   * a specific pathname shall be provided by the pathconf() (5.7.1) function.
 257  258   *
 258  259   * This is clear that any machine supporting multiple file system types
 259      - * and/or a network can not include this define, regardless of protection
 260      - * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags.
 261      - *
 262      - * #define      NAME_MAX        14
      260 + * and/or a network should not include this define, regardless of protection
      261 + * by the _POSIX_SOURCE and _POSIX_C_SOURCE flags. We chose to ignore that
      262 + * and provide it anyway for compatibility with other platforms that don't
      263 + * follow the spec as precisely as they should. Its usage is discouraged.
 263  264   */
      265 +#define NAME_MAX        255
 264  266  
 265  267  #define CHILD_MAX       25      /* max # of processes per user id */
 266  268  #ifndef OPEN_MAX
 267  269  #define OPEN_MAX        256     /* max # of files a process can have open */
 268  270  #endif
 269  271  
 270  272  #define PIPE_MAX        5120    /* max # bytes written to a pipe in a write */
 271  273  
 272  274  #define STD_BLK         1024    /* # bytes in a physical I/O block */
 273  275  #define UID_MAX         2147483647      /* max value for a user or group ID */
↓ open down ↓ 59 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX