From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.6 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 5C7E21F466 for ; Tue, 4 Feb 2020 03:02:35 +0000 (UTC) Received: from localhost ([::1]:52254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyoTy-0001lm-16 for normalperson@yhbt.net; Mon, 03 Feb 2020 22:02:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:40743) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iyoTu-0001lR-5d for bug-gnulib@gnu.org; Mon, 03 Feb 2020 22:02:31 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iyoTs-00018e-RK for bug-gnulib@gnu.org; Mon, 03 Feb 2020 22:02:29 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:50644) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iyoTs-00017b-Ly for bug-gnulib@gnu.org; Mon, 03 Feb 2020 22:02:28 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DA4BC16008C for ; Mon, 3 Feb 2020 19:02:26 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id NuzYWaQeA-ed; Mon, 3 Feb 2020 19:02:26 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 1F811160087; Mon, 3 Feb 2020 19:02:26 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id nvp8XW7VeGjG; Mon, 3 Feb 2020 19:02:26 -0800 (PST) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 06E2E160082; Mon, 3 Feb 2020 19:02:26 -0800 (PST) From: Paul Eggert To: bug-gnulib@gnu.org Subject: [PATCH] =?UTF-8?q?libc-config:=20port=20to=20Apple=E2=80=99s=20Cl?= =?UTF-8?q?ang=20variant?= Date: Mon, 3 Feb 2020 19:02:21 -0800 Message-Id: <20200204030221.58066-1-eggert@cs.ucla.edu> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 131.179.128.68 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Paul Eggert Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" * lib/libc-config.h (__glibc_clang_prereq): Port to Apple=E2=80=99s Clang variant, which uses a different numbering scheme for __clang_major__. --- ChangeLog | 7 +++++++ lib/libc-config.h | 13 +++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2a86791a8..5afe01563 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2020-02-03 Paul Eggert + + libc-config: port to Apple=E2=80=99s Clang variant + * lib/libc-config.h (__glibc_clang_prereq): + Port to Apple=E2=80=99s Clang variant, which uses a different + numbering scheme for __clang_major__. + 2020-02-02 Bruno Haible =20 Document the new modules list-c++, set-c++, oset-c++, map-c++, omap-c++= . diff --git a/lib/libc-config.h b/lib/libc-config.h index 889e01638..4ae8665bb 100644 --- a/lib/libc-config.h +++ b/lib/libc-config.h @@ -55,8 +55,17 @@ =20 #ifndef __glibc_clang_prereq # if defined __clang_major__ && defined __clang_minor__ -# define __glibc_clang_prereq(maj, min) \ - ((maj) < __clang_major__ + ((min) <=3D __clang_minor__)) +# ifdef __apple_build_version__ +/* Apple for some reason renumbers __clang_major__ and __clang_minor__. + Gnulib code uses only __glibc_clang_prereq (3, 5); map it to + 6000000 <=3D __apple_build_version__. Support for other calls to + __glibc_clang_prereq can be added here as needed. */ +# define __glibc_clang_prereq(maj, min) \ + ((maj) =3D=3D 3 && (min) =3D=3D 5 ? 6000000 <=3D __apple_build_ver= sion__ : 0) +# else +# define __glibc_clang_prereq(maj, min) \ + ((maj) < __clang_major__ + ((min) <=3D __clang_minor__)) +# endif # else # define __glibc_clang_prereq(maj, min) 0 # endif --=20 2.24.1