home *** CD-ROM | disk | FTP | other *** search
/ Zodiac Super OZ / MEDIADEPOT.ISO / FILES / 13 / DJCRX201.ZIP / include / limits.h < prev    next >
C/C++ Source or Header  |  1996-05-24  |  2KB  |  84 lines

  1. /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
  2. #ifndef __dj_include_limits_h_
  3. #define __dj_include_limits_h_
  4.  
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8.  
  9. #define CHAR_BIT 8
  10. #define CHAR_MAX 127
  11. #define CHAR_MIN (-128)
  12. #define INT_MAX 2147483647
  13. #define INT_MIN (-2147483647-1)
  14. #define LONG_MAX 2147483647L
  15. #define LONG_MIN (-2147483647L-1L)
  16. #define MB_LEN_MAX 5
  17. #define SCHAR_MAX 127
  18. #define SCHAR_MIN (-128)
  19. #define SHRT_MAX 32767
  20. #define SHRT_MIN (-32768)
  21. #define UCHAR_MAX 255
  22. #define UINT_MAX 4294967295U
  23. #define ULONG_MAX 4294967295UL
  24. #define USHRT_MAX 65535
  25.  
  26. #ifndef __dj_ENFORCE_ANSI_FREESTANDING
  27.  
  28. #ifndef __STRICT_ANSI__
  29.  
  30. #define _POSIX_ARG_MAX        4096    /* but only for exec's to other djgpp programs */
  31. #define _POSIX_CHILD_MAX    6    /* really limited by memory */
  32. #define _POSIX_LINK_MAX        1    /* POSIX says 8, but DOS says 1 */
  33. #define _POSIX_MAX_CANON    126    /* POSIX says 255, but DOS says 126 */
  34. #define _POSIX_MAX_INPUT    126    /* POSIX says 255, but DOS says 126 */
  35. #define _POSIX_NAME_MAX        12    /* 8.3 */
  36. #define _POSIX_NGROUPS_MAX    0
  37. #define _POSIX_OPEN_MAX        20    /* can be bigger in DOS, but defaults to 20 */
  38. #define _POSIX_PATH_MAX        255    /* 80 for canonical paths */
  39. #define _POSIX_PIPE_BUF        512    /* but there aren't any pipes */
  40. #define _POSIX_SSIZE_MAX    2147483647
  41. #define _POSIX_STREAM_MAX    20    /* can be bigger in DOS */
  42. #define _POSIX_TZNAME_MAX    5
  43.  
  44. #define NGROUPS_MAX        0
  45.  
  46. #define ARG_MAX            4096
  47. #define CHILD_MAX        6
  48. /* #define OPEN_MAX        20 - DOS can change this */
  49. /* #define STREAM_MAX        20 - DOS can change this */
  50. #define TZNAME_MAX        3
  51.  
  52. #define LINK_MAX        1
  53. #define MAX_CANON        126
  54. #define MAX_INPUT        126
  55. #define NAME_MAX        12    /* 8.3 */
  56. #define PATH_MAX        512    /* for future expansion */
  57. #define PIPE_BUF        512    /* but there aren't any pipes */
  58.  
  59. #define SSIZE_MAX        2147483647
  60.  
  61. #ifndef _POSIX_SOURCE
  62.  
  63. /* constants used in Solaris */
  64. #define LLONG_MIN       (-9223372036854775807LL-1LL)
  65. #define LLONG_MAX       9223372036854775807LL
  66. #define ULLONG_MAX      18446744073709551615ULL
  67. /* gnuc ones */
  68. #define LONG_LONG_MIN    LLONG_MIN
  69. #define LONG_LONG_MAX    LLONG_MAX
  70. #define ULONG_LONG_MAX    ULLONG_MAX
  71.  
  72. #endif /* !_POSIX_SOURCE */
  73. #endif /* !__STRICT_ANSI__ */
  74. #endif /* !__dj_ENFORCE_ANSI_FREESTANDING */
  75.  
  76. #ifndef __dj_ENFORCE_FUNCTION_CALLS
  77. #endif /* !__dj_ENFORCE_FUNCTION_CALLS */
  78.  
  79. #ifdef __cplusplus
  80. }
  81. #endif
  82.  
  83. #endif /* !__dj_include_limits_h_ */
  84.