[libcxx-commits] [PATCH] D158669: [libc++][Modules] locale fails to compile with clang modules when _LIBCPP_LOCALE__L_EXTENSIONS is undefined
Ian Anderson via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Aug 23 13:53:02 PDT 2023
iana created this revision.
iana added reviewers: ldionne, Mordante.
Herald added a subscriber: ributzka.
Herald added a project: All.
iana requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
When __locale_dir/locale_base_api/locale_guard.h is compiled independently, as it is when it's in its own clang module, it fails to compile due to locale_t being undefined. It needs to include __locale to get that, instead of just clocale.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D158669
Files:
libcxx/include/__locale_dir/locale_base_api/locale_guard.h
Index: libcxx/include/__locale_dir/locale_base_api/locale_guard.h
===================================================================
--- libcxx/include/__locale_dir/locale_base_api/locale_guard.h
+++ libcxx/include/__locale_dir/locale_base_api/locale_guard.h
@@ -10,7 +10,7 @@
#define _LIBCPP___LOCALE_LOCALE_BASE_API_LOCALE_GUARD_H
#include <__config>
-#include <clocale>
+#include <__locale>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D158669.552879.patch
Type: text/x-patch
Size: 481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230823/2de6deee/attachment.bin>
More information about the libcxx-commits
mailing list