From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from omta001.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) by sourceware.org (Postfix) with ESMTPS id 4AF323858002 for ; Thu, 7 Apr 2022 16:07:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4AF323858002 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=systematicsw.ab.ca Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTP id cSvHnfONJ43SgcUfinayYU; Thu, 07 Apr 2022 16:07:46 +0000 Received: from [10.0.0.5] ([184.64.124.72]) by cmsmtp with ESMTP id cUfin3VLRQV6mcUfinwrPb; Thu, 07 Apr 2022 16:07:46 +0000 X-Authority-Analysis: v=2.4 cv=PbTsOwtd c=1 sm=1 tr=0 ts=624f0c52 a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17 a=IkcTkHD0fZMA:10 a=NEAV23lmAAAA:8 a=CCpqsmhAAAAA:8 a=uYT-Tk0qkVT609LjNaIA:9 a=QEXdDO2ut3YA:10 a=O-xZXXFxz3YA:10 a=ul9cdbp4aOFLsgKbc677:22 Message-ID: Date: Thu, 7 Apr 2022 10:07:46 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Reply-To: newlib@sourceware.org Subject: Re: [PATCH 2/2] tzset_r.c(_tzset_unlocked_r): POSIX angle bracket <> support Content-Language: en-CA To: newlib@sourceware.org References: <20220405040358.18332-1-Brian.Inglis@SystematicSW.ab.ca> <20220405040358.18332-3-Brian.Inglis@SystematicSW.ab.ca> From: Brian Inglis Organization: Systematic Software In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfCaR29D6kAyH8mxKYAfKYehQdaJZ4LZRLlE4Bxg7bm0EMOeDurgp2kec2a04+y8rmDFx0VlbNLq2goL/ZFvYG9Pzx2aIH+hy+rySbsLoYkhvh5VXf3/V E0YZ0QEtmn60oE3yKa8S8lmTpkHjJpwnNWKct/3DXo/NsgNCXbUxU18QmIOUdDgC3gU3WpLQsbsIug8LkrUFhl5P/0EJaatK8es= X-Spam-Status: No, score=-1163.9 required=5.0 tests=BAYES_00, BODY_8BITS, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2022 16:07:48 -0000 On 2022-04-07 03:56, jdoubleu wrote: >> +#include     /* {,_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. >> >> 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(-) -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. [Data in binary units and prefixes, physical quantities in SI.]