public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Adhemerval Zanella <azanella@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc/azanella/y2038] y2038: Add __USE_TIME_BITS64 support for struct timespec Date: Thu, 4 Mar 2021 11:31:18 +0000 (GMT) [thread overview] Message-ID: <20210304113118.D91E639DC4F9@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=d798b1583d55cab875a3bc3fb42b2840c77f5d8d commit d798b1583d55cab875a3bc3fb42b2840c77f5d8d Author: Adhemerval Zanella <adhemerval.zanella@linaro.org> Date: Wed Feb 17 16:19:45 2021 -0300 y2038: Add __USE_TIME_BITS64 support for struct timespec The __USE_TIME_BITS64 is not defined internally yet. Diff: --- 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
next reply other threads:[~2021-03-04 11:31 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-03-04 11:31 Adhemerval Zanella [this message] -- strict thread matches above, loose matches on Subject: below -- 2021-06-08 20:48 Adhemerval Zanella 2021-05-26 16:24 Adhemerval Zanella 2021-03-05 19:20 Adhemerval Zanella 2021-03-04 17:38 Adhemerval Zanella 2021-03-02 12:33 Adhemerval Zanella 2021-03-01 17:37 Adhemerval Zanella 2021-02-26 20:42 Adhemerval Zanella 2021-02-23 20:40 Adhemerval Zanella 2021-02-23 12:38 Adhemerval Zanella
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210304113118.D91E639DC4F9@sourceware.org \ --to=azanella@sourceware.org \ --cc=glibc-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).