From nobody Sun May 18 20:05:07 2025 X-Original-To: dev-commits-src-main@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 4b0sHR47YJz5wlbk; Sun, 18 May 2025 20:05:07 +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 4b0sHR3VWMz44p6; Sun, 18 May 2025 20:05:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747598707; 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=zWQklP7RSRS/T/YOeY8izuOAvtHG/VksmJRWOrI5lCc=; b=K8GhLZN9Xlo8YipyUposFCkSaUoUslNfUC0LeWTbPbeZ/iU2gUeBHXRedMMihdikTSrU5d My+RDChwkoiO46HUwZdW+lLeHvP8TzQ3R4AXgxbJRhhivvav8AYMcaaWnoCdLr5lCeo+np xKz2RcmV0lgtR0OT3Mh1Tje+QFme0EWDFU1cMmxyRxEdaB26ohNQ+5FXWCkq7LH6d05Ne5 WWnRCgZtho4Y3pzGNjPsbLqAu0BdwVE6NZb39F5JGkRnu3JtbdoVbn72cv6zjY2GgHT/B8 JecxS/2lrxfWd9AtYzwbkzqvHI2gerbDCm8YU8Tw5cICfYo4D2DyYmuv2DH6ZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747598707; 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=zWQklP7RSRS/T/YOeY8izuOAvtHG/VksmJRWOrI5lCc=; b=GrqJBJNqCLpmLB4KMFC+VRjc9gjQa8w9uPN2SVDU6873lBBxoU/vZfmv30643TXpDW5/ZD HsWuy17eipJ/IvBnLS4JrVZI/QvRk4B1vuzVTYoxK/4ULPhanfclLS00ZoSGQFkg+ahX0j p8R20HEuFMP0mAFzvlnyi/w6ucMWTrM0nWsUFkLa96hwKx/HuLA6ebcvKHh5RGL5dDV5b2 3kJiWV/qnnjhCgM2dhS3rUia8hAH2NwHbd8fbbsFphzAAdpjvW61ZfNDh42WN6m/Zh7OXn 5s1u6Nn5ShQkTzAxcOg0Hdzyr+FyDtaW8hxnvrGt44gP9CqXIEl50DuiHdjkAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1747598707; a=rsa-sha256; cv=none; b=C9J5+ecLvtbP3STHt61tDR5+dI1CELjAHdSwLB4uA7tEGQIV41XuN2yYATwFKxYi/IBXYR v39Rf0vwa5Yuw+d2quOBaZTqqy/TzVYf2JcMowN9GFWKvxunQKqejKS/lGvwtC8VsGikKr MF8hCZhqHbqgAITupfuTsQo3xpOPR5qYn9lVXHpcj0Z4CoCOiUDuaZlv3JTlZkSNwCSUFZ ewWoAtbWSFUr+NojgN+m2ewrBrLNH2XeJopvQSdfMjdwmqlc1PmXrToJ7yQHVzDrY7YSqL mgQrqFJJgVkvHbo9R1W9WzMsZi/fwyiUZiPQZkmtwxLzZ3lbK7zwOwuQ0y99Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4b0sHR2qGGzZRq; Sun, 18 May 2025 20:05:07 +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 54IK578Z012651; Sun, 18 May 2025 20:05:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54IK57eG012648; Sun, 18 May 2025 20:05:07 GMT (envelope-from git) Date: Sun, 18 May 2025 20:05:07 GMT Message-Id: <202505182005.54IK57eG012648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: c809b0184d0a - main - libc++: fix compiling with -fmodules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: c809b0184d0a6543bc5327d4252fa56a07ce4689 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=c809b0184d0a6543bc5327d4252fa56a07ce4689 commit c809b0184d0a6543bc5327d4252fa56a07ce4689 Author: Jordan Gordeev AuthorDate: 2025-05-18 19:55:05 +0000 Commit: Dimitry Andric CommitDate: 2025-05-18 20:04:42 +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 MFC after: 1 week --- .../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