From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 75387 invoked by alias); 5 Dec 2019 23:40:54 -0000 Mailing-List: contact glibc-cvs-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: , Sender: glibc-cvs-owner@sourceware.org List-Subscribe: Received: (qmail 75310 invoked by uid 10238); 5 Dec 2019 23:40:54 -0000 Date: Thu, 05 Dec 2019 23:40:00 -0000 Message-ID: <20191205234054.75308.qmail@sourceware.org> Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Lukasz Majewski To: glibc-cvs@sourceware.org Subject: [glibc] time: Introduce glibc's internal struct __itimerspec64 X-Act-Checkin: glibc X-Git-Author: Lukasz Majewski X-Git-Refname: refs/heads/master X-Git-Oldrev: 16554464bcd9d77b07c6ff419dc54f00e394fa50 X-Git-Newrev: 4b135425d889cb18b0fb3c3d166e115927042dda X-SW-Source: 2019-q4/txt/msg00549.txt.bz2 https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=4b135425d889cb18b0fb3c3d166e115927042dda commit 4b135425d889cb18b0fb3c3d166e115927042dda Author: Lukasz Majewski Date: Tue Nov 5 12:44:26 2019 +0100 time: Introduce glibc's internal struct __itimerspec64 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 devices with __TIMESIZE == 32. Reviewed-by: Adhemerval Zanella Diff: --- include/time.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/time.h b/include/time.h index c19c73a..1eb3d82 100644 --- a/include/time.h +++ b/include/time.h @@ -83,6 +83,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 extern char *__ctime64 (const __time64_t *__timer) __THROW;