master
  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
 10#ifndef _LIBCPP_CINTTYPES
 11#define _LIBCPP_CINTTYPES
 12
 13/*
 14    cinttypes synopsis
 15
 16This entire header is C99 / C++0X
 17
 18#include <cstdint>  // <cinttypes> includes <cstdint>
 19
 20Macros:
 21
 22    PRId8
 23    PRId16
 24    PRId32
 25    PRId64
 26
 27    PRIdLEAST8
 28    PRIdLEAST16
 29    PRIdLEAST32
 30    PRIdLEAST64
 31
 32    PRIdFAST8
 33    PRIdFAST16
 34    PRIdFAST32
 35    PRIdFAST64
 36
 37    PRIdMAX
 38    PRIdPTR
 39
 40    PRIi8
 41    PRIi16
 42    PRIi32
 43    PRIi64
 44
 45    PRIiLEAST8
 46    PRIiLEAST16
 47    PRIiLEAST32
 48    PRIiLEAST64
 49
 50    PRIiFAST8
 51    PRIiFAST16
 52    PRIiFAST32
 53    PRIiFAST64
 54
 55    PRIiMAX
 56    PRIiPTR
 57
 58    PRIo8
 59    PRIo16
 60    PRIo32
 61    PRIo64
 62
 63    PRIoLEAST8
 64    PRIoLEAST16
 65    PRIoLEAST32
 66    PRIoLEAST64
 67
 68    PRIoFAST8
 69    PRIoFAST16
 70    PRIoFAST32
 71    PRIoFAST64
 72
 73    PRIoMAX
 74    PRIoPTR
 75
 76    PRIu8
 77    PRIu16
 78    PRIu32
 79    PRIu64
 80
 81    PRIuLEAST8
 82    PRIuLEAST16
 83    PRIuLEAST32
 84    PRIuLEAST64
 85
 86    PRIuFAST8
 87    PRIuFAST16
 88    PRIuFAST32
 89    PRIuFAST64
 90
 91    PRIuMAX
 92    PRIuPTR
 93
 94    PRIx8
 95    PRIx16
 96    PRIx32
 97    PRIx64
 98
 99    PRIxLEAST8
100    PRIxLEAST16
101    PRIxLEAST32
102    PRIxLEAST64
103
104    PRIxFAST8
105    PRIxFAST16
106    PRIxFAST32
107    PRIxFAST64
108
109    PRIxMAX
110    PRIxPTR
111
112    PRIX8
113    PRIX16
114    PRIX32
115    PRIX64
116
117    PRIXLEAST8
118    PRIXLEAST16
119    PRIXLEAST32
120    PRIXLEAST64
121
122    PRIXFAST8
123    PRIXFAST16
124    PRIXFAST32
125    PRIXFAST64
126
127    PRIXMAX
128    PRIXPTR
129
130    SCNd8
131    SCNd16
132    SCNd32
133    SCNd64
134
135    SCNdLEAST8
136    SCNdLEAST16
137    SCNdLEAST32
138    SCNdLEAST64
139
140    SCNdFAST8
141    SCNdFAST16
142    SCNdFAST32
143    SCNdFAST64
144
145    SCNdMAX
146    SCNdPTR
147
148    SCNi8
149    SCNi16
150    SCNi32
151    SCNi64
152
153    SCNiLEAST8
154    SCNiLEAST16
155    SCNiLEAST32
156    SCNiLEAST64
157
158    SCNiFAST8
159    SCNiFAST16
160    SCNiFAST32
161    SCNiFAST64
162
163    SCNiMAX
164    SCNiPTR
165
166    SCNo8
167    SCNo16
168    SCNo32
169    SCNo64
170
171    SCNoLEAST8
172    SCNoLEAST16
173    SCNoLEAST32
174    SCNoLEAST64
175
176    SCNoFAST8
177    SCNoFAST16
178    SCNoFAST32
179    SCNoFAST64
180
181    SCNoMAX
182    SCNoPTR
183
184    SCNu8
185    SCNu16
186    SCNu32
187    SCNu64
188
189    SCNuLEAST8
190    SCNuLEAST16
191    SCNuLEAST32
192    SCNuLEAST64
193
194    SCNuFAST8
195    SCNuFAST16
196    SCNuFAST32
197    SCNuFAST64
198
199    SCNuMAX
200    SCNuPTR
201
202    SCNx8
203    SCNx16
204    SCNx32
205    SCNx64
206
207    SCNxLEAST8
208    SCNxLEAST16
209    SCNxLEAST32
210    SCNxLEAST64
211
212    SCNxFAST8
213    SCNxFAST16
214    SCNxFAST32
215    SCNxFAST64
216
217    SCNxMAX
218    SCNxPTR
219
220namespace std
221{
222
223Types:
224
225    imaxdiv_t
226
227intmax_t  imaxabs(intmax_t j);
228imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
229intmax_t  strtoimax(const char* restrict nptr, char** restrict endptr, int base);
230uintmax_t strtoumax(const char* restrict nptr, char** restrict endptr, int base);
231intmax_t  wcstoimax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
232uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
233
234}  // std
235*/
236
237#if __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
238#  include <__cxx03/cinttypes>
239#else
240#  include <__config>
241
242// standard-mandated includes
243
244// [cinttypes.syn]
245#  include <cstdint>
246
247#  include <inttypes.h>
248
249#  ifndef _LIBCPP_INTTYPES_H
250#   error <cinttypes> tried including <inttypes.h> but didn't find libc++'s <inttypes.h> header. \
251          This usually means that your header search paths are not configured properly. \
252          The header search paths should contain the C++ Standard Library headers before \
253          any C Standard Library, and you are probably using compiler flags that make that \
254          not be the case.
255#  endif
256
257#  if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
258#    pragma GCC system_header
259#  endif
260
261_LIBCPP_BEGIN_NAMESPACE_STD
262
263using ::imaxdiv_t _LIBCPP_USING_IF_EXISTS;
264using ::imaxabs _LIBCPP_USING_IF_EXISTS;
265using ::imaxdiv _LIBCPP_USING_IF_EXISTS;
266using ::strtoimax _LIBCPP_USING_IF_EXISTS;
267using ::strtoumax _LIBCPP_USING_IF_EXISTS;
268using ::wcstoimax _LIBCPP_USING_IF_EXISTS;
269using ::wcstoumax _LIBCPP_USING_IF_EXISTS;
270
271_LIBCPP_END_NAMESPACE_STD
272
273#endif // __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
274
275#endif // _LIBCPP_CINTTYPES