2 //===----------------------------------------------------------------------===//
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
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP_CINTTYPES
11 #define _LIBCPP_CINTTYPES
16 This entire header is C99 / C++0X
18 #include <__cxx03/cstdint> // <cinttypes> includes <cstdint>
227 intmax_t imaxabs(intmax_t j);
228 imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
229 intmax_t strtoimax(const char* restrict nptr, char** restrict endptr, int base);
230 uintmax_t strtoumax(const char* restrict nptr, char** restrict endptr, int base);
231 intmax_t wcstoimax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
232 uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
237 #include <__cxx03/__config>
239 // standard-mandated includes
242 #include <__cxx03/cstdint>
244 #include <__cxx03/inttypes.h>
246 #ifndef _LIBCPP_INTTYPES_H
247 # error <cinttypes> tried including <inttypes.h> but didn't find libc++'s <inttypes.h> header. \
248 This usually means that your header search paths are not configured properly. \
249 The header search paths should contain the C++ Standard Library headers before \
250 any C Standard Library, and you are probably using compiler flags that make that \
254 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
255 # pragma GCC system_header
258 _LIBCPP_BEGIN_NAMESPACE_STD
260 using ::imaxdiv_t _LIBCPP_USING_IF_EXISTS;
261 using ::imaxabs _LIBCPP_USING_IF_EXISTS;
262 using ::imaxdiv _LIBCPP_USING_IF_EXISTS;
263 using ::strtoimax _LIBCPP_USING_IF_EXISTS;
264 using ::strtoumax _LIBCPP_USING_IF_EXISTS;
265 using ::wcstoimax _LIBCPP_USING_IF_EXISTS;
266 using ::wcstoumax _LIBCPP_USING_IF_EXISTS;
268 _LIBCPP_END_NAMESPACE_STD
270 #endif // _LIBCPP_CINTTYPES