Skip to content

Commit 042d28d

Browse files
committed
[libc++] Move AIX and z/OS to the new locale API
This completes the transition of z/OS and AIX to the new locale base API. I tried my best to make the code 100% equivalent to the previous code, however it's very difficult to do that without having access to that platform. Overall, this makes the locale API definition a lot more direct on those platforms and also moves in the direction of removing the legacy shim layer.
1 parent 26450db commit 042d28d

File tree

4 files changed

+270
-110
lines changed

4 files changed

+270
-110
lines changed

libcxx/include/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,6 @@ set(files
516516
__locale_dir/get_c_locale.h
517517
__locale_dir/locale_base_api.h
518518
__locale_dir/locale_base_api/bsd_locale_fallbacks.h
519-
__locale_dir/locale_base_api/ibm.h
520519
__locale_dir/locale_base_api/musl.h
521520
__locale_dir/locale_base_api/openbsd.h
522521
__locale_dir/messages.h
@@ -528,6 +527,7 @@ set(files
528527
__locale_dir/support/bsd_like.h
529528
__locale_dir/support/freebsd.h
530529
__locale_dir/support/fuchsia.h
530+
__locale_dir/support/ibm.h
531531
__locale_dir/support/linux.h
532532
__locale_dir/support/no_locale/characters.h
533533
__locale_dir/support/no_locale/strtonum.h
@@ -753,7 +753,6 @@ set(files
753753
__string/constexpr_c_functions.h
754754
__string/extern_template_lists.h
755755
__support/ibm/gettod_zos.h
756-
__support/ibm/locale_mgmt_zos.h
757756
__support/ibm/nanosleep.h
758757
__support/xlocale/__nop_locale_mgmt.h
759758
__support/xlocale/__posix_l_fallback.h

libcxx/include/__locale_dir/locale_base_api.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,15 +121,15 @@
121121
# include <__locale_dir/support/fuchsia.h>
122122
# elif defined(__linux__)
123123
# include <__locale_dir/support/linux.h>
124+
# elif defined(_AIX) || defined(__MVS__)
125+
# include <__locale_dir/support/ibm.h>
124126
# else
125127

126128
// TODO: This is a temporary definition to bridge between the old way we defined the locale base API
127129
// (by providing global non-reserved names) and the new API. As we move individual platforms
128130
// towards the new way of defining the locale base API, this should disappear since each platform
129131
// will define those directly.
130-
# if defined(_AIX) || defined(__MVS__)
131-
# include <__locale_dir/locale_base_api/ibm.h>
132-
# elif defined(__OpenBSD__)
132+
# if defined(__OpenBSD__)
133133
# include <__locale_dir/locale_base_api/openbsd.h>
134134
# elif defined(__wasi__) || _LIBCPP_HAS_MUSL_LIBC
135135
# include <__locale_dir/locale_base_api/musl.h>

0 commit comments

Comments
 (0)