[libcxx-commits] [libcxx] [libc++] Move AIX and z/OS to the new locale API (PR #165024)

Nikolas Klauser via libcxx-commits libcxx-commits at lists.llvm.org
Mon Oct 27 08:00:20 PDT 2025


================
@@ -0,0 +1,322 @@
+// -*- 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___LOCALE_DIR_SUPPORT_IBM_H
+#define _LIBCPP___LOCALE_DIR_SUPPORT_IBM_H
+
+#include <__config>
+#include <__fwd/string.h>
+#include <clocale>
+#include <cstdarg>
+#include <cstdio>
+#include <cstdlib>
+#include <cwctype>
+
+#if defined(__MVS__)
+#  include <__support/ibm/locale_mgmt_zos.h>
+#endif
+
+#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
+#  pragma GCC system_header
+#endif
+
+_LIBCPP_BEGIN_NAMESPACE_STD
+namespace __locale {
+
+#ifdef __MVS__
+typedef struct locale_struct {
+  int category_mask;
+  std::string lc_collate;
+  std::string lc_ctype;
+  std::string lc_monetary;
+  std::string lc_numeric;
+  std::string lc_time;
+  std::string lc_messages;
+}* locale_t;
----------------
philnik777 wrote:

This has a bunch of names which aren't reserved. We should probably rename them all.

https://github.com/llvm/llvm-project/pull/165024


More information about the libcxx-commits mailing list