From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id 0803C388A82D; Wed, 3 Jun 2020 17:28:44 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0803C388A82D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=joseph_myers@mentor.com IronPort-SDR: EKPTOtB9lC14Cs3gs+AhPNA2PGkUA62HCkhF4/UBtGUekgIoG68PO7tfOQE0Jq7/ozsEMMyeCt IbR5qddsYVEtcst/6VlhK0o/lC0egmVrcO6DuDqZmWJz+nheldkryvOOnTS8tpUF79ECMOBjZa forjY8psdZvCxc0VMiTpV2Pl+yddxJKxrJQxfB7SxN/CtaIzUl9TWRX0CgFyVbnb/Ie3g2c5uV sVV4r+aouyvbQXqzklvktltTX+hMMLf1lbrtCJYZS6l/mu4XxDb/mQXbAYkTjZdcyYUgWE9HWC ivM= X-IronPort-AV: E=Sophos;i="5.73,468,1583222400"; d="scan'208";a="51537160" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 03 Jun 2020 09:28:43 -0800 IronPort-SDR: rFsUD4RkIpagGnfTohcefvEC3p+sETYCyqbFJAROKR9JLEngdQX3owP3JNSAHQjKrnZepqiOGe RfuN9BBIxtA/vPGj4TocifqcQdmmKGHQwuDDbmEiJW5GrytgpRJfdqWYYwsXKYQ1aiuFDbL/1P dhTe8bUnLxlW1xB6yzFljdPcCKqa8eN4KgIW9EWD2Mdqe3W4x87FQnskkxzsD3TqTiC3gAcK8v qppR7QIYzekojzztVG4fikh1r2Bcas6oiDMx4I6qu6t19TYNZjOZ2fGgIBdkUad9g1rn/uqGKw 2KQ= Date: Wed, 3 Jun 2020 17:28:38 +0000 From: Joseph Myers X-X-Sender: jsm28@digraph.polyomino.org.uk To: Lukasz Majewski CC: Paul Eggert , Adhemerval Zanella , Florian Weimer , GNU C Library , Andreas Schwab , , Alistair Francis Subject: Re: [Y2038] Replacement of struct timespec with struct __timespec64 in glibc internal code In-Reply-To: <20200603145347.4025892b@jawa> Message-ID: References: <20200601140740.16371-1-lukma@denx.de> <20200603145347.4025892b@jawa> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) To svr-ies-mbx-02.mgc.mentorg.com (139.181.222.2) X-Spam-Status: No, score=-3131.1 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, 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: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Jun 2020 17:28:47 -0000 On Wed, 3 Jun 2020, Lukasz Majewski wrote: > To do it I could: > - Replace its occurences in relevant directories - like ./nptl or > ./sysdeps/pthread - i.e. rename all occurrences in a single directory > > - Replace them in functions (tests) and use explicit conversion > functions - like valid_timespec_to_timespec64() before passing struct > __timespec64 arguments (like ones for futex_time64 for nptl). > > - Replace _all_ occurrences in glibc tree of struct timespec with struct > __timespec64 at once with using sed on the glibc tree. Using sed obviously won't work, since external interfaces need different handling from purely internal uses. I think you need to change things bit by bit, in sufficiently small patches for convenient review. Regarding tests, I expect many tests of time-related interfaces should end up being built and run twice on systems that currently use 32-bit time, once to test the interfaces with 32-bit time and once to test the interfaces with 64-bit time. Also, tests can't generally use 64-bit time interfaces from libc until _TIME_BITS=64 support is actually implemented. So I think tests would be one of the last places to change (and similarly installed executables). Whereas any internal use of time in a function in the libraries that does not involve time in its interface can be updated more or less independently of any other such use, provided the relevant internal interfaces using 64-bit time are now available. -- Joseph S. Myers joseph@codesourcery.com