Skip to content

Commit 44331d2

Browse files
authored
[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.
1 parent 8ebec3d commit 44331d2

34 files changed

+486
-1799
lines changed

libcxx/include/CMakeLists.txt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1593,7 +1593,6 @@ set(files
15931593
__cxx03/cmath
15941594
__cxx03/codecvt
15951595
__cxx03/complex
1596-
__cxx03/complex.h
15971596
__cxx03/condition_variable
15981597
__cxx03/csetjmp
15991598
__cxx03/csignal
@@ -1606,25 +1605,20 @@ set(files
16061605
__cxx03/cstring
16071606
__cxx03/ctgmath
16081607
__cxx03/ctime
1609-
__cxx03/ctype.h
16101608
__cxx03/cuchar
16111609
__cxx03/cwchar
16121610
__cxx03/cwctype
16131611
__cxx03/deque
1614-
__cxx03/errno.h
16151612
__cxx03/exception
16161613
__cxx03/experimental/__config
16171614
__cxx03/experimental/utility
16181615
__cxx03/ext/__hash
16191616
__cxx03/ext/hash_map
16201617
__cxx03/ext/hash_set
1621-
__cxx03/fenv.h
1622-
__cxx03/float.h
16231618
__cxx03/forward_list
16241619
__cxx03/fstream
16251620
__cxx03/functional
16261621
__cxx03/future
1627-
__cxx03/inttypes.h
16281622
__cxx03/iomanip
16291623
__cxx03/ios
16301624
__cxx03/iosfwd
@@ -1651,19 +1645,15 @@ set(files
16511645
__cxx03/sstream
16521646
__cxx03/stack
16531647
__cxx03/stdatomic.h
1654-
__cxx03/stdbool.h
1655-
__cxx03/stddef.h
16561648
__cxx03/stdexcept
16571649
__cxx03/stdint.h
1658-
__cxx03/stdio.h
16591650
__cxx03/stdlib.h
16601651
__cxx03/streambuf
16611652
__cxx03/string
16621653
__cxx03/string.h
16631654
__cxx03/string_view
16641655
__cxx03/strstream
16651656
__cxx03/system_error
1666-
__cxx03/tgmath.h
16671657
__cxx03/thread
16681658
__cxx03/type_traits
16691659
__cxx03/typeindex
@@ -1676,7 +1666,6 @@ set(files
16761666
__cxx03/vector
16771667
__cxx03/version
16781668
__cxx03/wchar.h
1679-
__cxx03/wctype.h
16801669
)
16811670

16821671
configure_file("__config_site.in" "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site" @ONLY)

libcxx/include/__cxx03/__thread/support/pthread.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <__cxx03/__chrono/duration.h>
1515
#include <__cxx03/__config>
1616
#include <__cxx03/ctime>
17-
#include <__cxx03/errno.h>
17+
#include <errno.h>
1818
#include <pthread.h>
1919
#include <sched.h>
2020

libcxx/include/__cxx03/cctype

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ int toupper(int c);
3636

3737
#include <__cxx03/__config>
3838

39-
#include <__cxx03/ctype.h>
39+
#include <ctype.h>
4040

41-
#ifndef _LIBCPP___CXX03_CTYPE_H
41+
#ifndef _LIBCPP_CTYPE_H
4242
# error <cctype> tried including <ctype.h> but didn't find libc++'s <ctype.h> header. \
4343
This usually means that your header search paths are not configured properly. \
4444
The header search paths should contain the C++ Standard Library headers before \

libcxx/include/__cxx03/cerrno

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@ Macros:
2424

2525
#include <__cxx03/__config>
2626

27-
#include <__cxx03/errno.h>
27+
#include <errno.h>
2828

29-
#ifndef _LIBCPP___CXX03_ERRNO_H
29+
#ifndef _LIBCPP_ERRNO_H
3030
# error <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header. \
3131
This usually means that your header search paths are not configured properly. \
3232
The header search paths should contain the C++ Standard Library headers before \

libcxx/include/__cxx03/cfenv

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ int feupdateenv(const fenv_t* envp);
5454

5555
#include <__cxx03/__config>
5656

57-
#include <__cxx03/fenv.h>
57+
#include <fenv.h>
5858

59-
#ifndef _LIBCPP___CXX03_FENV_H
59+
#ifndef _LIBCPP_FENV_H
6060
# error <cfenv> tried including <fenv.h> but didn't find libc++'s <fenv.h> header. \
6161
This usually means that your header search paths are not configured properly. \
6262
The header search paths should contain the C++ Standard Library headers before \

libcxx/include/__cxx03/cfloat

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ Macros:
7171

7272
#include <__cxx03/__config>
7373

74-
#include <__cxx03/float.h>
74+
#include <float.h>
7575

76-
#ifndef _LIBCPP___CXX03_FLOAT_H
76+
#ifndef _LIBCPP_FLOAT_H
7777
# error <cfloat> tried including <float.h> but didn't find libc++'s <float.h> header. \
7878
This usually means that your header search paths are not configured properly. \
7979
The header search paths should contain the C++ Standard Library headers before \

libcxx/include/__cxx03/cinttypes

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ uintmax_t wcstoumax(const wchar_t* restrict nptr, wchar_t** restrict endptr, int
241241
// [cinttypes.syn]
242242
#include <__cxx03/cstdint>
243243

244-
#include <__cxx03/inttypes.h>
244+
#include <inttypes.h>
245245

246-
#ifndef _LIBCPP___CXX03_INTTYPES_H
246+
#ifndef _LIBCPP_INTTYPES_H
247247
# error <cinttypes> tried including <inttypes.h> but didn't find libc++'s <inttypes.h> header. \
248248
This usually means that your header search paths are not configured properly. \
249249
The header search paths should contain the C++ Standard Library headers before \

libcxx/include/__cxx03/complex.h

Lines changed: 0 additions & 32 deletions
This file was deleted.

libcxx/include/__cxx03/cstddef

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ Types:
3939
#include <__cxx03/__type_traits/is_integral.h>
4040
#include <__cxx03/version>
4141

42-
#include <__cxx03/stddef.h>
42+
#include <stddef.h>
4343

44-
#ifndef _LIBCPP___CXX03_STDDEF_H
44+
#ifndef _LIBCPP_STDDEF_H
4545
# error <cstddef> tried including <stddef.h> but didn't find libc++'s <stddef.h> header. \
4646
This usually means that your header search paths are not configured properly. \
4747
The header search paths should contain the C++ Standard Library headers before \

libcxx/include/__cxx03/cstdio

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,9 @@ void perror(const char* s);
9797

9898
#include <__cxx03/__config>
9999

100-
#include <__cxx03/stdio.h>
100+
#include <stdio.h>
101101

102-
#ifndef _LIBCPP___CXX03_STDIO_H
102+
#ifndef _LIBCPP_STDIO_H
103103
# error <cstdio> tried including <stdio.h> but didn't find libc++'s <stdio.h> header. \
104104
This usually means that your header search paths are not configured properly. \
105105
The header search paths should contain the C++ Standard Library headers before \

0 commit comments

Comments
 (0)