home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue2 / SDL.ARC / !unixlib / source / clib / h / limits < prev    next >
Encoding:
Text File  |  2004-09-06  |  5.2 KB  |  165 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/limits.h,v $
  4.  * $Date: 2004/08/16 21:01:26 $
  5.  * $Revision: 1.4 $
  6.  * $State: Exp $
  7.  * $Author: joty $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. /* ANSI Standard 4.14/2.2.4.2: Limits of integral types <limits.h>.  */
  12.  
  13. #ifndef __LIMITS_H
  14. #define __LIMITS_H
  15.  
  16.  
  17. /* Number of bits in a 'char'.  */
  18. #define CHAR_BIT    8
  19. /* Minimum value that can be represented by a 'signed char'.  */
  20. #define SCHAR_MIN    (-0x80)
  21. /* Maximum values that can be represented by a 'signed char'
  22.    and 'unsigned char', respectively.  */
  23. #define SCHAR_MAX    0x7f
  24. #define UCHAR_MAX    0xff
  25. /* Minimum and maximum values that can be represented by a 'char'.  */
  26. #define CHAR_MIN    0x00
  27. #define CHAR_MAX    0xff
  28.  
  29. /* Maximum length of a multibyte character.  */
  30. #define MB_LEN_MAX    1
  31.  
  32. /* Minimum value that can be represented by a 'signed short int'.  */
  33. #define SHRT_MIN    (short)(0x8000U)
  34. /* Maximum values that can be represented by a 'signed short int'
  35.    and 'unsigned short int', respectively.  */
  36. #define SHRT_MAX    0x7fff
  37. #define USHRT_MAX    0xffffU
  38.  
  39. /* Minimum value that can be represented by a 'signed int'.  */
  40. #define INT_MIN     (int)(0x80000000U)
  41. /* Maximum values that can be represented by a 'signed int'
  42.    and 'unsigned int'.  */
  43. #define INT_MAX     0x7fffffff
  44. #define UINT_MAX    0xffffffffU
  45.  
  46. /* The number of bits in a 'long int'.  */
  47. #define LONGBITS 32
  48. /* Minimum value that can be represented by a 'signed long int'.  */
  49. #define LONG_MIN    (long)(0x80000000UL)
  50. /* Maximum values that can be represented by a 'signed long int'
  51.    and 'unsigned long int'.  */
  52. #define LONG_MAX    0x7fffffffL
  53. #define ULONG_MAX    0xffffffffUL
  54.  
  55. /* The minimum value that can be represented by a
  56.    'signed long long int'.  */
  57. #define LONG_LONG_MIN 0x8000000000000000LL
  58. /* The maximum values that can be represented by a
  59.    'signed long long int' and 'unsigned long long int'.  */
  60. #define LONG_LONG_MAX 0x7fffffffffffffffLL
  61. #define ULONG_LONG_MAX 0xffffffffffffffffULL
  62.  
  63. #define QUAD_MAX LONG_LONG_MAX
  64.  
  65.  
  66. /* POSIX Standard 2.9.2: Minimum Values <limits.h>.  */
  67.  
  68. /* These are the standard-mandated minimum values.  */
  69.  
  70. /* Maximum length of arguments to `execve', including environment.  */
  71. #define    _POSIX_ARG_MAX        1024
  72. #define ARG_MAX _POSIX_ARG_MAX
  73.  
  74. /* Maximum simultaneous processes per real user ID.  */
  75. #define    _POSIX_CHILD_MAX    1
  76. #define CHILD_MAX _POSIX_CHILD_MAX
  77.  
  78. /* Maximum link count of a file.  */
  79. #define    _POSIX_LINK_MAX        1
  80. #define LINK_MAX _POSIX_LINK_MAX
  81.  
  82. /* Number of bytes in a terminal canonical input queue.  */
  83. #define    _POSIX_MAX_CANON    256
  84. #define MAX_CANON _POSIX_MAX_CANON
  85.  
  86. /* Number of bytes for which space will be
  87.    available in a terminal input queue.  */
  88. #define    _POSIX_MAX_INPUT    256
  89. #define MAX_INPUT _POSIX_MAX_INPUT
  90.  
  91. /* Number of simultaneous supplementary group IDs per process.  */
  92. #define    _POSIX_NGROUPS_MAX    0
  93. #define NGROUPS_MAX _POSIX_NGROUPS_MAX
  94.  
  95. /* Number of files one process can have open at once.
  96.    Keep in sync with <stdio.h>, FOPEN_MAX.  */
  97. #define    _POSIX_OPEN_MAX        64
  98. #define OPEN_MAX _POSIX_OPEN_MAX
  99.  
  100. /* Number of bytes in a filename.
  101.    Keep in sync with <stdio.h>, FILENAME_MAX.  */
  102. #define    _POSIX_NAME_MAX        252
  103. #define NAME_MAX _POSIX_NAME_MAX
  104.  
  105. /* Number of bytes in a pathname.  */
  106. #define    _POSIX_PATH_MAX        256
  107. #define PATH_MAX _POSIX_PATH_MAX
  108.  
  109. /* Number of bytes than can be written atomically to a pipe.  */
  110. #define    _POSIX_PIPE_BUF        512
  111. #define PIPE_BUF _POSIX_PIPE_BUF
  112.  
  113. /* Largest value of a `ssize_t'.  */
  114. #define    _POSIX_SSIZE_MAX    INT_MAX
  115. #define SSIZE_MAX _POSIX_SSIZE_MAX
  116.  
  117. /* Number of streams a process can have open at once.  */
  118. #define    _POSIX_STREAM_MAX    8
  119. #define STREAM_MAX _POSIX_STREAM_MAX
  120.  
  121. /* Maximum length of a timezone name (element of `tzname').  */
  122. #define    _POSIX_TZNAME_MAX    3
  123. #define TZNAME_MAX _POSIX_TZNAME_MAX
  124.  
  125.  
  126. /* POSIX2 limits.  */
  127.  
  128. /* The maximum `ibase' and `obase' values allowed by the `bc' utility.  */
  129. #define    _POSIX2_BC_BASE_MAX    99
  130. #define    BC_BASE_MAX    _POSIX2_BC_BASE_MAX
  131.  
  132. /* The maximum number of elements allowed in an array by the `bc' utility.  */
  133. #define    _POSIX2_BC_DIM_MAX    2048
  134. #define    BC_DIM_MAX    _POSIX2_BC_DIM_MAX
  135.  
  136. /* The maximum `scale' value allowed by the `bc' utility.  */
  137. #define    _POSIX2_BC_SCALE_MAX    99
  138. #define    BC_SCALE_MAX    _POSIX2_BC_SCALE_MAX
  139.  
  140. /* The maximum length of a string constant accepted by the `bc' utility.  */
  141. #define    _POSIX2_BC_STRING_MAX    1000
  142. #define    BC_STRING_MAX    _POSIX2_BC_STRING_MAX
  143.  
  144. /* The maximum number of weights that can be assigned to an entry of
  145.    the LC_COLLATE category `order' keyword in a locale definition.  */
  146. #define    _POSIX2_EQUIV_CLASS_MAX    2
  147. #define    EQUIV_CLASS_MAX    _POSIX2_EQUIV_CLASS_MAX
  148.  
  149. /* The maximum number of expressions that can be nested
  150.    within parentheses by the `expr' utility.  */
  151. #define    _POSIX2_EXPR_NEST_MAX    32
  152. #define    EXPR_NEST_MAX    _POSIX2_EXPR_NEST_MAX
  153.  
  154. /* The maximum length, in bytes, of an input line.  */
  155. #define    _POSIX2_LINE_MAX    2048
  156. #define    LINE_MAX    _POSIX2_LINE_MAX
  157.  
  158. /* The maximum number of repeated occurrences of a regular expression
  159.    permitted when using the interval notation `\{M,N\}'.  */
  160. #define    _POSIX2_RE_DUP_MAX    255
  161. /* This value is defined like this in regex.h.  */
  162. #define    RE_DUP_MAX    (0x7fff)
  163.  
  164. #endif
  165.