[libc++] Move __errc to __system_error/errc.h
authorNikolas Klauser <nikolasklauser@berlin.de>
Sun, 19 Mar 2023 22:10:37 +0000 (23:10 +0100)
committerNikolas Klauser <nikolasklauser@berlin.de>
Mon, 10 Apr 2023 17:23:42 +0000 (19:23 +0200)
This file was added before we started granularizing the headers, but is essentially just a granularized header. This moves the header to the correct place.

Reviewed By: #libc, EricWF

Spies: libcxx-commits, arichardson, mikhail.ramalho

Differential Revision: https://reviews.llvm.org/D146395

30 files changed:
libcxx/include/CMakeLists.txt
libcxx/include/__charconv/from_chars_integral.h
libcxx/include/__charconv/from_chars_result.h
libcxx/include/__charconv/to_chars_integral.h
libcxx/include/__charconv/to_chars_result.h
libcxx/include/__filesystem/directory_entry.h
libcxx/include/__format/formatter_floating_point.h
libcxx/include/__format/formatter_integral.h
libcxx/include/__format/formatter_output.h
libcxx/include/__system_error/errc.h [moved from libcxx/include/__errc with 100% similarity]
libcxx/include/__system_error/error_code.h
libcxx/include/__system_error/error_condition.h
libcxx/include/charconv
libcxx/include/module.modulemap.in
libcxx/include/system_error
libcxx/src/filesystem/filesystem_common.h
libcxx/src/include/ryu/ryu.h
libcxx/test/libcxx/private_headers.verify.cpp
libcxx/test/libcxx/transitive_includes.sh.cpp
libcxx/test/libcxx/transitive_includes/cxx03.csv
libcxx/test/libcxx/transitive_includes/cxx11.csv
libcxx/test/libcxx/transitive_includes/cxx14.csv
libcxx/test/libcxx/transitive_includes/cxx17.csv
libcxx/test/libcxx/transitive_includes/cxx20.csv
libcxx/test/libcxx/transitive_includes/cxx2b.csv
libcxx/test/std/diagnostics/syserr/errc.pass.cpp
libcxx/test/std/thread/thread.mutex/thread.lock/thread.lock.shared/thread.lock.shared.locking/unlock.pass.cpp
libcxx/test/support/charconv_test_helpers.h
libcxx/test/support/filesystem_test_helper.h
libcxx/utils/data/ignore_format.txt

