From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 7F47139A0005 for ; Fri, 4 Jun 2021 19:31:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 7F47139A0005 Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-545-IjpLvUxKN3inxHg8QlL0ow-1; Fri, 04 Jun 2021 15:31:25 -0400 X-MC-Unique: IjpLvUxKN3inxHg8QlL0ow-1 Received: by mail-qt1-f199.google.com with SMTP id w1-20020ac87a610000b02902433332a0easo5859645qtt.0 for ; Fri, 04 Jun 2021 12:31:25 -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:subject:to:cc:references:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=3bHmTPnU+WlZq3ZmQ6bpt9zh6AK3C24mFLUYZxL6tyY=; b=J9cEp55ndbnCjl+ESpU5G83kx4ve5uSfJd3hVqmULufSvuCvcCDlnZuZRgfeRukAbw w6t6KqKEk0l+4M9fi74s9CAU8XKnAWFSQsAo06GulPrN9tDrkACyB6RiKuQi4PqFk/MB N6V4bvi9dLkSoMfzINh+WGjlyFPM8DKvVBmiqqgXyiKCXhg5fGtseEfGAUebqJ2MM7AL egyZ2NXYS3mbGIJEoeJ2qN9FHgR2A3Alh52a/A/5LoSoNtRHw9v5nKGW4VZqlns56VZt ZzfgEFc7Kd3Vcefa+huHDxKp0jbdLMWF3vFnBge/E9XWFFC2Tq7kfunKbHOMG0QD0iaQ o7qg== X-Gm-Message-State: AOAM530skBJQjqzK82jwlIpDAVXWLo7URWadI0ZRZVePbO/Ys/b76wmi OrvzTkLhelxKvQDBNjkFl97ZEJqACN5eFwJWXPMP77iNts4CM3CBp7bI0V+qI9st7/f0v3hY3UQ cGmtAJbiFXl+hxvyRyecQ X-Received: by 2002:a37:6645:: with SMTP id a66mr5962228qkc.314.1622835084903; Fri, 04 Jun 2021 12:31:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxm7Dl6CScw5xeqnXmqkNkiXOEyGZMFBFrqP7n2wiR867rGlRu0IwpcyAisybY61E1M5GmBbQ== X-Received: by 2002:a37:6645:: with SMTP id a66mr5962215qkc.314.1622835084739; Fri, 04 Jun 2021 12:31:24 -0700 (PDT) Received: from [192.168.1.16] (198-84-214-74.cpe.teksavvy.com. [198.84.214.74]) by smtp.gmail.com with ESMTPSA id s11sm4262539qti.6.2021.06.04.12.31.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 04 Jun 2021 12:31:24 -0700 (PDT) From: Carlos O'Donell Subject: Re: [PATCH v2 10/25] y2038: Add __USE_TIME_BITS64 support for struct timespec To: Adhemerval Zanella , libc-alpha@sourceware.org References: <20210518205613.1487824-1-adhemerval.zanella@linaro.org> <20210518205613.1487824-11-adhemerval.zanella@linaro.org> Organization: Red Hat Message-ID: Date: Fri, 4 Jun 2021 15:31:23 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20210518205613.1487824-11-adhemerval.zanella@linaro.org> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-12.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Jun 2021 19:31:30 -0000 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 Tested-by: Carlos O'Donell > --- > 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 uses. */ > -#ifndef _STRUCT_TIMESPEC > -#define _STRUCT_TIMESPEC 1 > +#ifndef __struct_timespec_defined > +#define __struct_timespec_defined 1 > > #include > #include > +#include > > /* 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 > -- Cheers, Carlos.