home *** CD-ROM | disk | FTP | other *** search
/ Enter 2004 January / enter-2004-01.iso / files / maxima-5.9.0.exe / {app} / lib / gcc-lib / mingw32 / 3.2 / include / limits.h < prev    next >
Encoding:
C/C++ Source or Header  |  2003-02-09  |  3.6 KB  |  136 lines

  1. /* This administrivia gets added to the beginning of limits.h
  2.    if the system has its own version of limits.h.  */
  3.  
  4. /* We use _GCC_LIMITS_H_ because we want this not to match
  5.    any macros that the system's limits.h uses for its own purposes.  */
  6. #ifndef _GCC_LIMITS_H_  /* Terminated in limity.h.  */
  7. #define _GCC_LIMITS_H_
  8.  
  9. #ifndef _LIBC_LIMITS_H_
  10. /* Use "..." so that we find syslimits.h only in this same directory.  */
  11. #include "syslimits.h"
  12. #endif
  13. #ifndef _LIMITS_H___
  14. #define _LIMITS_H___
  15.  
  16. /* Number of bits in a `char'.  */
  17. #undef CHAR_BIT
  18. #define CHAR_BIT 8
  19.  
  20. /* Maximum length of a multibyte character.  */
  21. #ifndef MB_LEN_MAX
  22. #define MB_LEN_MAX 1
  23. #endif
  24.  
  25. /* Minimum and maximum values a `signed char' can hold.  */
  26. #undef SCHAR_MIN
  27. #define SCHAR_MIN (-128)
  28. #undef SCHAR_MAX
  29. #define SCHAR_MAX 127
  30.  
  31. /* Maximum value an `unsigned char' can hold.  (Minimum is 0).  */
  32. #undef UCHAR_MAX
  33. #define UCHAR_MAX 255
  34.  
  35. /* Minimum and maximum values a `char' can hold.  */
  36. #ifdef __CHAR_UNSIGNED__
  37. #undef CHAR_MIN
  38. #define CHAR_MIN 0
  39. #undef CHAR_MAX
  40. #define CHAR_MAX 255
  41. #else
  42. #undef CHAR_MIN
  43. #define CHAR_MIN (-128)
  44. #undef CHAR_MAX
  45. #define CHAR_MAX 127
  46. #endif
  47.  
  48. #ifndef __SHRT_MAX__
  49. #define __SHRT_MAX__ 32767
  50. #endif
  51.  
  52. /* Minimum and maximum values a `signed short int' can hold.  */
  53. #undef SHRT_MIN
  54. #define SHRT_MIN (-SHRT_MAX-1)
  55. #undef SHRT_MAX
  56. #define SHRT_MAX __SHRT_MAX__
  57.  
  58. /* Minimum and maximum values a `signed int' can hold.  */
  59. #ifndef __INT_MAX__
  60. #define __INT_MAX__ 2147483647
  61. #endif
  62. #undef INT_MIN
  63. #define INT_MIN (-INT_MAX-1)
  64. #undef INT_MAX
  65. #define INT_MAX __INT_MAX__
  66.  
  67. /* Maximum value an `unsigned short int' can hold.  (Minimum is 0).  */
  68. #undef USHRT_MAX
  69. #if __SHRT_MAX__ == __INT_MAX__
  70. #define USHRT_MAX (SHRT_MAX * 2U + 1U)
  71. #else
  72. #define USHRT_MAX (SHRT_MAX * 2 + 1)
  73. #endif
  74.  
  75. /* Maximum value an `unsigned int' can hold.  (Minimum is 0).  */
  76. #undef UINT_MAX
  77. #define UINT_MAX (INT_MAX * 2U + 1)
  78.  
  79. /* Minimum and maximum values a `signed long int' can hold.
  80.    (Same as `int').  */
  81. #ifndef __LONG_MAX__
  82. #if defined (__alpha__) || (defined (__sparc__) && defined(__arch64__)) || defined (__sparcv9)
  83. #define __LONG_MAX__ 9223372036854775807L
  84. #else
  85. #define __LONG_MAX__ 2147483647L
  86. #endif /* __alpha__ || sparc64 */
  87. #endif
  88. #undef LONG_MIN
  89. #define LONG_MIN (-LONG_MAX-1)
  90. #undef LONG_MAX
  91. #define LONG_MAX __LONG_MAX__
  92.  
  93. /* Maximum value an `unsigned long int' can hold.  (Minimum is 0).  */
  94. #undef ULONG_MAX
  95. #define ULONG_MAX (LONG_MAX * 2UL + 1)
  96.  
  97. #ifndef __LONG_LONG_MAX__
  98. #define __LONG_LONG_MAX__ 9223372036854775807LL
  99. #endif
  100.  
  101. #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
  102. /* Minimum and maximum values a `signed long long int' can hold.  */
  103. #undef LLONG_MIN
  104. #define LLONG_MIN (-LLONG_MAX-1)
  105. #undef LLONG_MAX
  106. #define LLONG_MAX __LONG_LONG_MAX__
  107.  
  108. /* Maximum value an `unsigned long long int' can hold.  (Minimum is 0).  */
  109. #undef ULLONG_MAX
  110. #define ULLONG_MAX (LLONG_MAX * 2ULL + 1)
  111. #endif
  112.  
  113. #if defined (__GNU_LIBRARY__) ? defined (__USE_GNU) : !defined (__STRICT_ANSI__)
  114. /* Minimum and maximum values a `signed long long int' can hold.  */
  115. #undef LONG_LONG_MIN
  116. #define LONG_LONG_MIN (-LONG_LONG_MAX-1)
  117. #undef LONG_LONG_MAX
  118. #define LONG_LONG_MAX __LONG_LONG_MAX__
  119.  
  120. /* Maximum value an `unsigned long long int' can hold.  (Minimum is 0).  */
  121. #undef ULONG_LONG_MAX
  122. #define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1)
  123. #endif
  124.  
  125. #endif /* _LIMITS_H___ */
  126. /* This administrivia gets added to the end of limits.h
  127.    if the system has its own version of limits.h.  */
  128.  
  129. #else /* not _GCC_LIMITS_H_ */
  130.  
  131. #ifdef _GCC_NEXT_LIMITS_H
  132. #include_next <limits.h>        /* recurse down to the real one */
  133. #endif
  134.  
  135. #endif /* not _GCC_LIMITS_H_ */
  136.