unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella via Libc-alpha <libc-alpha@sourceware.org>
To: Lukasz Majewski <lukma@denx.de>, Joseph Myers <joseph@codesourcery.com>
Cc: Florian Weimer <fweimer@redhat.com>,
	GNU C Library <libc-alpha@sourceware.org>,
	Alistair Francis <alistair.francis@wdc.com>,
	Andreas Schwab <schwab@suse.de>
Subject: Re: [PATCH v2 4/7] y2038: Introduce struct __ntptimeval64 - new internal glibc type
Date: Tue, 19 May 2020 16:10:45 -0300	[thread overview]
Message-ID: <a523f4af-7ba5-03d2-6ea8-fc332a921f6d@linaro.org> (raw)
In-Reply-To: <20200508145640.16336-5-lukma@denx.de>



On 08/05/2020 11:56, Lukasz Majewski wrote:
> This type is a glibc's "internal" type to get time parameters data from
> Linux kernel (NTP daemon interface). It stores time in struct __timeval64
> rather than struct timeval, which makes it Y2038-proof.
> 
> Build tests:
> ./src/scripts/build-many-glibcs.py glibcs

LGTM, thanks.

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>

> ---
>  sysdeps/unix/sysv/linux/include/sys/timex.h | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
> 
> diff --git a/sysdeps/unix/sysv/linux/include/sys/timex.h b/sysdeps/unix/sysv/linux/include/sys/timex.h
> index cf3059f63c..8c536b9a95 100644
> --- a/sysdeps/unix/sysv/linux/include/sys/timex.h
> +++ b/sysdeps/unix/sysv/linux/include/sys/timex.h
> @@ -32,6 +32,7 @@ libc_hidden_proto (__adjtimex)
>  #   define __timex64 timex
>  #   define __clock_adjtime64 __clock_adjtime
>  #   define ___adjtimex64 ___adjtimex
> +#   define __ntptimeval64 ntptimeval
>  #  else
>  
>  struct __timex64
> @@ -77,6 +78,19 @@ extern int __clock_adjtime64 (const clockid_t clock_id, struct __timex64 *tx64);
>  libc_hidden_proto (__clock_adjtime64);
>  extern int ___adjtimex64 (struct __timex64 *tx64);
>  libc_hidden_proto (___adjtimex64)
> +
> +struct __ntptimeval64
> +{
> +  struct __timeval64 time;	/* current time (ro) */
> +  long int maxerror;	/* maximum error (us) (ro) */
> +  long int esterror;	/* estimated error (us) (ro) */
> +  long int tai;		/* TAI offset (ro) */
> +
> +  long int __glibc_reserved1;
> +  long int __glibc_reserved2;
> +  long int __glibc_reserved3;
> +  long int __glibc_reserved4;
> +};
>  #  endif
>  
>  /* Convert a known valid struct timex into a struct __timex64.  */
> 

  reply	other threads:[~2020-05-19 19:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08 14:56 [PATCH v2 0/7] y2038: Convert clock_adjtime related syscalls to support 64 bit time Lukasz Majewski
2020-05-08 14:56 ` [PATCH v2 1/7] y2038: linux: Provide __clock_adjtime64 implementation Lukasz Majewski
2020-05-15 10:03   ` Lukasz Majewski
2020-05-19 19:07   ` Adhemerval Zanella via Libc-alpha
2020-05-19 19:58     ` Lukasz Majewski
2020-05-08 14:56 ` [PATCH v2 2/7] y2038: linux: Provide ___adjtimex64 implementation Lukasz Majewski
2020-05-08 14:56 ` [PATCH v2 3/7] y2038: linux: Provide __adjtime64 implementation Lukasz Majewski
2020-05-08 14:56 ` [PATCH v2 4/7] y2038: Introduce struct __ntptimeval64 - new internal glibc type Lukasz Majewski
2020-05-19 19:10   ` Adhemerval Zanella via Libc-alpha [this message]
2020-05-08 14:56 ` [PATCH v2 5/7] y2038: Provide conversion helpers for struct __ntptimeval64 Lukasz Majewski
2020-05-19 19:12   ` Adhemerval Zanella via Libc-alpha
2020-05-08 14:56 ` [PATCH v2 6/7] y2038: linux: Provide __ntp_gettime64 implementation Lukasz Majewski
2020-05-19 19:18   ` Adhemerval Zanella via Libc-alpha
2020-05-19 20:20     ` Lukasz Majewski
2020-05-19 20:25       ` Adhemerval Zanella via Libc-alpha
2020-05-20 15:23       ` Joseph Myers
2020-05-20 17:08         ` Lukasz Majewski
2020-05-20 17:21           ` Joseph Myers
2020-05-21 10:31             ` Lukasz Majewski
2020-05-08 14:56 ` [PATCH v2 7/7] y2038: linux: Provide __ntp_gettimex64 implementation Lukasz Majewski
2020-05-19 19:19   ` Adhemerval Zanella via Libc-alpha

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

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a523f4af-7ba5-03d2-6ea8-fc332a921f6d@linaro.org \
    --to=libc-alpha@sourceware.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=alistair.francis@wdc.com \
    --cc=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=lukma@denx.de \
    --cc=schwab@suse.de \
    /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: link
Be 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).