From patchwork Fri Jul 6 17:48:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Albert ARIBAUD (3ADEV)" X-Patchwork-Id: 940652 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-94096-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=3adev.fr Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="Py5y+kXd"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Mj095dMsz9s29 for ; Sat, 7 Jul 2018 03:49:13 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; q=dns; s= default; b=BiNKvGkubjOet6tPcdPMGvgC2Cd+txO7J4AQoA3Al2+A3LyjfQdDl Lr2l8SIVHAg0WI7ucHt99aJFHrTyUJSfQjTV5BgXRya+1RVXyflcA2UgoheU6BTH AifUMsDQoeLPO58iJrphKpuZjFn9pr1+3/3UdMItXO1MY8Os2pOFCA= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id; s=default; bh=8p7SwoAhuyzp1ay24eFXnmy69Ms=; b=Py5y+kXdHIbbOnz/Jp7UY1nv0F7V j4yVpkgRbjGg0f/St3BB0osZrMKfx4KIJ0sbdNsUYByPQbd52sGrPGNs8E4LZlQk 4PglgxL149UqCGp82AuppYtdSYAOQovh0G56Y5M8q7o29ncclveu1sLG2ojSnw5f b03JAas9p1ccucY= Received: (qmail 124123 invoked by alias); 6 Jul 2018 17:49:06 -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 124093 invoked by uid 89); 6 Jul 2018 17:49:03 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.6 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 spammy=H*r:sk:smtp6-g, H*RU:212.27.42.6, H*RU:sk:smtp6-g, H*r:212.27.42 X-HELO: smtp6-g21.free.fr From: "Albert ARIBAUD (3ADEV)" To: libc-alpha@sourceware.org Cc: "Albert ARIBAUD (3ADEV)" Subject: [PATCH v6 0/2] Y2038 support - __time64_t and __tz_convert Date: Fri, 6 Jul 2018 19:48:52 +0200 Message-Id: <20180706174854.546-1-albert.aribaud@3adev.fr> The first patch introduces __TIMESIZE (which is the bit size of time_t at glibc build time, and equals __WORDSIZE except for x32 where __WORDSIZE is 32 but __TIMESIZE is 64) and __time64_t, the 64-bit counterpart of time_t, to be used in 64-bit-time implementations of public APIs related to time. Note that __time64_t replaces internal_time_t previously introduced. The second patch makes __tz_convert compatible with 64-bit time. This implies creating 64-bit-time versions of its callers and turning their original versions into wrappers if they were 32-bit-time. These patches are functionally tested as part of the whole Y2038 patch series using the ad hoc framework at https://github.com/3adev/y2038 which runs tests using times below, at and beyond the Y2038 limit. These patches were also run through build-many-glibcs.py to ensure that existing glibc configurations are not broken. The minimal configuration set is x86_64-linux-gnu, aarch64-linux-gnu, powerpc-linux-gnu, and arm-linux-gnueabi. Albert ARIBAUD (3ADEV) (2): Y2038: Add 64-bit time for all architectures Y2038: make __tz_convert compatible with 64-bit-time bits/timesize.h | 23 ++++++++++ bits/timesizes.h | 37 +++++++++++++++ include/time.h | 47 +++++++++++++++----- posix/bits/types.h | 8 ++++ stdlib/Makefile | 2 +- sysdeps/unix/sysv/linux/x86/bits/timesize.h | 26 +++++++++++ sysdeps/unix/sysv/linux/x86/bits/timesizes.h | 40 +++++++++++++++++ time/ctime.c | 17 ++++++- time/ctime_r.c | 19 ++++++-- time/gmtime.c | 39 +++++++++++++--- time/localtime.c | 36 +++++++++++++-- time/offtime.c | 12 ++--- time/tzfile.c | 32 ++++++------- time/tzset.c | 30 +++++-------- 14 files changed, 299 insertions(+), 69 deletions(-) create mode 100644 bits/timesize.h create mode 100644 bits/timesizes.h create mode 100644 sysdeps/unix/sysv/linux/x86/bits/timesize.h create mode 100644 sysdeps/unix/sysv/linux/x86/bits/timesizes.h