[libc++][C++03] Remove some of the C++03-specific C wrapper headers (#163772)

`include_next` doesn't work very well with the C++03 headers and
modules. Since these specific headers are very self-contained there
isn't much of a reason to split them into C++03/non-C++03 headers, so
let's just remove them. The few C wrapper headers that aren't as
self-contained will be refactored in a separate patch.
This commit is contained in:
Nikolas Klauser 2025-10-24 10:08:21 +02:00 committed by GitHub
parent 8ebec3d551
commit 44331d2594
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 486 additions and 1799 deletions

View file

@ -1593,7 +1593,6 @@ set(files
__cxx03/cmath
__cxx03/codecvt
__cxx03/complex
__cxx03/complex.h
__cxx03/condition_variable
__cxx03/csetjmp
__cxx03/csignal
@ -1606,25 +1605,20 @@ set(files
__cxx03/cstring
__cxx03/ctgmath
__cxx03/ctime
__cxx03/ctype.h
__cxx03/cuchar
__cxx03/cwchar
__cxx03/cwctype
__cxx03/deque
__cxx03/errno.h
__cxx03/exception
__cxx03/experimental/__config
__cxx03/experimental/utility
__cxx03/ext/__hash
__cxx03/ext/hash_map
__cxx03/ext/hash_set
__cxx03/fenv.h
__cxx03/float.h
__cxx03/forward_list
__cxx03/fstream
__cxx03/functional
__cxx03/future
__cxx03/inttypes.h
__cxx03/iomanip
__cxx03/ios
__cxx03/iosfwd
@ -1651,11 +1645,8 @@ set(files
__cxx03/sstream
__cxx03/stack
__cxx03/stdatomic.h
__cxx03/stdbool.h
__cxx03/stddef.h
__cxx03/stdexcept
__cxx03/stdint.h
__cxx03/stdio.h
__cxx03/stdlib.h
__cxx03/streambuf
__cxx03/string
@ -1663,7 +1654,6 @@ set(files
__cxx03/string_view
__cxx03/strstream
__cxx03/system_error
__cxx03/tgmath.h
__cxx03/thread
__cxx03/type_traits
__cxx03/typeindex
@ -1676,7 +1666,6 @@ set(files
__cxx03/vector
__cxx03/version
__cxx03/wchar.h
__cxx03/wctype.h
)
configure_file("__config_site.in" "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site" @ONLY)

View file

@ -14,7 +14,7 @@
#include <__cxx03/__chrono/duration.h>
#include <__cxx03/__config>
#include <__cxx03/ctime>
#include <__cxx03/errno.h>
#include <errno.h>
#include <pthread.h>
#include <sched.h>

View file

@ -36,9 +36,9 @@ int toupper(int c);
#include <__cxx03/__config>
#include <__cxx03/ctype.h>
#include <ctype.h>
#ifndef _LIBCPP___CXX03_CTYPE_H
#ifndef _LIBCPP_CTYPE_H
# error <cctype> tried including <ctype.h> but didn't find libc++'s <ctype.h> header. \
This usually means that your header search paths are not configured properly. \
The header search paths should contain the C++ Standard Library headers before \

View file

@ -24,9 +24,9 @@ Macros:
#include <__cxx03/__config>
#include <__cxx03/errno.h>
#include <errno.h>
#ifndef _LIBCPP___CXX03_ERRNO_H
#ifndef _LIBCPP_ERRNO_H
# error <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header. \
This usually means that your header search paths are not configured properly. \
The header search paths should contain the C++ Standard Library headers before \

View file

@ -54,9 +54,9 @@ int feupdateenv(const fenv_t* envp);
#include <__cxx03/__config>
#include <__cxx03/fenv.h>
#include <fenv.h>
#ifndef _LIBCPP___CXX03_FENV_H
#ifndef _LIBCPP_FENV_H
# error <cfenv> tried including <fenv.h> but didn't find libc++'s <fenv.h> header. \
This usually means that your header search paths are not configured properly. \
The header search paths should contain the C++ Standard Library headers before \

View file

@ -71,9 +71,9 @@ Macros:
#include <__cxx03/__config>
#include <__cxx03/float.h>
#include <float.h>
#ifndef _LIBCPP___CXX03_FLOAT_H
#ifndef _LIBCPP_FLOAT_H
# error <cfloat> tried including <float.h> but didn't find libc++'s <float.h> header. \
This usually means that your header search paths are not configured properly. \
The header search paths should contain the C++ Standard Library headers before \

View file

@ -241,9 +241,9 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
// [cinttypes.syn]
#include <__cxx03/cstdint>
#include <__cxx03/inttypes.h>
#include <inttypes.h>
#ifndef _LIBCPP___CXX03_INTTYPES_H
#ifndef _LIBCPP_INTTYPES_H
# error <cinttypes> tried including <inttypes.h> but didn't find libc++'s <inttypes.h> header. \
This usually means that your header search paths are not configured properly. \
The header search paths should contain the C++ Standard Library headers before \

View file

@ -1,32 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___CXX03_COMPLEX_H
#define _LIBCPP___CXX03_COMPLEX_H
/*
complex.h synopsis
#include <__cxx03/ccomplex>
*/
#include <__cxx03/__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#ifdef __cplusplus
# include <__cxx03/ccomplex>
#elif __has_include_next(<complex.h>)
# include_next <complex.h>
#endif
#endif // _LIBCPP___CXX03_COMPLEX_H

View file

@ -39,9 +39,9 @@ Types:
#include <__cxx03/__type_traits/is_integral.h>
#include <__cxx03/version>
#include <__cxx03/stddef.h>
#include <stddef.h>
#ifndef _LIBCPP___CXX03_STDDEF_H
#ifndef _LIBCPP_STDDEF_H
# error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \
This usually means that your header search paths are not configured properly. \
The header search paths should contain the C++ Standard Library headers before \

View file

@ -97,9 +97,9 @@ void perror(const char* s);
#include <__cxx03/__config>
#include <__cxx03/stdio.h>
#include <stdio.h>
#ifndef _LIBCPP___CXX03_STDIO_H
#ifndef _LIBCPP_STDIO_H
# error <cstdio> tried including <stdio.h> but didn't find libc++'s <stdio.h> header. \
This usually means that your header search paths are not configured properly. \
The header search paths should contain the C++ Standard Library headers before \

View file

@ -1,61 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___CXX03_CTYPE_H
#define _LIBCPP___CXX03_CTYPE_H
/*
ctype.h synopsis
int isalnum(int c);
int isalpha(int c);
int isblank(int c); // C99
int iscntrl(int c);
int isdigit(int c);
int isgraph(int c);
int islower(int c);
int isprint(int c);
int ispunct(int c);
int isspace(int c);
int isupper(int c);
int isxdigit(int c);
int tolower(int c);
int toupper(int c);
*/
#include <__cxx03/__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#if __has_include_next(<ctype.h>)
# include_next <ctype.h>
#endif
#ifdef __cplusplus
# undef isalnum
# undef isalpha
# undef isblank
# undef iscntrl
# undef isdigit
# undef isgraph
# undef islower
# undef isprint
# undef ispunct
# undef isspace
# undef isupper
# undef isxdigit
# undef tolower
# undef toupper
#endif
#endif // _LIBCPP___CXX03_CTYPE_H

View file

@ -52,9 +52,9 @@ wctrans_t wctrans(const char* property);
#include <__cxx03/__config>
#include <__cxx03/cctype>
#include <__cxx03/wctype.h>
#include <wctype.h>
#ifndef _LIBCPP___CXX03_WCTYPE_H
#ifndef _LIBCPP_WCTYPE_H
# error <cwctype> tried including <wctype.h> but didn't find libc++'s <wctype.h> header. \
This usually means that your header search paths are not configured properly. \
The header search paths should contain the C++ Standard Library headers before \

View file

@ -1,399 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___CXX03_ERRNO_H
#define _LIBCPP___CXX03_ERRNO_H
/*
errno.h synopsis
Macros:
EDOM
EILSEQ // C99
ERANGE
errno
*/
#include <__cxx03/__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#if __has_include_next(<errno.h>)
# include_next <errno.h>
#endif
#ifdef __cplusplus
# if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
# ifdef ELAST
static const int __elast1 = ELAST + 1;
static const int __elast2 = ELAST + 2;
# else
static const int __elast1 = 104;
static const int __elast2 = 105;
# endif
# ifdef ENOTRECOVERABLE
# define EOWNERDEAD __elast1
# ifdef ELAST
# undef ELAST
# define ELAST EOWNERDEAD
# endif
# elif defined(EOWNERDEAD)
# define ENOTRECOVERABLE __elast1
# ifdef ELAST
# undef ELAST
# define ELAST ENOTRECOVERABLE
# endif
# else // defined(EOWNERDEAD)
# define EOWNERDEAD __elast1
# define ENOTRECOVERABLE __elast2
# ifdef ELAST
# undef ELAST
# define ELAST ENOTRECOVERABLE
# endif
# endif // defined(EOWNERDEAD)
# endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
// supply errno values likely to be missing, particularly on Windows
# ifndef EAFNOSUPPORT
# define EAFNOSUPPORT 9901
# endif
# ifndef EADDRINUSE
# define EADDRINUSE 9902
# endif
# ifndef EADDRNOTAVAIL
# define EADDRNOTAVAIL 9903
# endif
# ifndef EISCONN
# define EISCONN 9904
# endif
# ifndef EBADMSG
# define EBADMSG 9905
# endif
# ifndef ECONNABORTED
# define ECONNABORTED 9906
# endif
# ifndef EALREADY
# define EALREADY 9907
# endif
# ifndef ECONNREFUSED
# define ECONNREFUSED 9908
# endif
# ifndef ECONNRESET
# define ECONNRESET 9909
# endif
# ifndef EDESTADDRREQ
# define EDESTADDRREQ 9910
# endif
# ifndef EHOSTUNREACH
# define EHOSTUNREACH 9911
# endif
# ifndef EIDRM
# define EIDRM 9912
# endif
# ifndef EMSGSIZE
# define EMSGSIZE 9913
# endif
# ifndef ENETDOWN
# define ENETDOWN 9914
# endif
# ifndef ENETRESET
# define ENETRESET 9915
# endif
# ifndef ENETUNREACH
# define ENETUNREACH 9916
# endif
# ifndef ENOBUFS
# define ENOBUFS 9917
# endif
# ifndef ENOLINK
# define ENOLINK 9918
# endif
# ifndef ENODATA
# define ENODATA 9919
# endif
# ifndef ENOMSG
# define ENOMSG 9920
# endif
# ifndef ENOPROTOOPT
# define ENOPROTOOPT 9921
# endif
# ifndef ENOSR
# define ENOSR 9922
# endif
# ifndef ENOTSOCK
# define ENOTSOCK 9923
# endif
# ifndef ENOSTR
# define ENOSTR 9924
# endif
# ifndef ENOTCONN
# define ENOTCONN 9925
# endif
# ifndef ENOTSUP
# define ENOTSUP 9926
# endif
# ifndef ECANCELED
# define ECANCELED 9927
# endif
# ifndef EINPROGRESS
# define EINPROGRESS 9928
# endif
# ifndef EOPNOTSUPP
# define EOPNOTSUPP 9929
# endif
# ifndef EWOULDBLOCK
# define EWOULDBLOCK 9930
# endif
# ifndef EOWNERDEAD
# define EOWNERDEAD 9931
# endif
# ifndef EPROTO
# define EPROTO 9932
# endif
# ifndef EPROTONOSUPPORT
# define EPROTONOSUPPORT 9933
# endif
# ifndef ENOTRECOVERABLE
# define ENOTRECOVERABLE 9934
# endif
# ifndef ETIME
# define ETIME 9935
# endif
# ifndef ETXTBSY
# define ETXTBSY 9936
# endif
# ifndef ETIMEDOUT
# define ETIMEDOUT 9938
# endif
# ifndef ELOOP
# define ELOOP 9939
# endif
# ifndef EOVERFLOW
# define EOVERFLOW 9940
# endif
# ifndef EPROTOTYPE
# define EPROTOTYPE 9941
# endif
# ifndef ENOSYS
# define ENOSYS 9942
# endif
# ifndef EINVAL
# define EINVAL 9943
# endif
# ifndef ERANGE
# define ERANGE 9944
# endif
# ifndef EILSEQ
# define EILSEQ 9945
# endif
// Windows Mobile doesn't appear to define these:
# ifndef E2BIG
# define E2BIG 9946
# endif
# ifndef EDOM
# define EDOM 9947
# endif
# ifndef EFAULT
# define EFAULT 9948
# endif
# ifndef EBADF
# define EBADF 9949
# endif
# ifndef EPIPE
# define EPIPE 9950
# endif
# ifndef EXDEV
# define EXDEV 9951
# endif
# ifndef EBUSY
# define EBUSY 9952
# endif
# ifndef ENOTEMPTY
# define ENOTEMPTY 9953
# endif
# ifndef ENOEXEC
# define ENOEXEC 9954
# endif
# ifndef EEXIST
# define EEXIST 9955
# endif
# ifndef EFBIG
# define EFBIG 9956
# endif
# ifndef ENAMETOOLONG
# define ENAMETOOLONG 9957
# endif
# ifndef ENOTTY
# define ENOTTY 9958
# endif
# ifndef EINTR
# define EINTR 9959
# endif
# ifndef ESPIPE
# define ESPIPE 9960
# endif
# ifndef EIO
# define EIO 9961
# endif
# ifndef EISDIR
# define EISDIR 9962
# endif
# ifndef ECHILD
# define ECHILD 9963
# endif
# ifndef ENOLCK
# define ENOLCK 9964
# endif
# ifndef ENOSPC
# define ENOSPC 9965
# endif
# ifndef ENXIO
# define ENXIO 9966
# endif
# ifndef ENODEV
# define ENODEV 9967
# endif
# ifndef ENOENT
# define ENOENT 9968
# endif
# ifndef ESRCH
# define ESRCH 9969
# endif
# ifndef ENOTDIR
# define ENOTDIR 9970
# endif
# ifndef ENOMEM
# define ENOMEM 9971
# endif
# ifndef EPERM
# define EPERM 9972
# endif
# ifndef EACCES
# define EACCES 9973
# endif
# ifndef EROFS
# define EROFS 9974
# endif
# ifndef EDEADLK
# define EDEADLK 9975
# endif
# ifndef EAGAIN
# define EAGAIN 9976
# endif
# ifndef ENFILE
# define ENFILE 9977
# endif
# ifndef EMFILE
# define EMFILE 9978
# endif
# ifndef EMLINK
# define EMLINK 9979
# endif
#endif // __cplusplus
#endif // _LIBCPP___CXX03_ERRNO_H

View file

@ -14,8 +14,8 @@
#include <__cxx03/__config>
#include <__cxx03/cstring>
#include <__cxx03/stddef.h>
#include <__cxx03/string>
#include <stddef.h>
namespace __gnu_cxx {

View file

@ -1,114 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___CXX03_FENV_H
#define _LIBCPP___CXX03_FENV_H
/*
fenv.h synopsis
This entire header is C99 / C++0X
Macros:
FE_DIVBYZERO
FE_INEXACT
FE_INVALID
FE_OVERFLOW
FE_UNDERFLOW
FE_ALL_EXCEPT
FE_DOWNWARD
FE_TONEAREST
FE_TOWARDZERO
FE_UPWARD
FE_DFL_ENV
Types:
fenv_t
fexcept_t
int feclearexcept(int excepts);
int fegetexceptflag(fexcept_t* flagp, int excepts);
int feraiseexcept(int excepts);
int fesetexceptflag(const fexcept_t* flagp, int excepts);
int fetestexcept(int excepts);
int fegetround();
int fesetround(int round);
int fegetenv(fenv_t* envp);
int feholdexcept(fenv_t* envp);
int fesetenv(const fenv_t* envp);
int feupdateenv(const fenv_t* envp);
*/
#include <__cxx03/__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#if __has_include_next(<fenv.h>)
# include_next <fenv.h>
#endif
#ifdef __cplusplus
extern "C++" {
# ifdef feclearexcept
# undef feclearexcept
# endif
# ifdef fegetexceptflag
# undef fegetexceptflag
# endif
# ifdef feraiseexcept
# undef feraiseexcept
# endif
# ifdef fesetexceptflag
# undef fesetexceptflag
# endif
# ifdef fetestexcept
# undef fetestexcept
# endif
# ifdef fegetround
# undef fegetround
# endif
# ifdef fesetround
# undef fesetround
# endif
# ifdef fegetenv
# undef fegetenv
# endif
# ifdef feholdexcept
# undef feholdexcept
# endif
# ifdef fesetenv
# undef fesetenv
# endif
# ifdef feupdateenv
# undef feupdateenv
# endif
} // extern "C++"
#endif // defined(__cplusplus)
#endif // _LIBCPP___CXX03_FENV_H

View file

@ -1,95 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___CXX03_FLOAT_H
#define _LIBCPP___CXX03_FLOAT_H
/*
float.h synopsis
Macros:
FLT_ROUNDS
FLT_EVAL_METHOD // C99
FLT_RADIX
FLT_MANT_DIG
DBL_MANT_DIG
LDBL_MANT_DIG
FLT_HAS_SUBNORM // C11
DBL_HAS_SUBNORM // C11
LDBL_HAS_SUBNORM // C11
DECIMAL_DIG // C99
FLT_DECIMAL_DIG // C11
DBL_DECIMAL_DIG // C11
LDBL_DECIMAL_DIG // C11
FLT_DIG
DBL_DIG
LDBL_DIG
FLT_MIN_EXP
DBL_MIN_EXP
LDBL_MIN_EXP
FLT_MIN_10_EXP
DBL_MIN_10_EXP
LDBL_MIN_10_EXP
FLT_MAX_EXP
DBL_MAX_EXP
LDBL_MAX_EXP
FLT_MAX_10_EXP
DBL_MAX_10_EXP
LDBL_MAX_10_EXP
FLT_MAX
DBL_MAX
LDBL_MAX
FLT_EPSILON
DBL_EPSILON
LDBL_EPSILON
FLT_MIN
DBL_MIN
LDBL_MIN
FLT_TRUE_MIN // C11
DBL_TRUE_MIN // C11
LDBL_TRUE_MIN // C11
*/
#include <__cxx03/__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#if __has_include_next(<float.h>)
# include_next <float.h>
#endif
#ifdef __cplusplus
# ifndef FLT_EVAL_METHOD
# define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
# endif
# ifndef DECIMAL_DIG
# define DECIMAL_DIG __DECIMAL_DIG__
# endif
#endif // __cplusplus
#endif // _LIBCPP___CXX03_FLOAT_H

View file

@ -1,264 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___CXX03_INTTYPES_H
// AIX system headers need inttypes.h to be re-enterable while _STD_TYPES_T
// is defined until an inclusion of it without _STD_TYPES_T occurs, in which
// case the header guard macro is defined.
#if !defined(_AIX) || !defined(_STD_TYPES_T)
# define _LIBCPP___CXX03_INTTYPES_H
#endif // _STD_TYPES_T
/*
inttypes.h synopsis
This entire header is C99 / C++0X
#include <__cxx03/stdint.h> // <cinttypes> includes <cstdint>
Macros:
PRId8
PRId16
PRId32
PRId64
PRIdLEAST8
PRIdLEAST16
PRIdLEAST32
PRIdLEAST64
PRIdFAST8
PRIdFAST16
PRIdFAST32
PRIdFAST64
PRIdMAX
PRIdPTR
PRIi8
PRIi16
PRIi32
PRIi64
PRIiLEAST8
PRIiLEAST16
PRIiLEAST32
PRIiLEAST64
PRIiFAST8
PRIiFAST16
PRIiFAST32
PRIiFAST64
PRIiMAX
PRIiPTR
PRIo8
PRIo16
PRIo32
PRIo64
PRIoLEAST8
PRIoLEAST16
PRIoLEAST32
PRIoLEAST64
PRIoFAST8
PRIoFAST16
PRIoFAST32
PRIoFAST64
PRIoMAX
PRIoPTR
PRIu8
PRIu16
PRIu32
PRIu64
PRIuLEAST8
PRIuLEAST16
PRIuLEAST32
PRIuLEAST64
PRIuFAST8
PRIuFAST16
PRIuFAST32
PRIuFAST64
PRIuMAX
PRIuPTR
PRIx8
PRIx16
PRIx32
PRIx64
PRIxLEAST8
PRIxLEAST16
PRIxLEAST32
PRIxLEAST64
PRIxFAST8
PRIxFAST16
PRIxFAST32
PRIxFAST64
PRIxMAX
PRIxPTR
PRIX8
PRIX16
PRIX32
PRIX64
PRIXLEAST8
PRIXLEAST16
PRIXLEAST32
PRIXLEAST64
PRIXFAST8
PRIXFAST16
PRIXFAST32
PRIXFAST64
PRIXMAX
PRIXPTR
SCNd8
SCNd16
SCNd32
SCNd64
SCNdLEAST8
SCNdLEAST16
SCNdLEAST32
SCNdLEAST64
SCNdFAST8
SCNdFAST16
SCNdFAST32
SCNdFAST64
SCNdMAX
SCNdPTR
SCNi8
SCNi16
SCNi32
SCNi64
SCNiLEAST8
SCNiLEAST16
SCNiLEAST32
SCNiLEAST64
SCNiFAST8
SCNiFAST16
SCNiFAST32
SCNiFAST64
SCNiMAX
SCNiPTR
SCNo8
SCNo16
SCNo32
SCNo64
SCNoLEAST8
SCNoLEAST16
SCNoLEAST32
SCNoLEAST64
SCNoFAST8
SCNoFAST16
SCNoFAST32
SCNoFAST64
SCNoMAX
SCNoPTR
SCNu8
SCNu16
SCNu32
SCNu64
SCNuLEAST8
SCNuLEAST16
SCNuLEAST32
SCNuLEAST64
SCNuFAST8
SCNuFAST16
SCNuFAST32
SCNuFAST64
SCNuMAX
SCNuPTR
SCNx8
SCNx16
SCNx32
SCNx64
SCNxLEAST8
SCNxLEAST16
SCNxLEAST32
SCNxLEAST64
SCNxFAST8
SCNxFAST16
SCNxFAST32
SCNxFAST64
SCNxMAX
SCNxPTR
Types:
imaxdiv_t
intmax_t imaxabs(intmax_t j);
imaxdiv_t imaxdiv(intmax_t numer, intmax_t denom);
intmax_t strtoimax(const char* restrict nptr, char** restrict endptr, int base);
uintmax_t strtoumax(const char* restrict nptr, char** restrict endptr, int base);
intmax_t wcstoimax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int base);
*/
#include <__cxx03/__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
/* C99 stdlib (e.g. glibc < 2.18) does not provide format macros needed
for C++11 unless __STDC_FORMAT_MACROS is defined
*/
#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
# define __STDC_FORMAT_MACROS
#endif
#if __has_include_next(<inttypes.h>)
# include_next <inttypes.h>
#endif
#ifdef __cplusplus
# include <__cxx03/stdint.h>
# undef imaxabs
# undef imaxdiv
#endif // __cplusplus
#endif // _LIBCPP___CXX03_INTTYPES_H

View file

@ -1,40 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___CXX03_STDBOOL_H
#define _LIBCPP___CXX03_STDBOOL_H
/*
stdbool.h synopsis
Macros:
__bool_true_false_are_defined
*/
#include <__cxx03/__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#if __has_include_next(<stdbool.h>)
# include_next <stdbool.h>
#endif
#ifdef __cplusplus
# undef bool
# undef true
# undef false
# undef __bool_true_false_are_defined
# define __bool_true_false_are_defined 1
#endif
#endif // _LIBCPP___CXX03_STDBOOL_H

View file

@ -1,44 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
/*
stddef.h synopsis
Macros:
offsetof(type,member-designator)
NULL
Types:
ptrdiff_t
size_t
max_align_t // C++11
nullptr_t
*/
#include <__cxx03/__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
// Note: This include is outside of header guards because we sometimes get included multiple times
// with different defines and the underlying <stddef.h> will know how to deal with that.
#include_next <stddef.h>
#ifndef _LIBCPP___CXX03_STDDEF_H
# define _LIBCPP___CXX03_STDDEF_H
# ifdef __cplusplus
typedef decltype(nullptr) nullptr_t;
# endif
#endif // _LIBCPP___CXX03_STDDEF_H

View file

@ -1,123 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#if defined(__need_FILE) || defined(__need___FILE)
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
# include_next <stdio.h>
#elif !defined(_LIBCPP___CXX03_STDIO_H)
# define _LIBCPP___CXX03_STDIO_H
/*
stdio.h synopsis
Macros:
BUFSIZ
EOF
FILENAME_MAX
FOPEN_MAX
L_tmpnam
NULL
SEEK_CUR
SEEK_END
SEEK_SET
TMP_MAX
_IOFBF
_IOLBF
_IONBF
stderr
stdin
stdout
Types:
FILE
fpos_t
size_t
int remove(const char* filename);
int rename(const char* old, const char* new);
FILE* tmpfile(void);
char* tmpnam(char* s);
int fclose(FILE* stream);
int fflush(FILE* stream);
FILE* fopen(const char* restrict filename, const char* restrict mode);
FILE* freopen(const char* restrict filename, const char * restrict mode,
FILE * restrict stream);
void setbuf(FILE* restrict stream, char* restrict buf);
int setvbuf(FILE* restrict stream, char* restrict buf, int mode, size_t size);
int fprintf(FILE* restrict stream, const char* restrict format, ...);
int fscanf(FILE* restrict stream, const char * restrict format, ...);
int printf(const char* restrict format, ...);
int scanf(const char* restrict format, ...);
int snprintf(char* restrict s, size_t n, const char* restrict format, ...); // C99
int sprintf(char* restrict s, const char* restrict format, ...);
int sscanf(const char* restrict s, const char* restrict format, ...);
int vfprintf(FILE* restrict stream, const char* restrict format, va_list arg);
int vfscanf(FILE* restrict stream, const char* restrict format, va_list arg); // C99
int vprintf(const char* restrict format, va_list arg);
int vscanf(const char* restrict format, va_list arg); // C99
int vsnprintf(char* restrict s, size_t n, const char* restrict format, // C99
va_list arg);
int vsprintf(char* restrict s, const char* restrict format, va_list arg);
int vsscanf(const char* restrict s, const char* restrict format, va_list arg); // C99
int fgetc(FILE* stream);
char* fgets(char* restrict s, int n, FILE* restrict stream);
int fputc(int c, FILE* stream);
int fputs(const char* restrict s, FILE* restrict stream);
int getc(FILE* stream);
int getchar(void);
char* gets(char* s); // removed in C++14
int putc(int c, FILE* stream);
int putchar(int c);
int puts(const char* s);
int ungetc(int c, FILE* stream);
size_t fread(void* restrict ptr, size_t size, size_t nmemb,
FILE* restrict stream);
size_t fwrite(const void* restrict ptr, size_t size, size_t nmemb,
FILE* restrict stream);
int fgetpos(FILE* restrict stream, fpos_t* restrict pos);
int fseek(FILE* stream, long offset, int whence);
int fsetpos(FILE*stream, const fpos_t* pos);
long ftell(FILE* stream);
void rewind(FILE* stream);
void clearerr(FILE* stream);
int feof(FILE* stream);
int ferror(FILE* stream);
void perror(const char* s);
*/
# include <__cxx03/__config>
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
# if __has_include_next(<stdio.h>)
# include_next <stdio.h>
# endif
# ifdef __cplusplus
# undef getc
# undef putc
# undef clearerr
# undef feof
# undef ferror
# undef putchar
# undef getchar
# endif
#endif // _LIBCPP___CXX03_STDIO_H

View file

@ -1,34 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___CXX03_TGMATH_H
#define _LIBCPP___CXX03_TGMATH_H
/*
tgmath.h synopsis
#include <__cxx03/ctgmath>
*/
#include <__cxx03/__config>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#ifdef __cplusplus
# include <__cxx03/ctgmath>
#else
# if __has_include_next(<tgmath.h>)
# include_next <tgmath.h>
# endif
#endif
#endif // _LIBCPP___CXX03_TGMATH_H

View file

@ -106,7 +106,7 @@ size_t wcsrtombs(char* restrict dst, const wchar_t** restrict src, size_t len,
*/
# include <__cxx03/__config>
# include <__cxx03/stddef.h>
# include <stddef.h>
# if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
# error \

View file

@ -1,95 +0,0 @@
// -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___CXX03_WCTYPE_H
#define _LIBCPP___CXX03_WCTYPE_H
/*
wctype.h synopsis
Macros:
WEOF
Types:
wint_t
wctrans_t
wctype_t
int iswalnum(wint_t wc);
int iswalpha(wint_t wc);
int iswblank(wint_t wc); // C99
int iswcntrl(wint_t wc);
int iswdigit(wint_t wc);
int iswgraph(wint_t wc);
int iswlower(wint_t wc);
int iswprint(wint_t wc);
int iswpunct(wint_t wc);
int iswspace(wint_t wc);
int iswupper(wint_t wc);
int iswxdigit(wint_t wc);
int iswctype(wint_t wc, wctype_t desc);
wctype_t wctype(const char* property);
wint_t towlower(wint_t wc);
wint_t towupper(wint_t wc);
wint_t towctrans(wint_t wc, wctrans_t desc);
wctrans_t wctrans(const char* property);
*/
#include <__cxx03/__config>
#if defined(_LIBCPP_HAS_NO_WIDE_CHARACTERS)
# error \
"The <wctype.h> header is not supported since libc++ has been configured with LIBCXX_ENABLE_WIDE_CHARACTERS disabled"
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
// TODO:
// In the future, we should unconditionally include_next <wctype.h> here and instead
// have a mode under which the library does not need libc++'s <wctype.h> or <cwctype>
// at all (i.e. a mode without wchar_t). As it stands, we need to do that to completely
// bypass the using declarations in <cwctype> when we did not include <__cxx03/wctype.h>.
// Otherwise, a using declaration like `using ::wint_t` in <cwctype> will refer to
// nothing (with using_if_exists), and if we include another header that defines one
// of these declarations (e.g. <wchar.h>), the second `using ::wint_t` with using_if_exists
// will fail because it does not refer to the same declaration.
#if __has_include_next(<wctype.h>)
# include_next <wctype.h>
# define _LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H
#endif
#ifdef __cplusplus
# undef iswalnum
# undef iswalpha
# undef iswblank
# undef iswcntrl
# undef iswdigit
# undef iswgraph
# undef iswlower
# undef iswprint
# undef iswpunct
# undef iswspace
# undef iswupper
# undef iswxdigit
# undef iswctype
# undef wctype
# undef towlower
# undef towupper
# undef towctrans
# undef wctrans
#endif // __cplusplus
#endif // _LIBCPP___CXX03_WCTYPE_H

View file

@ -18,19 +18,19 @@
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/complex.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
# ifdef __cplusplus
# include <complex>
# elif __has_include_next(<complex.h>)
# include_next <complex.h>
# endif
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#ifdef __cplusplus
# include <complex>
#elif __has_include_next(<complex.h>)
# include_next <complex.h>
#endif
#endif // _LIBCPP_COMPLEX_H

View file

@ -30,36 +30,36 @@ int toupper(int c);
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/ctype.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
# if __has_include_next(<ctype.h>)
# include_next <ctype.h>
# endif
#if __has_include_next(<ctype.h>)
# include_next <ctype.h>
#endif
# ifdef __cplusplus
#ifdef __cplusplus
# undef isalnum
# undef isalpha
# undef isblank
# undef iscntrl
# undef isdigit
# undef isgraph
# undef islower
# undef isprint
# undef ispunct
# undef isspace
# undef isupper
# undef isxdigit
# undef tolower
# undef toupper
# undef isalnum
# undef isalpha
# undef isblank
# undef iscntrl
# undef isdigit
# undef isgraph
# undef islower
# undef isprint
# undef ispunct
# undef isspace
# undef isupper
# undef isxdigit
# undef tolower
# undef toupper
# endif
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#endif
#endif // _LIBCPP_CTYPE_H

View file

@ -23,381 +23,381 @@ Macros:
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/errno.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
# if __has_include_next(<errno.h>)
# include_next <errno.h>
# endif
#if __has_include_next(<errno.h>)
# include_next <errno.h>
#endif
# ifdef __cplusplus
#ifdef __cplusplus
# if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
# if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
# ifdef ELAST
# ifdef ELAST
static const int __elast1 = ELAST + 1;
static const int __elast2 = ELAST + 2;
# else
# else
static const int __elast1 = 104;
static const int __elast2 = 105;
# endif
# ifdef ENOTRECOVERABLE
# define EOWNERDEAD __elast1
# ifdef ELAST
# undef ELAST
# define ELAST EOWNERDEAD
# endif
# ifdef ENOTRECOVERABLE
# elif defined(EOWNERDEAD)
# define EOWNERDEAD __elast1
# define ENOTRECOVERABLE __elast1
# ifdef ELAST
# undef ELAST
# define ELAST ENOTRECOVERABLE
# endif
# ifdef ELAST
# undef ELAST
# define ELAST EOWNERDEAD
# endif
# else // defined(EOWNERDEAD)
# elif defined(EOWNERDEAD)
# define EOWNERDEAD __elast1
# define ENOTRECOVERABLE __elast2
# ifdef ELAST
# undef ELAST
# define ELAST ENOTRECOVERABLE
# endif
# define ENOTRECOVERABLE __elast1
# ifdef ELAST
# undef ELAST
# define ELAST ENOTRECOVERABLE
# endif
# endif // defined(EOWNERDEAD)
# else // defined(EOWNERDEAD)
# define EOWNERDEAD __elast1
# define ENOTRECOVERABLE __elast2
# ifdef ELAST
# undef ELAST
# define ELAST ENOTRECOVERABLE
# endif
# endif // defined(EOWNERDEAD)
# endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
# endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
// supply errno values likely to be missing, particularly on Windows
# ifndef EAFNOSUPPORT
# define EAFNOSUPPORT 9901
# endif
# ifndef EAFNOSUPPORT
# define EAFNOSUPPORT 9901
# endif
# ifndef EADDRINUSE
# define EADDRINUSE 9902
# endif
# ifndef EADDRINUSE
# define EADDRINUSE 9902
# endif
# ifndef EADDRNOTAVAIL
# define EADDRNOTAVAIL 9903
# endif
# ifndef EADDRNOTAVAIL
# define EADDRNOTAVAIL 9903
# endif
# ifndef EISCONN
# define EISCONN 9904
# endif
# ifndef EISCONN
# define EISCONN 9904
# endif
# ifndef EBADMSG
# define EBADMSG 9905
# endif
# ifndef EBADMSG
# define EBADMSG 9905
# endif
# ifndef ECONNABORTED
# define ECONNABORTED 9906
# endif
# ifndef ECONNABORTED
# define ECONNABORTED 9906
# endif
# ifndef EALREADY
# define EALREADY 9907
# endif
# ifndef EALREADY
# define EALREADY 9907
# endif
# ifndef ECONNREFUSED
# define ECONNREFUSED 9908
# endif
# ifndef ECONNREFUSED
# define ECONNREFUSED 9908
# endif
# ifndef ECONNRESET
# define ECONNRESET 9909
# endif
# ifndef ECONNRESET
# define ECONNRESET 9909
# endif
# ifndef EDESTADDRREQ
# define EDESTADDRREQ 9910
# endif
# ifndef EDESTADDRREQ
# define EDESTADDRREQ 9910
# endif
# ifndef EHOSTUNREACH
# define EHOSTUNREACH 9911
# endif
# ifndef EHOSTUNREACH
# define EHOSTUNREACH 9911
# endif
# ifndef EIDRM
# define EIDRM 9912
# endif
# ifndef EIDRM
# define EIDRM 9912
# endif
# ifndef EMSGSIZE
# define EMSGSIZE 9913
# endif
# ifndef EMSGSIZE
# define EMSGSIZE 9913
# endif
# ifndef ENETDOWN
# define ENETDOWN 9914
# endif
# ifndef ENETDOWN
# define ENETDOWN 9914
# endif
# ifndef ENETRESET
# define ENETRESET 9915
# endif
# ifndef ENETRESET
# define ENETRESET 9915
# endif
# ifndef ENETUNREACH
# define ENETUNREACH 9916
# endif
# ifndef ENETUNREACH
# define ENETUNREACH 9916
# endif
# ifndef ENOBUFS
# define ENOBUFS 9917
# endif
# ifndef ENOBUFS
# define ENOBUFS 9917
# endif
# ifndef ENOLINK
# define ENOLINK 9918
# endif
# ifndef ENOLINK
# define ENOLINK 9918
# endif
# ifndef ENODATA
# define ENODATA 9919
# endif
# ifndef ENODATA
# define ENODATA 9919
# endif
# ifndef ENOMSG
# define ENOMSG 9920
# endif
# ifndef ENOMSG
# define ENOMSG 9920
# endif
# ifndef ENOPROTOOPT
# define ENOPROTOOPT 9921
# endif
# ifndef ENOPROTOOPT
# define ENOPROTOOPT 9921
# endif
# ifndef ENOSR
# define ENOSR 9922
# endif
# ifndef ENOSR
# define ENOSR 9922
# endif
# ifndef ENOTSOCK
# define ENOTSOCK 9923
# endif
# ifndef ENOTSOCK
# define ENOTSOCK 9923
# endif
# ifndef ENOSTR
# define ENOSTR 9924
# endif
# ifndef ENOSTR
# define ENOSTR 9924
# endif
# ifndef ENOTCONN
# define ENOTCONN 9925
# endif
# ifndef ENOTCONN
# define ENOTCONN 9925
# endif
# ifndef ENOTSUP
# define ENOTSUP 9926
# endif
# ifndef ENOTSUP
# define ENOTSUP 9926
# endif
# ifndef ECANCELED
# define ECANCELED 9927
# endif
# ifndef ECANCELED
# define ECANCELED 9927
# endif
# ifndef EINPROGRESS
# define EINPROGRESS 9928
# endif
# ifndef EINPROGRESS
# define EINPROGRESS 9928
# endif
# ifndef EOPNOTSUPP
# define EOPNOTSUPP 9929
# endif
# ifndef EOPNOTSUPP
# define EOPNOTSUPP 9929
# endif
# ifndef EWOULDBLOCK
# define EWOULDBLOCK 9930
# endif
# ifndef EWOULDBLOCK
# define EWOULDBLOCK 9930
# endif
# ifndef EOWNERDEAD
# define EOWNERDEAD 9931
# endif
# ifndef EOWNERDEAD
# define EOWNERDEAD 9931
# endif
# ifndef EPROTO
# define EPROTO 9932
# endif
# ifndef EPROTO
# define EPROTO 9932
# endif
# ifndef EPROTONOSUPPORT
# define EPROTONOSUPPORT 9933
# endif
# ifndef EPROTONOSUPPORT
# define EPROTONOSUPPORT 9933
# endif
# ifndef ENOTRECOVERABLE
# define ENOTRECOVERABLE 9934
# endif
# ifndef ENOTRECOVERABLE
# define ENOTRECOVERABLE 9934
# endif
# ifndef ETIME
# define ETIME 9935
# endif
# ifndef ETIME
# define ETIME 9935
# endif
# ifndef ETXTBSY
# define ETXTBSY 9936
# endif
# ifndef ETXTBSY
# define ETXTBSY 9936
# endif
# ifndef ETIMEDOUT
# define ETIMEDOUT 9938
# endif
# ifndef ETIMEDOUT
# define ETIMEDOUT 9938
# endif
# ifndef ELOOP
# define ELOOP 9939
# endif
# ifndef ELOOP
# define ELOOP 9939
# endif
# ifndef EOVERFLOW
# define EOVERFLOW 9940
# endif
# ifndef EOVERFLOW
# define EOVERFLOW 9940
# endif
# ifndef EPROTOTYPE
# define EPROTOTYPE 9941
# endif
# ifndef EPROTOTYPE
# define EPROTOTYPE 9941
# endif
# ifndef ENOSYS
# define ENOSYS 9942
# endif
# ifndef ENOSYS
# define ENOSYS 9942
# endif
# ifndef EINVAL
# define EINVAL 9943
# endif
# ifndef EINVAL
# define EINVAL 9943
# endif
# ifndef ERANGE
# define ERANGE 9944
# endif
# ifndef ERANGE
# define ERANGE 9944
# endif
# ifndef EILSEQ
# define EILSEQ 9945
# endif
# ifndef EILSEQ
# define EILSEQ 9945
# endif
// Windows Mobile doesn't appear to define these:
# ifndef E2BIG
# define E2BIG 9946
# endif
# ifndef E2BIG
# define E2BIG 9946
# endif
# ifndef EDOM
# define EDOM 9947
# endif
# ifndef EDOM
# define EDOM 9947
# endif
# ifndef EFAULT
# define EFAULT 9948
# endif
# ifndef EFAULT
# define EFAULT 9948
# endif
# ifndef EBADF
# define EBADF 9949
# endif
# ifndef EBADF
# define EBADF 9949
# endif
# ifndef EPIPE
# define EPIPE 9950
# endif
# ifndef EPIPE
# define EPIPE 9950
# endif
# ifndef EXDEV
# define EXDEV 9951
# endif
# ifndef EXDEV
# define EXDEV 9951
# endif
# ifndef EBUSY
# define EBUSY 9952
# endif
# ifndef EBUSY
# define EBUSY 9952
# endif
# ifndef ENOTEMPTY
# define ENOTEMPTY 9953
# endif
# ifndef ENOTEMPTY
# define ENOTEMPTY 9953
# endif
# ifndef ENOEXEC
# define ENOEXEC 9954
# endif
# ifndef ENOEXEC
# define ENOEXEC 9954
# endif
# ifndef EEXIST
# define EEXIST 9955
# endif
# ifndef EEXIST
# define EEXIST 9955
# endif
# ifndef EFBIG
# define EFBIG 9956
# endif
# ifndef EFBIG
# define EFBIG 9956
# endif
# ifndef ENAMETOOLONG
# define ENAMETOOLONG 9957
# endif
# ifndef ENAMETOOLONG
# define ENAMETOOLONG 9957
# endif
# ifndef ENOTTY
# define ENOTTY 9958
# endif
# ifndef ENOTTY
# define ENOTTY 9958
# endif
# ifndef EINTR
# define EINTR 9959
# endif
# ifndef EINTR
# define EINTR 9959
# endif
# ifndef ESPIPE
# define ESPIPE 9960
# endif
# ifndef ESPIPE
# define ESPIPE 9960
# endif
# ifndef EIO
# define EIO 9961
# endif
# ifndef EIO
# define EIO 9961
# endif
# ifndef EISDIR
# define EISDIR 9962
# endif
# ifndef EISDIR
# define EISDIR 9962
# endif
# ifndef ECHILD
# define ECHILD 9963
# endif
# ifndef ECHILD
# define ECHILD 9963
# endif
# ifndef ENOLCK
# define ENOLCK 9964
# endif
# ifndef ENOLCK
# define ENOLCK 9964
# endif
# ifndef ENOSPC
# define ENOSPC 9965
# endif
# ifndef ENOSPC
# define ENOSPC 9965
# endif
# ifndef ENXIO
# define ENXIO 9966
# endif
# ifndef ENXIO
# define ENXIO 9966
# endif
# ifndef ENODEV
# define ENODEV 9967
# endif
# ifndef ENODEV
# define ENODEV 9967
# endif
# ifndef ENOENT
# define ENOENT 9968
# endif
# ifndef ENOENT
# define ENOENT 9968
# endif
# ifndef ESRCH
# define ESRCH 9969
# endif
# ifndef ESRCH
# define ESRCH 9969
# endif
# ifndef ENOTDIR
# define ENOTDIR 9970
# endif
# ifndef ENOTDIR
# define ENOTDIR 9970
# endif
# ifndef ENOMEM
# define ENOMEM 9971
# endif
# ifndef ENOMEM
# define ENOMEM 9971
# endif
# ifndef EPERM
# define EPERM 9972
# endif
# ifndef EPERM
# define EPERM 9972
# endif
# ifndef EACCES
# define EACCES 9973
# endif
# ifndef EACCES
# define EACCES 9973
# endif
# ifndef EROFS
# define EROFS 9974
# endif
# ifndef EROFS
# define EROFS 9974
# endif
# ifndef EDEADLK
# define EDEADLK 9975
# endif
# ifndef EDEADLK
# define EDEADLK 9975
# endif
# ifndef EAGAIN
# define EAGAIN 9976
# endif
# ifndef EAGAIN
# define EAGAIN 9976
# endif
# ifndef ENFILE
# define ENFILE 9977
# endif
# ifndef ENFILE
# define ENFILE 9977
# endif
# ifndef EMFILE
# define EMFILE 9978
# endif
# ifndef EMFILE
# define EMFILE 9978
# endif
# ifndef EMLINK
# define EMLINK 9979
# endif
# ifndef EMLINK
# define EMLINK 9979
# endif
# endif // __cplusplus
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#endif // __cplusplus
#endif // _LIBCPP_ERRNO_H

View file

@ -50,69 +50,69 @@ int feupdateenv(const fenv_t* envp);
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/fenv.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
# if __has_include_next(<fenv.h>)
# include_next <fenv.h>
# endif
#if __has_include_next(<fenv.h>)
# include_next <fenv.h>
#endif
# ifdef __cplusplus
#ifdef __cplusplus
extern "C++" {
# ifdef feclearexcept
# undef feclearexcept
# endif
# ifdef feclearexcept
# undef feclearexcept
# endif
# ifdef fegetexceptflag
# undef fegetexceptflag
# endif
# ifdef fegetexceptflag
# undef fegetexceptflag
# endif
# ifdef feraiseexcept
# undef feraiseexcept
# endif
# ifdef feraiseexcept
# undef feraiseexcept
# endif
# ifdef fesetexceptflag
# undef fesetexceptflag
# endif
# ifdef fesetexceptflag
# undef fesetexceptflag
# endif
# ifdef fetestexcept
# undef fetestexcept
# endif
# ifdef fetestexcept
# undef fetestexcept
# endif
# ifdef fegetround
# undef fegetround
# endif
# ifdef fegetround
# undef fegetround
# endif
# ifdef fesetround
# undef fesetround
# endif
# ifdef fesetround
# undef fesetround
# endif
# ifdef fegetenv
# undef fegetenv
# endif
# ifdef fegetenv
# undef fegetenv
# endif
# ifdef feholdexcept
# undef feholdexcept
# endif
# ifdef feholdexcept
# undef feholdexcept
# endif
# ifdef fesetenv
# undef fesetenv
# endif
# ifdef fesetenv
# undef fesetenv
# endif
# ifdef feupdateenv
# undef feupdateenv
# endif
# ifdef feupdateenv
# undef feupdateenv
# endif
} // extern "C++"
# endif // defined(__cplusplus)
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#endif // defined(__cplusplus)
#endif // _LIBCPP_FENV_H

View file

@ -71,29 +71,29 @@ Macros:
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/float.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#if __has_include_next(<float.h>)
# include_next <float.h>
#endif
#ifdef __cplusplus
# ifndef FLT_EVAL_METHOD
# define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
# endif
# if __has_include_next(<float.h>)
# include_next <float.h>
# ifndef DECIMAL_DIG
# define DECIMAL_DIG __DECIMAL_DIG__
# endif
# ifdef __cplusplus
# ifndef FLT_EVAL_METHOD
# define FLT_EVAL_METHOD __FLT_EVAL_METHOD__
# endif
# ifndef DECIMAL_DIG
# define DECIMAL_DIG __DECIMAL_DIG__
# endif
# endif // __cplusplus
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#endif // __cplusplus
#endif // _LIBCPP_FLOAT_H

View file

@ -236,33 +236,33 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/inttypes.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
/* C99 stdlib (e.g. glibc < 2.18) does not provide format macros needed
for C++11 unless __STDC_FORMAT_MACROS is defined
*/
# if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
# define __STDC_FORMAT_MACROS
# endif
#if defined(__cplusplus) && !defined(__STDC_FORMAT_MACROS)
# define __STDC_FORMAT_MACROS
#endif
# if __has_include_next(<inttypes.h>)
# include_next <inttypes.h>
# endif
#if __has_include_next(<inttypes.h>)
# include_next <inttypes.h>
#endif
# ifdef __cplusplus
#ifdef __cplusplus
# include <stdint.h>
# include <stdint.h>
# undef imaxabs
# undef imaxdiv
# undef imaxabs
# undef imaxdiv
# endif // __cplusplus
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#endif // __cplusplus
#endif // _LIBCPP_INTTYPES_H

View file

@ -20,25 +20,25 @@ Macros:
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/stdbool.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
# if __has_include_next(<stdbool.h>)
# include_next <stdbool.h>
# endif
#if __has_include_next(<stdbool.h>)
# include_next <stdbool.h>
#endif
# ifdef __cplusplus
# undef bool
# undef true
# undef false
# undef __bool_true_false_are_defined
# define __bool_true_false_are_defined 1
# endif
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#ifdef __cplusplus
# undef bool
# undef true
# undef false
# undef __bool_true_false_are_defined
# define __bool_true_false_are_defined 1
#endif
#endif // _LIBCPP_STDBOOL_H

View file

@ -25,24 +25,24 @@ Types:
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/stddef.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
// Note: This include is outside of header guards because we sometimes get included multiple times
// with different defines and the underlying <stddef.h> will know how to deal with that.
# include_next <stddef.h>
#include_next <stddef.h>
# ifndef _LIBCPP_STDDEF_H
# define _LIBCPP_STDDEF_H
#ifndef _LIBCPP_STDDEF_H
# define _LIBCPP_STDDEF_H
# ifdef __cplusplus
# ifdef __cplusplus
typedef decltype(nullptr) nullptr_t;
# endif
# endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# endif
#endif // _LIBCPP_STDDEF_H

View file

@ -88,35 +88,34 @@ void perror(const char* s);
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/stdio.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
// The inclusion of the system's <stdio.h> is intentionally done once outside of any include
// guards because some code expects to be able to include the underlying system header multiple
// times to get different definitions based on the macros that are set before inclusion.
# if __has_include_next(<stdio.h>)
# include_next <stdio.h>
# endif
#if __has_include_next(<stdio.h>)
# include_next <stdio.h>
#endif
# ifndef _LIBCPP_STDIO_H
# define _LIBCPP_STDIO_H
#ifndef _LIBCPP_STDIO_H
# define _LIBCPP_STDIO_H
# ifdef __cplusplus
# ifdef __cplusplus
# undef getc
# undef putc
# undef clearerr
# undef feof
# undef ferror
# undef putchar
# undef getchar
# undef getc
# undef putc
# undef clearerr
# undef feof
# undef ferror
# undef putchar
# undef getchar
# endif // __cplusplus
# endif // _LIBCPP_STDIO_H
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# endif // __cplusplus
#endif // _LIBCPP_STDIO_H

View file

@ -18,22 +18,22 @@
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/tgmath.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
# ifdef __cplusplus
# include <cmath>
# include <complex>
# else
# if __has_include_next(<tgmath.h>)
# include_next <tgmath.h>
# endif
#ifdef __cplusplus
# include <cmath>
# include <complex>
#else
# if __has_include_next(<tgmath.h>)
# include_next <tgmath.h>
# endif
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#endif
#endif // _LIBCPP_TGMATH_H

View file

@ -45,13 +45,14 @@ wctrans_t wctrans(const char* property);
*/
#if defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
# include <__cxx03/wctype.h>
# include <__cxx03/__config>
#else
# include <__config>
#endif
# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
// TODO:
// In the future, we should unconditionally include_next <wctype.h> here and instead
@ -62,33 +63,32 @@ wctrans_t wctrans(const char* property);
// nothing (with using_if_exists), and if we include another header that defines one
// of these declarations (e.g. <wchar.h>), the second `using ::wint_t` with using_if_exists
// will fail because it does not refer to the same declaration.
# if __has_include_next(<wctype.h>)
# include_next <wctype.h>
# define _LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H
# endif
#if __has_include_next(<wctype.h>)
# include_next <wctype.h>
# define _LIBCPP_INCLUDED_C_LIBRARY_WCTYPE_H
#endif
# ifdef __cplusplus
#ifdef __cplusplus
# undef iswalnum
# undef iswalpha
# undef iswblank
# undef iswcntrl
# undef iswdigit
# undef iswgraph
# undef iswlower
# undef iswprint
# undef iswpunct
# undef iswspace
# undef iswupper
# undef iswxdigit
# undef iswctype
# undef wctype
# undef towlower
# undef towupper
# undef towctrans
# undef wctrans
# undef iswalnum
# undef iswalpha
# undef iswblank
# undef iswcntrl
# undef iswdigit
# undef iswgraph
# undef iswlower
# undef iswprint
# undef iswpunct
# undef iswspace
# undef iswupper
# undef iswxdigit
# undef iswctype
# undef wctype
# undef towlower
# undef towupper
# undef towctrans
# undef wctrans
# endif // __cplusplus
#endif // defined(__cplusplus) && __cplusplus < 201103L && defined(_LIBCPP_USE_FROZEN_CXX03_HEADERS)
#endif // __cplusplus
#endif // _LIBCPP_WCTYPE_H