stdint.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP_STDINT_H
  10. // AIX system headers need stdint.h to be re-enterable while _STD_TYPES_T
  11. // is defined until an inclusion of it without _STD_TYPES_T occurs, in which
  12. // case the header guard macro is defined.
  13. #if !defined(_AIX) || !defined(_STD_TYPES_T)
  14. #define _LIBCPP_STDINT_H
  15. #endif // _STD_TYPES_T
  16. /*
  17. stdint.h synopsis
  18. Macros:
  19. INT8_MIN
  20. INT16_MIN
  21. INT32_MIN
  22. INT64_MIN
  23. INT8_MAX
  24. INT16_MAX
  25. INT32_MAX
  26. INT64_MAX
  27. UINT8_MAX
  28. UINT16_MAX
  29. UINT32_MAX
  30. UINT64_MAX
  31. INT_LEAST8_MIN
  32. INT_LEAST16_MIN
  33. INT_LEAST32_MIN
  34. INT_LEAST64_MIN
  35. INT_LEAST8_MAX
  36. INT_LEAST16_MAX
  37. INT_LEAST32_MAX
  38. INT_LEAST64_MAX
  39. UINT_LEAST8_MAX
  40. UINT_LEAST16_MAX
  41. UINT_LEAST32_MAX
  42. UINT_LEAST64_MAX
  43. INT_FAST8_MIN
  44. INT_FAST16_MIN
  45. INT_FAST32_MIN
  46. INT_FAST64_MIN
  47. INT_FAST8_MAX
  48. INT_FAST16_MAX
  49. INT_FAST32_MAX
  50. INT_FAST64_MAX
  51. UINT_FAST8_MAX
  52. UINT_FAST16_MAX
  53. UINT_FAST32_MAX
  54. UINT_FAST64_MAX
  55. INTPTR_MIN
  56. INTPTR_MAX
  57. UINTPTR_MAX
  58. INTMAX_MIN
  59. INTMAX_MAX
  60. UINTMAX_MAX
  61. PTRDIFF_MIN
  62. PTRDIFF_MAX
  63. SIG_ATOMIC_MIN
  64. SIG_ATOMIC_MAX
  65. SIZE_MAX
  66. WCHAR_MIN
  67. WCHAR_MAX
  68. WINT_MIN
  69. WINT_MAX
  70. INT8_C(value)
  71. INT16_C(value)
  72. INT32_C(value)
  73. INT64_C(value)
  74. UINT8_C(value)
  75. UINT16_C(value)
  76. UINT32_C(value)
  77. UINT64_C(value)
  78. INTMAX_C(value)
  79. UINTMAX_C(value)
  80. */
  81. #include <__config>
  82. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  83. # pragma GCC system_header
  84. #endif
  85. /* C99 stdlib (e.g. glibc < 2.18) does not provide macros needed
  86. for C++11 unless __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS
  87. are defined
  88. */
  89. #if defined(__cplusplus) && !defined(__STDC_LIMIT_MACROS)
  90. # define __STDC_LIMIT_MACROS
  91. #endif
  92. #if defined(__cplusplus) && !defined(__STDC_CONSTANT_MACROS)
  93. # define __STDC_CONSTANT_MACROS
  94. #endif
  95. #if __has_include_next(<stdint.h>)
  96. # include_next <stdint.h>
  97. #endif
  98. #endif // _LIBCPP_STDINT_H