Message ID | 20210518205613.1487824-11-adhemerval.zanella@linaro.org |
---|---|
State | Superseded |
Headers |
Return-Path: <libc-alpha-bounces@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C41A53957049; Tue, 18 May 2021 20:56:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C41A53957049 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1621371395; bh=yEwPQmqbO8+sp04r9cHyzwyriS0Af+Y1igCuXBn5SWA=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=jLeiP4o0s3ZllX9ieFIxoGqiOIXGP3+XhiYMHmV1FEKXb42BtiK31/cCJDPt5ke7Z ZIgIBRj8DgfFCp/1njtHEoM8Vx0xaGEHdSZ+o4Mw2CuktQ8roAtEYqWswI+sh57F/w s2iqevK4dtBLg5N0nNer+8K2HlO7KemZOD13Hp/U= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-qt1-x833.google.com (mail-qt1-x833.google.com [IPv6:2607:f8b0:4864:20::833]) by sourceware.org (Postfix) with ESMTPS id 387E7396B40D for <libc-alpha@sourceware.org>; Tue, 18 May 2021 20:56:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 387E7396B40D Received: by mail-qt1-x833.google.com with SMTP id j11so8567541qtn.12 for <libc-alpha@sourceware.org>; Tue, 18 May 2021 13:56:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=yEwPQmqbO8+sp04r9cHyzwyriS0Af+Y1igCuXBn5SWA=; b=JhTnWFK5lpqqX818UJgM+hE9vUZTcnwTDsmsLvmstYDdgbZpJQ8rsDe+XQmzg/YUGd iGjuD6662gS4lIbPP3PwFRp8STdaF0dQ5OkDR1vYIWgSMKaLQjkb/454Gn1t+qyoQ/b6 OkxsiZvnWhqXfVkhXDQLpp6LC73dnYLYKigaC+/Sfki8WPpMZFpIWhuDf03x9SnceS0u g53biOE3SmkqyfGQvGxyrF5TLYEq8OjSbCKp28Riw5yvwejv6yPXr5/V+RxdNgQRir53 MIsrdpDqn4Gca4y0/Anb2I3whRnGh11n5YCffGGoC5pBWT8u0aeHj8FVd34jUpkSO4H9 hJNw== X-Gm-Message-State: AOAM533pn9nEnjYDyXpiTw8YFC6fOMqItVUl4/pvY4OxLemY+8/mWjFw NogP4hhJV8AVbUBVcYDRggUORe9xaaRPAA== X-Google-Smtp-Source: ABdhPJznV3XPBbWfuno5rKVdbi2BSkGNtamLB1kEsw7vqmxuoVnekbCrpIWGzsthFBZNBO6JuV6cfg== X-Received: by 2002:ac8:7611:: with SMTP id t17mr6893633qtq.294.1621371392642; Tue, 18 May 2021 13:56:32 -0700 (PDT) Received: from birita.. ([177.194.37.86]) by smtp.googlemail.com with ESMTPSA id o26sm13649937qkm.4.2021.05.18.13.56.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 May 2021 13:56:32 -0700 (PDT) To: libc-alpha@sourceware.org Subject: [PATCH v2 10/25] y2038: Add __USE_TIME_BITS64 support for struct timespec Date: Tue, 18 May 2021 17:55:58 -0300 Message-Id: <20210518205613.1487824-11-adhemerval.zanella@linaro.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210518205613.1487824-1-adhemerval.zanella@linaro.org> References: <20210518205613.1487824-1-adhemerval.zanella@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.6 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham 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 <libc-alpha.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/libc-alpha>, <mailto:libc-alpha-request@sourceware.org?subject=subscribe> From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org> Reply-To: Adhemerval Zanella <adhemerval.zanella@linaro.org> Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" <libc-alpha-bounces@sourceware.org> |
Series |
Add 64 bit time support on legacy ABIs
|
|
Checks
Context | Check | Description |
---|---|---|
dj/TryBot-apply_patch | success | Patch applied to master at the time it was sent |
Commit Message
Adhemerval Zanella
May 18, 2021, 8:55 p.m. UTC
The __USE_TIME_BITS64 is not defined internally yet. --- time/bits/types/struct_timespec.h | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
Comments
On Tue, 18 May 2021 17:55:58 -0300 Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote: > The __USE_TIME_BITS64 is not defined internally yet. > --- > time/bits/types/struct_timespec.h | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/time/bits/types/struct_timespec.h > b/time/bits/types/struct_timespec.h index d11c69cfd3..4fe47a0d25 > 100644 --- a/time/bits/types/struct_timespec.h > +++ b/time/bits/types/struct_timespec.h > @@ -1,18 +1,22 @@ > -/* NB: Include guard matches what <linux/time.h> uses. */ > -#ifndef _STRUCT_TIMESPEC > -#define _STRUCT_TIMESPEC 1 > +#ifndef __struct_timespec_defined > +#define __struct_timespec_defined 1 > > #include <bits/types.h> > #include <bits/endian.h> > +#include <bits/types/time_t.h> > > /* POSIX.1b structure for a time value. This is like a `struct > timeval' but has nanoseconds instead of microseconds. */ > struct timespec > { > +#ifdef __USE_TIME_BITS64 > + __time64_t tv_sec; /* Seconds. */ > +#else > __time_t tv_sec; /* Seconds. */ > +#endif > #if __WORDSIZE == 64 \ > || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \ > - || __TIMESIZE == 32 > + || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64) > __syscall_slong_t tv_nsec; /* Nanoseconds. */ > #else > # if __BYTE_ORDER == __BIG_ENDIAN Reviewed-by: Lukasz Majewski <lukma@denx.de> Best regards, Lukasz Majewski -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
On 5/18/21 4:55 PM, Adhemerval Zanella wrote: > The __USE_TIME_BITS64 is not defined internally yet. LGTM. No regressions on x86_64, i686, ppc64le, aarch64, s390x. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com> > --- > time/bits/types/struct_timespec.h | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > > diff --git a/time/bits/types/struct_timespec.h b/time/bits/types/struct_timespec.h > index d11c69cfd3..4fe47a0d25 100644 > --- a/time/bits/types/struct_timespec.h > +++ b/time/bits/types/struct_timespec.h > @@ -1,18 +1,22 @@ > -/* NB: Include guard matches what <linux/time.h> uses. */ > -#ifndef _STRUCT_TIMESPEC > -#define _STRUCT_TIMESPEC 1 > +#ifndef __struct_timespec_defined > +#define __struct_timespec_defined 1 > > #include <bits/types.h> > #include <bits/endian.h> > +#include <bits/types/time_t.h> > > /* POSIX.1b structure for a time value. This is like a `struct timeval' but > has nanoseconds instead of microseconds. */ > struct timespec > { > +#ifdef __USE_TIME_BITS64 > + __time64_t tv_sec; /* Seconds. */ OK. Use 64-bit seconds. > +#else > __time_t tv_sec; /* Seconds. */ > +#endif > #if __WORDSIZE == 64 \ > || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \ > - || __TIMESIZE == 32 > + || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64) > __syscall_slong_t tv_nsec; /* Nanoseconds. */ OK. > #else > # if __BYTE_ORDER == __BIG_ENDIAN >
diff --git a/time/bits/types/struct_timespec.h b/time/bits/types/struct_timespec.h index d11c69cfd3..4fe47a0d25 100644 --- a/time/bits/types/struct_timespec.h +++ b/time/bits/types/struct_timespec.h @@ -1,18 +1,22 @@ -/* NB: Include guard matches what <linux/time.h> uses. */ -#ifndef _STRUCT_TIMESPEC -#define _STRUCT_TIMESPEC 1 +#ifndef __struct_timespec_defined +#define __struct_timespec_defined 1 #include <bits/types.h> #include <bits/endian.h> +#include <bits/types/time_t.h> /* POSIX.1b structure for a time value. This is like a `struct timeval' but has nanoseconds instead of microseconds. */ struct timespec { +#ifdef __USE_TIME_BITS64 + __time64_t tv_sec; /* Seconds. */ +#else __time_t tv_sec; /* Seconds. */ +#endif #if __WORDSIZE == 64 \ || (defined __SYSCALL_WORDSIZE && __SYSCALL_WORDSIZE == 64) \ - || __TIMESIZE == 32 + || (__TIMESIZE == 32 && !defined __USE_TIME_BITS64) __syscall_slong_t tv_nsec; /* Nanoseconds. */ #else # if __BYTE_ORDER == __BIG_ENDIAN