opnsense-src/contrib/llvm-project
Jordan Gordeev a0d22d7934 libc++: fix compiling <locale> with -fmodules
In /usr/include/c++/v1/__locale_dir/locale_base_api.h, xlocale.h is
included without first including stdio.h and stdlib.h, which causes
functions like strtoll_l() or sscanf_l() to not be declared.

When compiling with -fmodules, locale_base_api.h is processed separately
due to a declaration in /usr/include/c++/v1/module.modulemap, and this
will cause errors due to the above undeclared symbols.

Meanwhile, upstream has substantially reorganized this part of libc++'s
headers, so apply a minimalistic workaround: specifically when compiling
with -fmodules, add includes of stdio.h and stdlib.h.

PR:		286342
Approved by:	re (cperciva)
MFC after:	1 week

(cherry picked from commit c809b0184d0a6543bc5327d4252fa56a07ce4689)
(cherry picked from commit cab029073dc6cb5814df44556e585b8fdb1c9846)
2025-05-28 18:26:27 +02:00
..
clang Merge llvm-project release/19.x llvmorg-19.1.7-0-gcd708029e0b2 2025-01-19 12:05:53 +01:00
compiler-rt Merge llvm-project release/19.x llvmorg-19.1.7-0-gcd708029e0b2 2025-01-19 12:05:53 +01:00
libcxx libc++: fix compiling <locale> with -fmodules 2025-05-28 18:26:27 +02:00
libunwind Merge llvm-project release/19.x llvmorg-19.1.0-rc4-0-g0c641568515a 2024-12-01 12:17:14 +01:00
lld Merge llvm-project release/19.x llvmorg-19.1.5-0-gab4b5a2db582 2024-12-11 09:16:53 +01:00
lldb Merge llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8 2024-12-01 12:17:13 +01:00
llvm Merge llvm-project release/19.x llvmorg-19.1.7-0-gcd708029e0b2 2025-01-19 12:05:53 +01:00
openmp Merge llvm-project release/19.x llvmorg-19.1.0-rc3-0-g437434df21d8 2024-12-01 12:17:13 +01:00
FREEBSD-Xlist Merge llvm-project main llvmorg-19-init-18630-gf2ccf80136a0 2024-12-01 12:16:52 +01:00