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_INTTYPES_H
11 // AIX system headers need inttypes.h to be re-enterable while _STD_TYPES_T
12 // is defined until an inclusion of it without _STD_TYPES_T occurs, in which
13 // case the header guard macro is defined.
14 #if !defined(_AIX) || !defined(_STD_TYPES_T)
15 #define _LIBCPP_INTTYPES_H
16 #endif // _STD_TYPES_T
21 This entire header is C99 / C++0X
23 #include <stdint.h> // <cinttypes> includes <cstdint>
229 intmax_t imaxabs(intmax_t j);
230 imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
231 intmax_t strtoimax(const char* restrict nptr, char** restrict endptr, int base);
232 uintmax_t strtoumax(const char* restrict nptr, char** restrict endptr, int base);
233 intmax_t wcstoimax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
234 uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
240 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
241 #pragma GCC system_header
244 /* C99 stdlib (e.g. glibc < 2.18) does not provide format macros needed
245 for C++11 unless __STDC_FORMAT_MACROS is defined
247 #if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
248 # define __STDC_FORMAT_MACROS
251 #include_next <inttypes.h>
260 #endif // __cplusplus
262 #endif // _LIBCPP_INTTYPES_H