From: Andreas Schwab <schwab@linux-m68k.org>
To: Iain Sandoe via Gcc-patches <gcc-patches@gcc.gnu.org>
Cc: libstdc++@gcc.gnu.org, iain@sandoe.co.uk,
Iain Sandoe <iains.gcc@gmail.com>
Subject: Re: [PATCH] libstdc++: Test for tzdata.zi before fallback version files.
Date: Sat, 24 Dec 2022 13:25:40 +0100 [thread overview]
Message-ID: <87wn6hounv.fsf@igel.home> (raw)
In-Reply-To: <20221224114009.20261-1-iain@sandoe.co.uk> (Iain Sandoe via Gcc-patches's message of "Sat, 24 Dec 2022 11:40:09 +0000")
On Dez 24 2022, Iain Sandoe via Gcc-patches wrote:
> @@ -1083,6 +1078,14 @@ namespace std::chrono
> if (*zif >> hash >> label >> version)
> if (hash == '#' && label == "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");
> }
Looks like indentation is off here.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
next prev parent reply other threads:[~2022-12-24 12:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-24 11:40 Iain Sandoe
2022-12-24 12:03 ` Jonathan Wakely
2022-12-24 12:25 ` Andreas Schwab [this message]
2022-12-24 17:52 ` Iain Sandoe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wn6hounv.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=iain@sandoe.co.uk \
--cc=iains.gcc@gmail.com \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).