From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 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 dcvr.yhbt.net (Postfix) with ESMTPS id CDAF51F463 for ; Wed, 4 Dec 2019 19:41:44 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=GXJNQqFTq6LZFlT3 lcA1Pmv2+9dx9lKQ6n5WUftUKPVDzelZmRAmNUYD3H75PCbcOyM58ww8ltMJkuSx ScP1ylt4NJnbj7h88PdJho+jwddOOQzIP1jizdyx5Fi8aIe13aXFmQB+Z9xpjGVF wKQALByG79/PL4+qeC22hgbtzio= 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:to:references:from:subject:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=octIl5Vmk/WlrB9Y38dGxZ 3J3PA=; b=TT8dDfDL0kHUrx3sUAlWiHxescCTvVUOkg10T+tSUbUyR8Vs8dCym5 RGU4tmhxVb1ei3QutE4M+Igf7DOipMM5DOO1P3Q6FzJkGgp6CN4tL6LWyZRFKbju QULSF0wVj8VEYDrB773Bc+GfQfL16haG/NglgQKN9xCpFKCXDy7So= Received: (qmail 52170 invoked by alias); 4 Dec 2019 19:41:40 -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 Received: (qmail 52158 invoked by uid 89); 4 Dec 2019 19:41:40 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-vs1-f65.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=to:references:from:autocrypt:subject:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=KLYV1qmCoqayAB0LcQXbOt5YkzVGabwVFpDilLgpC20=; b=XjtDColNMZLQV8vFxcuesC7qdejRRSCM/vnxFcNBPLQarGFurK6ySbNM8wOlygaQOr hf5LjeCy3pZ9umbSRgzf7vSDOX4dCQdp1T0NEm6N0HVTl1T+hYt1a7VVGTvQSEIDvrqZ GVt21qqAjcfk8VvXMpDT5EcjYOpJSBP787c+DHg/ENbVxwVb4eqTFO6NkirXA+m8I3kr euXNPl2ambzsnuvoFi1YQ8BjNSbQm2FKzcmyjy7KdRkoFZZaC7h5F1YtnXin1qjH/EVo Dwsya1q0m+jidLQQpc81xT8MqeBOEYBQRVTVTMH5fPPJlA1hHi+iJdEksEsqnh1+mX68 6C3A== To: GNU C Library References: <20191111214758.3677-1-lukma@denx.de> <20191111214758.3677-2-lukma@denx.de> From: Adhemerval Zanella Subject: Re: [PATCH 1/5] time: Introduce glibc's internal struct __itimerspec64 Message-ID: <09615a6d-eb7e-35c6-8a60-ba1a2c12ed29@linaro.org> Date: Wed, 4 Dec 2019 16:41:32 -0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <20191111214758.3677-2-lukma@denx.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 11/11/2019 18:47, Lukasz Majewski wrote: > This change provides the glibc's internal struct itimerspec representation, > which is explicitly supporting 64 bit time (by using struct __timespec64). > > Such representation is necessary to provide correct time after Y2038 > (time_t overflow) on devides with __TIMESIZE == 32. LGTM, thanks. Reviewed-by: Adhemerval Zanella > --- > include/time.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/include/time.h b/include/time.h > index d7800eb30f..52ee213669 100644 > --- a/include/time.h > +++ b/include/time.h > @@ -82,6 +82,17 @@ struct __timespec64 > }; > #endif > > +#if __TIMESIZE == 64 > +# define __itimerspec64 itimerspec > +#else > +/* The glibc's internal representation of the struct itimerspec. */ > +struct __itimerspec64 > +{ > + struct __timespec64 it_interval; > + struct __timespec64 it_value; > +}; > +#endif > + > #if __TIMESIZE == 64 > # define __ctime64 ctime > #else > Ok, __timespec64 already handles both the padding and endianess.