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 31A783858C20 for ; Wed, 16 Feb 2022 19:18:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 31A783858C20 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-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTP id KNBrn5QVg5Rf1KPounAag6; Wed, 16 Feb 2022 19:18:32 +0000 Received: from [10.0.0.5] ([184.64.124.72]) by cmsmtp with ESMTP id KPotn7lvxebQ7KPounHPg2; Wed, 16 Feb 2022 19:18:32 +0000 X-Authority-Analysis: v=2.4 cv=fZK+dmcF c=1 sm=1 tr=0 ts=620d4e08 a=oHm12aVswOWz6TMtn9zYKg==:117 a=oHm12aVswOWz6TMtn9zYKg==:17 a=IkcTkHD0fZMA:10 a=uZvujYp8AAAA:8 a=ibnGbSnJAAAA:8 a=taqhHyBG8lLeJkK_GJ8A:9 a=QEXdDO2ut3YA:10 a=nWmG9tzP0yIA:10 a=yR9T06vYs1AA:10 a=tFKFYrkxXOwA:10 a=SLzB8X_8jTLwj6mN0q5r:22 a=rJvkdzOZpAGdws5lY5aP:22 Message-ID: <66b3d84e-4faf-711b-ab2b-855554c3fafa@SystematicSw.ab.ca> Date: Wed, 16 Feb 2022 12:18:31 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Reply-To: newlib@sourceware.org Subject: Re: [PATCH 0/1] newlib/libc/time/tzset_r.c(_tzset_unlocked_r): add POSIX <> quoted abbrs Content-Language: en-CA To: newlib@sourceware.org References: <20220215215701.40283-1-Brian.Inglis@SystematicSW.ab.ca> <1451bc59-821e-aa0f-100a-8abceca94662@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: MS4xfFqjRpOwIwTJHFwzXMIuSarRVvKfsU01drtDRQwl0MkdOv2kpU0OnaE90ehRQD0Kay5vpf+QGdZ4xjAhipQUeUwqqNceOwWrKSXRDxzmxAh5gWEEfcq3 wEC4FaJ0q16YciwsPEhQhBXGLv8eSGf97PBwJWVfQ29yXFhLQMP3JXVDDd2FWSDKsRc9zVFJEDDnfJDm4Ca5pz9apYd7HQxLwa4= X-Spam-Status: No, score=-1163.7 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: Wed, 16 Feb 2022 19:18:42 -0000 On 2022-02-16 01:55, Corinna Vinschen wrote: > On Feb 15 22:38, Brian Inglis wrote: >> On 2022-02-15 15:04, Brian Inglis wrote: >>> Submitted a newlib patch which builds okay, but cannot test, as I don't >>> have a newlib platform to run on, and Cygwin uses it's own TZ DB code >>> base. >>> It should accept up to 10 character abbreviations for STD and DST >>> matching POSIX specs including anything within < > quoted content. >>> If someone needing this could build, test, and send feedback, I'd >>> appreciate it. >>> --- >>>   newlib/libc/time/tzset_r.c | 68 ++++++++++++++++++++++++++++++++------ >>>   1 file changed, 58 insertions(+), 10 deletions(-) >> >> Regarding the 10 character limit above, reviewing the POSIX and tzset.c >> documentation, the size limit should be TZNAME_MAX, so some changes may need >> to be made to the values or the code, as _POSIX_TZNAME_MAX is the minimum >> acceptable value: >> >> https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/limits.h.html >> >> and the value used should be that configured: >> >> https://pubs.opengroup.org/onlinepubs/9699919799/functions/sysconf.html >> >> also: >> >> https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_xbd_chap08.html#tag_21_08_03_05 >> >> newlib/libc/include/sys/unistd.h:#define _SC_TZNAME_MAX 20 >> newlib/libc/sys/rtems/include/limits.h:#define _POSIX_TZNAME_MAX 3 >> newlib/libc/sys/rtems/include/limits.h:#define TZNAME_MAX 3 >> winsup/cygwin/include/limits.h:#define _POSIX_TZNAME_MAX 6 >> >> Discussion of whether and how to define and align TZNAME_MAX values are >> welcome: Cygwin punts and leaves it undefined, so developers have a choice >> of using the alternatives unistd.h sysconf(_SC_TZNAME_MAX) or >> _POSIX_TZNAME_MAX. >> >> I am inclined to use if defined in order: >> * limits.h TZNAME_MAX >> * unistd.h sysconf(_SC_TZNAME_MAX) if available >> * limits.h _POSIX_TZNAME_MAX >> * 6! > > I'd replace 6 with #error That's probably for the best - I'll look at adding that to a v2 patch set including doc update. What is required to remake newlib libc info and man pages? Do I need to specify a special target or maintainer mode? Updated tzset.def libc.info are not showing up in my build or install dirs! I am sure I had all the tools and this used to work reliably. -- 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.]