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 <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 <__assert> // all public C++ headers provide the assertion handler
240 // standard-mandated includes
245 #include <inttypes.h>
247 #ifndef _LIBCPP_INTTYPES_H
248 # error <cinttypes> tried including <inttypes.h> but didn't find libc++'s <inttypes.h> header. \
249 This usually means that your header search paths are not configured properly. \
250 The header search paths should contain the C++ Standard Library headers before \
251 any C Standard Library, and you are probably using compiler flags that make that \
255 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
256 # pragma GCC system_header
259 _LIBCPP_BEGIN_NAMESPACE_STD
261 using ::imaxdiv_t _LIBCPP_USING_IF_EXISTS;
262 using ::imaxabs _LIBCPP_USING_IF_EXISTS;
263 using ::imaxdiv _LIBCPP_USING_IF_EXISTS;
264 using ::strtoimax _LIBCPP_USING_IF_EXISTS;
265 using ::strtoumax _LIBCPP_USING_IF_EXISTS;
266 using ::wcstoimax _LIBCPP_USING_IF_EXISTS;
267 using ::wcstoumax _LIBCPP_USING_IF_EXISTS;
269 _LIBCPP_END_NAMESPACE_STD
271 #endif // _LIBCPP_CINTTYPES