From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp002.apm-internet.net (smtp002.apm-internet.net [85.119.248.221]) by sourceware.org (Postfix) with ESMTPS id 74DAC3858284 for ; Sat, 24 Dec 2022 17:52:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 74DAC3858284 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=none smtp.mailfrom=sandoe.co.uk Received: (qmail 48226 invoked from network); 24 Dec 2022 17:52:38 -0000 X-APM-Out-ID: 16719043584822 X-APM-Authkey: 257869/1(257869/1) 9 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp002.apm-internet.net with SMTP; 24 Dec 2022 17:52:38 -0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.1\)) Subject: Re: [PATCH] libstdc++: Test for tzdata.zi before fallback version files. From: Iain Sandoe In-Reply-To: <87wn6hounv.fsf@igel.home> Date: Sat, 24 Dec 2022 17:52:37 +0000 Cc: GCC Patches , libstdc++@gcc.gnu.org Content-Transfer-Encoding: quoted-printable Message-Id: <803DDED2-50E1-444D-884C-4965E85F9DBA@sandoe.co.uk> References: <20221224114009.20261-1-iain@sandoe.co.uk> <87wn6hounv.fsf@igel.home> To: Andreas Schwab X-Mailer: Apple Mail (2.3696.120.41.1.1) X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00,KAM_COUK,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: > On 24 Dec 2022, at 12:25, Andreas Schwab = wrote: >=20 > On Dez 24 2022, Iain Sandoe via Gcc-patches wrote: >=20 >> @@ -1083,6 +1078,14 @@ namespace std::chrono >> if (*zif >> hash >> label >> version) >> if (hash =3D=3D '#' && label =3D=3D "version") >> return version; >> +#if defined __NetBSD__ >> + if (string ver; ifstream(zoneinfo_dir() + "/TZDATA_VERSION") >> = ver) >> + return ver; >> +#elif defined __APPLE__ >> + // The standard install on macOS has no tzdata.zi, but we can = find the >> + // version from +VERSION. >> + if (string ver; ifstream(zoneinfo_dir() + "/+VERSION") >> ver) >> + return ver; >> #endif >> __throw_runtime_error("tzdb: no version found in tzdata.zi"); >> } >=20 > Looks like indentation is off here. thanks, I corrected that before pushing the patch. Iain >=20 > --=20 > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint =3D 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA = AEC1 > "And now for something completely different."