Skip to content

Commit

Permalink
[libc++] Add missing xlocale.h include on Apple and FreeBSD (llvm#99689)
Browse files Browse the repository at this point in the history
The `<locale>` header uses `strtoll_l` and friends which are defined in
`<xlocale.h>` on these platforms. While this works via transitive
includes when modules are disabled, this doesn't work anymore if the
platforms are modularized properly.

(cherry picked from commit a55df23)
  • Loading branch information
ldionne authored and llvmbot committed Jul 25, 2024
1 parent 7af27be commit 342755c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions libcxx/include/locale
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ template <class charT> class messages_byname;
# include <__locale_dir/locale_base_api/bsd_locale_fallbacks.h>
# endif

# if defined(__APPLE__) || defined(__FreeBSD__)
# include <xlocale.h>
# endif

# if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
# endif
Expand Down

0 comments on commit 342755c

Please sign in to comment.