From nobody Wed May 28 16:27:21 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4b6vzY2CL4z5wxsq; Wed, 28 May 2025 16:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4b6vzY1Mfmz3Rvg; Wed, 28 May 2025 16:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748449641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gMBvNGydlttIObnhUn1rhr2a55LMetfsDzKa2zrrHlk=; b=GYCglQ8iFjTvA+HC0kgwfiTJBG+cwdl8Yktk5oW1/rQLkrBJQSxJbemYzdaAi45TtaHKOl 3Do4gJQdHsNiVLGw0LKaCxr4jzfSMGZ/B8EkbJUt4L6XfkTPQQLS5OEyCD4xxBBF9Gn7IK dybhUwsItaDmLcB4kLYa63abNTfPSjQv9ErI1121XbiMtsJXCEKd+fGTXEdc668LBOYFeO M5+BRxiCohw3KRqPref1pEvLFTvqqsUjriR6xsOMWoT1r5PvJYut0CLnlNyDP5AhWIGOw/ ad1I70GGX7GzPC+FqbkbYqw/cudHN4ogxVY8KToETTIiL1csZONl4Ya1ItK3+g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1748449641; a=rsa-sha256; cv=none; b=wWbCHiLYHWRZGKDnOFQWt0RifUtCmZF2QF+ktC1tzScVA/7ZxxoFGf6LcK8uXCvda6oZ9j 8/09srW4dCchA4Vy4SdAjLqR3RiTdQCFdkTXfum/N4/I5vHaWS+1KCCA4gq9LHY7/0bD8K ZSc4TO2uMQRCh33bX91FzVONxX7Fgcd1HT7fVKkeFpMh1kJMy6TJI+lnSkqbI6GOYYRDG0 Y+75bDh8zmJiVlE88Crw3IQOdlHPM6V+hlf2UIpitVsvYNiIwi1EMAGHXCm0rwLHSD86Ki 3gZ+C3pm3jhkwd5qE2RA233k9eqRiVVfSl7Ri+r50/s9uTb6hBbOB5756xeiMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1748449641; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gMBvNGydlttIObnhUn1rhr2a55LMetfsDzKa2zrrHlk=; b=yD2Z4tfRjT3QkJollTsnHCE7ZDw3Yt0DCeXyv9nFvEZfSlJuRBljgMpT3OlFFyNc9lpcPs VIfqCK2FfupwbrfpvjpYgwnWnP+5uZXAHWZ9swBu4o3DvKSINvv6H/cOuig2RsMcZjYT4L qDp/f1eiqjGaxWrWpIwpZSA8Pg990qY1wNIbX+CUuSlrmgh4E/snCwfLRWnM7dqM/y4CfS ZUqEP9knfaARVgAJxdB8q57QTs6Dx8SxwtjBIR/x0eu678j9xWfETuRXsm0ZBB71cGuT9b miiGUuk0HeLRGZxiWNE8aFDH3LhINIg5iTTqTHzoONSB7D8O1ZstC3f7nYabsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4b6vzY0yxTzlTq; Wed, 28 May 2025 16:27:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54SGRLHk037334; Wed, 28 May 2025 16:27:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54SGRL7F037331; Wed, 28 May 2025 16:27:21 GMT (envelope-from git) Date: Wed, 28 May 2025 16:27:21 GMT Message-Id: <202505281627.54SGRL7F037331@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: a0d22d7934c6 - releng/14.3 - libc++: fix compiling with -fmodules List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.3 X-Git-Reftype: branch X-Git-Commit: a0d22d7934c697d8af90f1a7f902e13dcf9b3a60 Auto-Submitted: auto-generated The branch releng/14.3 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a0d22d7934c697d8af90f1a7f902e13dcf9b3a60 commit a0d22d7934c697d8af90f1a7f902e13dcf9b3a60 Author: Jordan Gordeev AuthorDate: 2025-05-18 19:55:05 +0000 Commit: Dimitry Andric CommitDate: 2025-05-28 16:26:27 +0000 libc++: fix compiling 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) --- .../llvm-project/libcxx/include/__locale_dir/locale_base_api.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h b/contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h index 8c000c558c52..e43e87375069 100644 --- a/contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h +++ b/contrib/llvm-project/libcxx/include/__locale_dir/locale_base_api.h @@ -25,7 +25,13 @@ # include <__locale_dir/locale_base_api/fuchsia.h> #elif defined(__wasi__) || defined(_LIBCPP_HAS_MUSL_LIBC) # include <__locale_dir/locale_base_api/musl.h> -#elif defined(__APPLE__) || defined(__FreeBSD__) +#elif defined(__APPLE__) +# include +#elif defined(__FreeBSD__) +# if __has_feature(modules) +# include +# include +# endif # include #endif