From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out-no.shaw.ca (smtp-out-no.shaw.ca [64.59.134.13]) by sourceware.org (Postfix) with ESMTPS id 676B639540F2 for ; Mon, 3 May 2021 16:50:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 676B639540F2 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=SystematicSw.ab.ca Authentication-Results: sourceware.org; spf=none smtp.mailfrom=brian.inglis@systematicsw.ab.ca Received: from [192.168.1.104] ([68.147.0.90]) by shaw.ca with ESMTP id dblwlQhtOycp5dblxl5DfH; Mon, 03 May 2021 10:50:17 -0600 X-Authority-Analysis: v=2.4 cv=H864f8Ui c=1 sm=1 tr=0 ts=609029c9 a=T+ovY1NZ+FAi/xYICV7Bgg==:117 a=T+ovY1NZ+FAi/xYICV7Bgg==:17 a=IkcTkHD0fZMA:10 a=uYT-Tk0qkVT609LjNaIA:9 a=QEXdDO2ut3YA:10 Reply-To: newlib@sourceware.org References: <20210503083750.1043988-1-rdiezmail-newlib.ref@yahoo.de> <20210503083750.1043988-1-rdiezmail-newlib@yahoo.de> <53d89c9a-770d-2e75-607e-75f5eee92f5d@SystematicSw.ab.ca> <4ac2f39b-54b0-db21-b627-e60a456f88f9@yahoo.de> To: newlib@sourceware.org From: Brian Inglis Organization: Systematic Software Subject: Re: [PATCH] Refactor mktime and add the POSIX function timegm Message-ID: Date: Mon, 3 May 2021 10:50:16 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <4ac2f39b-54b0-db21-b627-e60a456f88f9@yahoo.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-CA Content-Transfer-Encoding: 8bit X-CMAE-Envelope: MS4xfOuEA3dx4DnAE6Y94wIU7GEz9fhpkJ3xiNsh9OLtEH21LDMhF/lhYSbMqkrSdoD/ZCKcAqAGrBlEGFxxdY4gKg/IJMxIVl5D8ExIzWUACA/k5jdjphs9 yT08637h5bDFnkJcugLS6nyi87mbxt9aQfxaJc3rq+e9G3zQGXsoOlWOE3MyfqCg94mnnC2R/ltt+iW4a9M+QPHnUiY4zqKpaLg= X-Spam-Status: No, score=0.6 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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: Mon, 03 May 2021 16:50:19 -0000 On 2021-05-03 10:23, R. Diez wrote: >> [...] >> Don't see where *non-inline* static functions and trivial renames are >> improvements over macros. >> [...] > Like I said, I did not write the code, I only manually reconstructed the last > patch version from Andrew Russell. > I was under the impression that the patch had already been reviewed, at least up > to a point. It was by no means the first patch version posted. > But, if there is some sort of consensus here, I could rework the patch. >> It may have been better to compare against the upstream BSD (or tzcode) sources >> [...] > That means extra work. Do you have any reason to suspect that the existing code > is wrong in some way? Or do you know whether the code in Newlib is actually > supposed to track some BSD or tzcode source? There is no source code comment to > that respect, and the code in other libraries will probably have diverged by now. > > Unless you volunteer and/or specify concrete reasons, I would assume that the > existing implementation in Newlib is fine, so a small refactor in order to > provide timegm() is probably the best solution. Such a patch is also easier to > review than bringing in new or further modified code from an external source. My comments are for your and the committers' consideration. I previously commented on patches after comparing some source files against BSD (licence) and tzcode (public domain) upstreams and found them line-by-line similar mostly: it's been a while and details are now fuzzy. Some amounts of newlib code are pulled or adapted from BSD sources, as the licences allow commercial use, and newlib is used in RTEMS and development products offered by hardware and RT OS vendors. As you may have noticed, there are not always a lot of comments in sources. Such a substantial patch will also require a BSD licence assignment, but given that it is an adaptation of another's work, I am unsure where that leaves it. -- 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.]