From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ryan Schmidt Newsgroups: gmane.comp.lib.gnulib.bugs,gmane.emacs.devel Subject: Re: Emacs 28.1 doesn't compile on Mac OS 10.7.5 Date: Sun, 17 Apr 2022 09:33:31 -0500 Message-ID: <73BFD071-DF6F-4310-974B-CD51DE1CDC29@ryandesign.com> References: <20220415.135547.28187788939231142.wl@gnu.org> <3F594037-7DF0-406B-A8DB-8709F76D7583@acm.org> <20220415.172301.1386462415020611428.wl@gnu.org> <2BC45081-033F-4796-891E-D052149C8BCB@acm.org> <67901569-bf14-b973-9de2-0f5d68aafe96@cs.ucla.edu> <79eee929-3cbe-8a5c-8ef2-06517572d83a@cs.ucla.edu> Mime-Version: 1.0 (Mac OS X Mail 13.4 \(3608.120.23.2.7\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14472"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Dan Ports , Jeffrey Walton , Werner LEMBERG , Gnulib bugs , =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= , Emacs-Devel , Filipp Gunbin To: Paul Eggert Original-X-From: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Sun Apr 17 16:33:53 2022 Return-path: Envelope-to: gnu-bug-gnulib@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ng5yL-0003cn-1p for gnu-bug-gnulib@m.gmane-mx.org; Sun, 17 Apr 2022 16:33:53 +0200 Original-Received: from localhost ([::1]:56508 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ng5yJ-0001kc-Jc for gnu-bug-gnulib@m.gmane-mx.org; Sun, 17 Apr 2022 10:33:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng5yD-0001jV-BF; Sun, 17 Apr 2022 10:33:45 -0400 Original-Received: from smtprelay02.ispgateway.de ([80.67.31.40]:4747) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ng5yB-000135-4z; Sun, 17 Apr 2022 10:33:44 -0400 Original-Received: from [67.198.113.253] (helo=untitled-mac-wifi.internal.macports.net) by smtprelay02.ispgateway.de with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1ng5xr-0002OY-9m; Sun, 17 Apr 2022 16:33:23 +0200 In-Reply-To: <79eee929-3cbe-8a5c-8ef2-06517572d83a@cs.ucla.edu> X-Mailer: Apple Mail (2.3608.120.23.2.7) X-Df-Sender: MzY4ODE4 Received-SPF: none client-ip=80.67.31.40; envelope-from=gnulib@ryandesign.com; helo=smtprelay02.ispgateway.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+gnu-bug-gnulib=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnulib" Xref: news.gmane.io gmane.comp.lib.gnulib.bugs:45791 gmane.emacs.devel:288558 Archived-At: On Apr 17, 2022, at 02:54, Paul Eggert wrote: > On 4/16/22 20:28, Jeffrey Walton wrote: >> maybe you should define a couple of macros >> like GNULIB_LLVM_CLANG_VER and GNULIB_APPLE_CLANG_VER >=20 > I hope we don't need to do that. This is software archaeology (Mac OS = X 10.7.5 is so old that neither the Subject: line nor my patch got its = name right, and nobody mentioned the mistake :-) and these macros would = clutter the code for little benefit. Most Clang-specific code nowadays = shouldn't use Clang version numbers; it should use __has_builtin etc. I agree you should detect features if you can. If you can't, and you = need to look at the compiler version, you need to first establish = whether you're using Apple Clang or open source clang, since the two use = different version numbering schemes. If __clang__ is defined and = __apple_build_version__ is defined, you're using Apple Clang and you = could inspect that constant directly or you could look at = __clang_major__, __clang_minor__, and/or __clang_patchlevel__ = interpreted as Apple Clang version numbers. If __clang__ is defined and = __apple_build_version__ is not defined, you're using open source clang = and can look at the __clang_*__ defines interpreted as open source clang = version numbers. Some sample output from my system: $ clang -dM -E - < /dev/null | egrep '__(clang|apple)' #define __apple_build_version__ 4250028 #define __clang__ 1 #define __clang_major__ 4 #define __clang_minor__ 2 #define __clang_patchlevel__ 0 #define __clang_version__ "4.2 (clang-425.0.28)" $ clang -v Apple LLVM version 4.2 (clang-425.0.28) (based on LLVM 3.2svn) Target: x86_64-apple-darwin11.4.2 Thread model: posix $ xcodebuild -version Xcode 4.6.3 Build version 4H1503 $ sw_vers ProductName: Mac OS X ProductVersion: 10.7.5 BuildVersion: 11G63