index e9b1eb5..65b3d30 100644 (file)
@@ -302,7 +302,6 @@ set(files
   __coroutine/trivial_awaitables.h
   __debug
   __debug_utils/randomize_range.h
-  __errc
   __exception/exception.h
   __exception/exception_ptr.h
   __exception/nested_exception.h
@@ -589,6 +588,7 @@ set(files
   __support/xlocale/__nop_locale_mgmt.h
   __support/xlocale/__posix_l_fallback.h
   __support/xlocale/__strtonum_fallback.h
+  __system_error/errc.h
   __system_error/error_category.h
   __system_error/error_code.h
   __system_error/error_condition.h
index 1b72985..990aa21 100644 (file)
@@ -14,8 +14,8 @@
 #include <__charconv/from_chars_result.h>
 #include <__charconv/traits.h>
 #include <__config>
-#include <__errc>
 #include <__memory/addressof.h>
+#include <__system_error/errc.h>
 #include <__type_traits/enable_if.h>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_integral.h>
index 028f514..7eeb9ec 100644 (file)
@@ -11,7 +11,7 @@
 #define _LIBCPP___CHARCONV_FROM_CHARS_RESULT_H
 
 #include <__config>
-#include <__errc>
+#include <__system_error/errc.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
index 32205e2..6c726c0 100644 (file)
@@ -17,7 +17,7 @@
 #include <__charconv/to_chars_result.h>
 #include <__charconv/traits.h>
 #include <__config>
-#include <__errc>
+#include <__system_error/errc.h>
 #include <__type_traits/enable_if.h>
 #include <__type_traits/integral_constant.h>
 #include <__type_traits/is_same.h>
index ef74f20..67221b3 100644 (file)
@@ -11,7 +11,7 @@
 #define _LIBCPP___CHARCONV_TO_CHARS_RESULT_H
 
 #include <__config>
-#include <__errc>
+#include <__system_error/errc.h>
 
 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
 #  pragma GCC system_header
index bb5088c..111dcbd 100644 (file)
@@ -14,7 +14,6 @@
 #include <__chrono/time_point.h>
 #include <__compare/ordering.h>
 #include <__config>
-#include <__errc>
 #include <__filesystem/file_status.h>
 #include <__filesystem/file_time_type.h>
 #include <__filesystem/file_type.h>
@@ -22,6 +21,7 @@
 #include <__filesystem/operations.h>
 #include <__filesystem/path.h>
 #include <__filesystem/perms.h>
+#include <__system_error/errc.h>
 #include <__system_error/error_code.h>
 #include <__utility/move.h>
 #include <__utility/unreachable.h>
index fb8a6df..12c7e58 100644 (file)
@@ -22,7 +22,6 @@
 #include <__concepts/arithmetic.h>
 #include <__concepts/same_as.h>
 #include <__config>
-#include <__errc>
 #include <__format/concepts.h>
 #include <__format/format_parse_context.h>
 #include <__format/formatter.h>
@@ -30,6 +29,7 @@
 #include <__format/formatter_output.h>
 #include <__format/parser_std_format_spec.h>
 #include <__memory/allocator.h>
+#include <__system_error/errc.h>
 #include <__type_traits/conditional.h>
 #include <__utility/move.h>
 #include <__utility/unreachable.h>
index 0b36844..80d2457 100644 (file)
 #include <__concepts/arithmetic.h>
 #include <__concepts/same_as.h>
 #include <__config>
-#include <__errc>
 #include <__format/concepts.h>
 #include <__format/format_error.h>
 #include <__format/formatter_output.h>
 #include <__format/parser_std_format_spec.h>
+#include <__system_error/errc.h>
 #include <__type_traits/make_unsigned.h>
 #include <__utility/unreachable.h>
 #include <array>
index c6dbfcd..f751d8a 100644 (file)
@@ -19,7 +19,6 @@
 #include <__chrono/statically_widen.h>
 #include <__concepts/same_as.h>
 #include <__config>
-#include <__errc>
 #include <__format/buffer.h>
 #include <__format/concepts.h>
 #include <__format/escaped_output_table.h>
@@ -29,6 +28,7 @@
 #include <__iterator/back_insert_iterator.h>
 #include <__iterator/concepts.h>
 #include <__iterator/readable_traits.h> // iter_value_t
+#include <__system_error/errc.h>
 #include <__type_traits/make_unsigned.h>
 #include <__utility/move.h>
 #include <__utility/unreachable.h>
index b14c742..450df6e 100644 (file)
@@ -12,9 +12,9 @@
 
 #include <__compare/ordering.h>
 #include <__config>
-#include <__errc>
 #include <__functional/hash.h>
 #include <__functional/unary_function.h>
+#include <__system_error/errc.h>
 #include <__system_error/error_category.h>
 #include <__system_error/error_condition.h>
 #include <cstddef>
index 2f57a7c..dcdafdc 100644 (file)
@@ -12,8 +12,8 @@
 
 #include <__compare/ordering.h>
 #include <__config>
-#include <__errc>
 #include <__functional/unary_function.h>
+#include <__system_error/errc.h>
 #include <__system_error/error_category.h>
 #include <cstddef>
 #include <string>
index 5608e51..3b14237 100644 (file)
@@ -80,7 +80,7 @@ namespace std {
 #include <__charconv/traits.h>
 #include <__config>
 #include <__debug>
-#include <__errc>
+#include <__system_error/errc.h>
 #include <cmath> // for log2f
 #include <cstdint>
 #include <limits>
index 970039a..b7dbfbc 100644 (file)
@@ -1437,7 +1437,8 @@ module std [system] {
     export __errc
     export *
     module __system_error {
-      module error_category  { private header "__system_error/error_category.h" }
+      module errc           { private header "__system_error/errc.h" }
+      module error_category { private header "__system_error/error_category.h" }
       module error_code {
         private header "__system_error/error_code.h"
         export functional.__functional.hash
@@ -1449,6 +1450,7 @@ module std [system] {
         export functional.__functional.unary_function
       }
       module system_error { private header "__system_error/system_error.h" }
+
     }
   }
   module thread {
@@ -1715,7 +1717,6 @@ module std [system] {
   module __availability      { private header "__availability"      export * }
   module __bit_reference     { private header "__bit_reference"     export * }
   module __debug             {         header "__debug"             export * }
-  module __errc              { private header "__errc"              export * }
   module __hash_table        {         header "__hash_table"        export * }
   module __locale            {
     @requires_LIBCXX_ENABLE_LOCALIZATION@
index 3d1722f..a60c984 100644 (file)
@@ -146,6 +146,7 @@ template <> struct hash<std::error_condition>;
 
 #include <__assert> // all public C++ headers provide the assertion handler
 #include <__config>
+#include <__system_error/errc.h>
 #include <__system_error/error_category.h>
 #include <__system_error/error_code.h>
 #include <__system_error/error_condition.h>
index a9ca34d..a1756cf 100644 (file)
@@ -12,6 +12,7 @@
 #include <__assert>
 #include <__config>
 #include <array>
+#include <cerrno>
 #include <chrono>
 #include <climits>
 #include <cstdarg>
index cb44bd3..8bd34cd 100644 (file)
@@ -48,7 +48,7 @@
 #include <__charconv/to_chars_result.h>
 #include <__config>
 #include <__debug>
-#include <__errc>
+#include <__system_error/errc.h>
 #include <cstdint>
 #include <cstring>
 #include <type_traits>
index 501a3e1..e72de07 100644 (file)
@@ -334,7 +334,6 @@ END-SCRIPT
 #include <__coroutine/noop_coroutine_handle.h> // expected-error@*:* {{use of private header from outside its module: '__coroutine/noop_coroutine_handle.h'}}
 #include <__coroutine/trivial_awaitables.h> // expected-error@*:* {{use of private header from outside its module: '__coroutine/trivial_awaitables.h'}}
 #include <__debug_utils/randomize_range.h> // expected-error@*:* {{use of private header from outside its module: '__debug_utils/randomize_range.h'}}
-#include <__errc> // expected-error@*:* {{use of private header from outside its module: '__errc'}}
 #include <__exception/exception.h> // expected-error@*:* {{use of private header from outside its module: '__exception/exception.h'}}
 #include <__exception/exception_ptr.h> // expected-error@*:* {{use of private header from outside its module: '__exception/exception_ptr.h'}}
 #include <__exception/nested_exception.h> // expected-error@*:* {{use of private header from outside its module: '__exception/nested_exception.h'}}
@@ -604,6 +603,7 @@ END-SCRIPT
 #include <__string/char_traits.h> // expected-error@*:* {{use of private header from outside its module: '__string/char_traits.h'}}
 #include <__string/constexpr_c_functions.h> // expected-error@*:* {{use of private header from outside its module: '__string/constexpr_c_functions.h'}}
 #include <__string/extern_template_lists.h> // expected-error@*:* {{use of private header from outside its module: '__string/extern_template_lists.h'}}
+#include <__system_error/errc.h> // expected-error@*:* {{use of private header from outside its module: '__system_error/errc.h'}}
 #include <__system_error/error_category.h> // expected-error@*:* {{use of private header from outside its module: '__system_error/error_category.h'}}
 #include <__system_error/error_code.h> // expected-error@*:* {{use of private header from outside its module: '__system_error/error_code.h'}}
 #include <__system_error/error_condition.h> // expected-error@*:* {{use of private header from outside its module: '__system_error/error_condition.h'}}
index 8067103..28a1ed5 100644 (file)
@@ -27,9 +27,6 @@
 // This test uses --trace-includes, which is not supported by GCC.
 // UNSUPPORTED: gcc
 
-// This test doesn't work on AIX, but it should. Needs investigation.
-// XFAIL: buildhost=aix
-
 // This test is not supported when we remove the transitive includes provided for backwards
 // compatibility. When we bulk-remove them, we'll adjust the includes that are expected by
 // this test instead.
index 4d87ed2..782e3f8 100644 (file)
@@ -299,7 +299,6 @@ ext/hash_set limits
 ext/hash_set new
 ext/hash_set string
 ext/hash_set type_traits
-filesystem cerrno
 filesystem compare
 filesystem concepts
 filesystem cstddef
index 4a3fab5..e54fe47 100644 (file)
@@ -299,7 +299,6 @@ ext/hash_set limits
 ext/hash_set new
 ext/hash_set string
 ext/hash_set type_traits
-filesystem cerrno
 filesystem compare
 filesystem concepts
 filesystem cstddef
index 53db202..3de4afa 100644 (file)
@@ -301,7 +301,6 @@ ext/hash_set limits
 ext/hash_set new
 ext/hash_set string
 ext/hash_set type_traits
-filesystem cerrno
 filesystem compare
 filesystem concepts
 filesystem cstddef
index 53db202..3de4afa 100644 (file)
@@ -301,7 +301,6 @@ ext/hash_set limits
 ext/hash_set new
 ext/hash_set string
 ext/hash_set type_traits
-filesystem cerrno
 filesystem compare
 filesystem concepts
 filesystem cstddef
index 255d4f6..81a3b0c 100644 (file)
@@ -308,7 +308,6 @@ ext/hash_set limits
 ext/hash_set new
 ext/hash_set string
 ext/hash_set type_traits
-filesystem cerrno
 filesystem compare
 filesystem concepts
 filesystem cstddef
index ac566e7..c444ff9 100644 (file)
@@ -201,7 +201,6 @@ ext/hash_set initializer_list
 ext/hash_set limits
 ext/hash_set new
 ext/hash_set string
-filesystem cerrno
 filesystem compare
 filesystem cstddef
 filesystem cstdint
index 6a04a3c..e44cb50 100644 (file)
@@ -10,6 +10,7 @@
 
 // enum errc {...}
 
+#include <cerrno>
 #include <system_error>
 
 #include "test_macros.h"
index 455546a..f5fbedb 100644 (file)
@@ -10,8 +10,9 @@
 #define SUPPORT_CHARCONV_TEST_HELPERS_H
 
 #include <algorithm>
-#include <charconv>
 #include <cassert>
+#include <cerrno>
+#include <charconv>
 #include <cstddef>
 #include <limits>
 #include <numeric>
index 8c2bbb0..c7a5470 100644 (file)
@@ -14,6 +14,7 @@
 #endif
 
 #include <cassert>
+#include <cerrno>
 #include <chrono>
 #include <cstdint>
 #include <cstdio> // for printf
index a69f75b..a988db4 100644 (file)
@@ -308,7 +308,6 @@ libcxx/include/cuchar
 libcxx/include/__debug
 libcxx/include/__debug_utils/randomize_range.h
 libcxx/include/deque
-libcxx/include/__errc
 libcxx/include/errno.h
 libcxx/include/execution
 libcxx/include/expected
@@ -611,6 +610,7 @@ libcxx/include/__support/newlib/xlocale.h
 libcxx/include/__support/solaris/xlocale.h
 libcxx/include/__support/win32/locale_win32.h
 libcxx/include/__support/xlocale/__nop_locale_mgmt.h
+libcxx/include/__system_error/errc.h
 libcxx/include/__system_error/error_category.h
 libcxx/include/__system_error/error_code.h
 libcxx/include/__system_error/error_condition.h