From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 55449 invoked by alias); 13 Jun 2018 14:13:32 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 55430 invoked by uid 89); 13 Jun 2018 14:13:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=Hx-languages-length:1040, wishes X-HELO: relay1.mentorg.com Date: Wed, 13 Jun 2018 14:13:00 -0000 From: Joseph Myers To: "Albert ARIBAUD (3ADEV)" CC: Subject: Re: [PATCH 1/2] Y2038: add type __time64_t In-Reply-To: <20180613070019.4639-2-albert.aribaud@3adev.fr> Message-ID: References: <20180613070019.4639-1-albert.aribaud@3adev.fr> <20180613070019.4639-2-albert.aribaud@3adev.fr> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-SW-Source: 2018-06/txt/msg00312.txt.bz2 There is a key definition you are missing in this patch: one that says whether the particular glibc configuration supports 32-bit time_t at all. This new macro could go in bits/wordsize.h, or in its own installed header. The value is normally the same as (__WORDSIZE == 32), *except* on x32, which already has 64-bit time_t despite 32-bit wordsize. The new macro would be used, in the installed headers, to control whether an explicit _TIME_BITS=32 is valid or not. It would also be used, in glibc internals, to control whether there are separate 32-bit interfaces that wrap 64-bit ones, or whether the 64-bit names are just #defined to the generic ones (#define __clock_gettime64 __clock_gettime, in some internal header, for example) to avoid creating any new interfaces in the case where time_t is already 64-bit, while avoiding the need for lots of conditionals where glibc-internal code written for 64-bit time_t wishes to call such interfaces. -- Joseph S. Myers joseph@codesourcery.com