From: jdoubleu <hi@jdoubleu.de>
To: newlib@sourceware.org
Subject: Re: [PATCH 2/2] tzset_r.c(_tzset_unlocked_r): POSIX angle bracket <> support
Date: Thu, 7 Apr 2022 18:18:43 +0200 [thread overview]
Message-ID: <f5de28e7-4fb8-a377-f4b7-9bdd8308f41b@jdoubleu.de> (raw)
In-Reply-To: <c574eb13-6b9e-e0e3-4c61-6f25ddd09d7a@SystematicSw.ab.ca>
> [..] we are no longer using those predefined values, just those used locally in the code
Yes, got that. The comment just confused me. Can it be removed?
> Feel free to look at tzset_t.log attached to my ...testing post
Great work! Should we actually generate these values with glibc and
check whether they match?
In the meantime, I've also created some test vectors:
[PATCH] add tests for tzset(3)
https://sourceware.org/pipermail/newlib/2022/019536.html
All tests pass so far.
Cheers
---
🙎🏻♂️ jdoubleu
On 4/7/2022 6:07 PM, Brian Inglis wrote:
> On 2022-04-07 03:56, jdoubleu wrote:
>>> +#include <limits.h> /* {,_POSIX_}TZNAME_MAX */
>>> ... > +#define TZNAME_MIN 3 /* POSIX min TZ abbr size local def */
>>> +#define TZNAME_MAX 10 /* POSIX max TZ abbr size local def */
>>
>> The comment suggests, that `TZNAME_MAX` is coming from `limits.h`,
>> isn't it?
>
> From previous comments, we are no longer using those predefined values,
> just those used locally in the code, and the minimum from the POSIX spec.
>
>> Everything else looks good to me.
>> Unfortunately, I wasn't able to test these changes, yet. I cannot
>> easily build newlib for my project. However, I've prepared some tests
>> vectors (see
>> https://github.com/jdoubleu/newlib-posix-tzset-tests/blob/main/timezones.h),
>> which I plan to integrate with the newlib testsuite.
>
> Feel free to look at tzset_t.log attached to my ...testing post:
>
> tzset/_r POSIX tz abbr angle bracket <> support testing
> https://sourceware.org/pipermail/newlib/2022/019529.html
>
> and add the 103 unique TZ=... values used there, extracted from the end
> of the latest tzdb tzdata /usr/share/zoneinfo/ files, as they include
> actual exceptional times and offsets to achieve the required transitions
> and challenge implementation parsers and calculations.
> See the tzcode/tzdata project zic(8)/zdump(8)/tzfile(5) implementation
> limits for how wide those limits need to extend.
>
>> 🙎🏻♂️ jdoubleu
>> On 4/5/2022 6:03 AM, Brian Inglis wrote:
>>>
>>> local defines for POSIX minimum TZ abbr size 3 TZNAME_MIN and
>>> maximum TZ abbr size supported 10 TZNAME_MAX
>>> allow POSIX angle bracket < > quoted signed alphanumeric tz abbr e.g.
>>> <MESZ+0330>
>>> allow POSIX unquoted alphabetic tz abbr e.g. MESZ
>>> allow same suuport for DST tz abbr
>>> ---
>>> newlib/libc/time/tzset_r.c | 67 +++++++++++++++++++++++++++++++-------
>>> 1 file changed, 55 insertions(+), 12 deletions(-)
>
next prev parent reply other threads:[~2022-04-07 16:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-05 4:03 [PATCH 0/2] add tzset/_r POSIX angle bracket <> support in TZ env var Brian Inglis
2022-04-05 4:03 ` [PATCH 1/2] tzset.c: doc update POSIX angle bracket <> support Brian Inglis
2022-04-05 4:03 ` [PATCH 2/2] tzset_r.c(_tzset_unlocked_r): " Brian Inglis
2022-04-07 9:56 ` jdoubleu
2022-04-07 16:07 ` Brian Inglis
2022-04-07 16:18 ` jdoubleu [this message]
2022-04-07 15:48 ` jdoubleu
2022-04-07 21:35 ` Jeff Johnston
2022-04-07 23:36 ` Brian Inglis
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=f5de28e7-4fb8-a377-f4b7-9bdd8308f41b@jdoubleu.de \
--to=hi@jdoubleu.de \
--cc=newlib@sourceware.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).