From patchwork Wed Jun 26 17:49:50 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Zack Weinberg X-Patchwork-Id: 33434 Received: (qmail 54305 invoked by alias); 26 Jun 2019 18:06:20 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 54295 invoked by uid 89); 26 Jun 2019 18:06:20 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.1 spammy=HContent-Transfer-Encoding:8bit X-HELO: l2mail1.panix.com From: Zack Weinberg To: libc-alpha@sourceware.org Cc: joseph@codesourcery.com, carlos@redhat.com Subject: [PATCH 05/25] Simplify definition of __time64_t. Date: Wed, 26 Jun 2019 13:49:50 -0400 Message-Id: <20190626174954.8009-6-zackw@panix.com> In-Reply-To: <20190626174954.8009-1-zackw@panix.com> References: <20190626174954.8009-1-zackw@panix.com> MIME-Version: 1.0 bits/time64.h always sets __TIME64_T_TYPE to be __time_t when __TIMESIZE == 64, so we can unconditionally use __TIME64_T_TYPE to define __time64_t; we don’t need another conditional in bits/types.h. Also move the definition of __time64_t next to the definition of __time_t. * posix/bits/types.h (__time64_t): Unconditionally define as __TIME64_T_TYPE. Move definition next to __time_t. --- posix/bits/types.h | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/posix/bits/types.h b/posix/bits/types.h index 73e6a1aef4..1f079505a7 100644 --- a/posix/bits/types.h +++ b/posix/bits/types.h @@ -158,6 +158,7 @@ __STD_TYPE __RLIM_T_TYPE __rlim_t; /* Type for resource measurement. */ __STD_TYPE __RLIM64_T_TYPE __rlim64_t; /* Type for resource measurement (LFS). */ __STD_TYPE __ID_T_TYPE __id_t; /* General type for IDs. */ __STD_TYPE __TIME_T_TYPE __time_t; /* Seconds since the Epoch. */ +__STD_TYPE __TIME64_T_TYPE __time64_t; /* Seconds since the Epoch (Y2038). */ __STD_TYPE __USECONDS_T_TYPE __useconds_t; /* Count of microseconds. */ __STD_TYPE __SUSECONDS_T_TYPE __suseconds_t; /* Signed count of microseconds. */ @@ -213,15 +214,6 @@ __STD_TYPE __U32_TYPE __socklen_t; It is not currently necessary for this to be machine-specific. */ typedef int __sig_atomic_t; -/* Seconds since the Epoch, visible to user code when time_t is too - narrow only for consistency with the old way of widening too-narrow - types. User code should never use __time64_t. */ -#if __TIMESIZE == 64 && defined __LIBC -# define __time64_t __time_t -#elif __TIMESIZE != 64 -__STD_TYPE __TIME64_T_TYPE __time64_t; -#endif - /* BSD: Size of a general-purpose integer register. */ __STD_TYPE __REGISTER_T_TYPE __register_t;