cstdint 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200
  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_CSTDINT
  10. #define _LIBCPP_CSTDINT
  11. /*
  12. cstdint synopsis
  13. Macros:
  14. INT8_MIN
  15. INT16_MIN
  16. INT32_MIN
  17. INT64_MIN
  18. INT8_MAX
  19. INT16_MAX
  20. INT32_MAX
  21. INT64_MAX
  22. UINT8_MAX
  23. UINT16_MAX
  24. UINT32_MAX
  25. UINT64_MAX
  26. INT_LEAST8_MIN
  27. INT_LEAST16_MIN
  28. INT_LEAST32_MIN
  29. INT_LEAST64_MIN
  30. INT_LEAST8_MAX
  31. INT_LEAST16_MAX
  32. INT_LEAST32_MAX
  33. INT_LEAST64_MAX
  34. UINT_LEAST8_MAX
  35. UINT_LEAST16_MAX
  36. UINT_LEAST32_MAX
  37. UINT_LEAST64_MAX
  38. INT_FAST8_MIN
  39. INT_FAST16_MIN
  40. INT_FAST32_MIN
  41. INT_FAST64_MIN
  42. INT_FAST8_MAX
  43. INT_FAST16_MAX
  44. INT_FAST32_MAX
  45. INT_FAST64_MAX
  46. UINT_FAST8_MAX
  47. UINT_FAST16_MAX
  48. UINT_FAST32_MAX
  49. UINT_FAST64_MAX
  50. INTPTR_MIN
  51. INTPTR_MAX
  52. UINTPTR_MAX
  53. INTMAX_MIN
  54. INTMAX_MAX
  55. UINTMAX_MAX
  56. PTRDIFF_MIN
  57. PTRDIFF_MAX
  58. SIG_ATOMIC_MIN
  59. SIG_ATOMIC_MAX
  60. SIZE_MAX
  61. WCHAR_MIN
  62. WCHAR_MAX
  63. WINT_MIN
  64. WINT_MAX
  65. INT8_C(value)
  66. INT16_C(value)
  67. INT32_C(value)
  68. INT64_C(value)
  69. UINT8_C(value)
  70. UINT16_C(value)
  71. UINT32_C(value)
  72. UINT64_C(value)
  73. INTMAX_C(value)
  74. UINTMAX_C(value)
  75. namespace std
  76. {
  77. Types:
  78. int8_t
  79. int16_t
  80. int32_t
  81. int64_t
  82. uint8_t
  83. uint16_t
  84. uint32_t
  85. uint64_t
  86. int_least8_t
  87. int_least16_t
  88. int_least32_t
  89. int_least64_t
  90. uint_least8_t
  91. uint_least16_t
  92. uint_least32_t
  93. uint_least64_t
  94. int_fast8_t
  95. int_fast16_t
  96. int_fast32_t
  97. int_fast64_t
  98. uint_fast8_t
  99. uint_fast16_t
  100. uint_fast32_t
  101. uint_fast64_t
  102. intptr_t
  103. uintptr_t
  104. intmax_t
  105. uintmax_t
  106. } // std
  107. */
  108. #include <__assert> // all public C++ headers provide the assertion handler
  109. #include <__config>
  110. #include <stdint.h>
  111. #ifndef _LIBCPP_STDINT_H
  112. # error <cstdint> tried including <stdint.h> but didn't find libc++'s <stdint.h> header. \
  113. This usually means that your header search paths are not configured properly. \
  114. The header search paths should contain the C++ Standard Library headers before \
  115. any C Standard Library, and you are probably using compiler flags that make that \
  116. not be the case.
  117. #endif
  118. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  119. # pragma GCC system_header
  120. #endif
  121. _LIBCPP_BEGIN_NAMESPACE_STD
  122. using ::int8_t _LIBCPP_USING_IF_EXISTS;
  123. using ::int16_t _LIBCPP_USING_IF_EXISTS;
  124. using ::int32_t _LIBCPP_USING_IF_EXISTS;
  125. using ::int64_t _LIBCPP_USING_IF_EXISTS;
  126. using ::uint8_t _LIBCPP_USING_IF_EXISTS;
  127. using ::uint16_t _LIBCPP_USING_IF_EXISTS;
  128. using ::uint32_t _LIBCPP_USING_IF_EXISTS;
  129. using ::uint64_t _LIBCPP_USING_IF_EXISTS;
  130. using ::int_least8_t _LIBCPP_USING_IF_EXISTS;
  131. using ::int_least16_t _LIBCPP_USING_IF_EXISTS;
  132. using ::int_least32_t _LIBCPP_USING_IF_EXISTS;
  133. using ::int_least64_t _LIBCPP_USING_IF_EXISTS;
  134. using ::uint_least8_t _LIBCPP_USING_IF_EXISTS;
  135. using ::uint_least16_t _LIBCPP_USING_IF_EXISTS;
  136. using ::uint_least32_t _LIBCPP_USING_IF_EXISTS;
  137. using ::uint_least64_t _LIBCPP_USING_IF_EXISTS;
  138. using ::int_fast8_t _LIBCPP_USING_IF_EXISTS;
  139. using ::int_fast16_t _LIBCPP_USING_IF_EXISTS;
  140. using ::int_fast32_t _LIBCPP_USING_IF_EXISTS;
  141. using ::int_fast64_t _LIBCPP_USING_IF_EXISTS;
  142. using ::uint_fast8_t _LIBCPP_USING_IF_EXISTS;
  143. using ::uint_fast16_t _LIBCPP_USING_IF_EXISTS;
  144. using ::uint_fast32_t _LIBCPP_USING_IF_EXISTS;
  145. using ::uint_fast64_t _LIBCPP_USING_IF_EXISTS;
  146. using ::intptr_t _LIBCPP_USING_IF_EXISTS;
  147. using ::uintptr_t _LIBCPP_USING_IF_EXISTS;
  148. using ::intmax_t _LIBCPP_USING_IF_EXISTS;
  149. using ::uintmax_t _LIBCPP_USING_IF_EXISTS;
  150. _LIBCPP_END_NAMESPACE_STD
  151. #endif // _LIBCPP_CSTDINT