public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: DJ Delorie <dj@redhat.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH v6] Always define __USE_TIME_BITS64 when 64 bit time_t is used
Date: Mon, 01 Apr 2024 22:57:10 -0400	[thread overview]
Message-ID: <xncyr85v5l.fsf@greed.delorie.com> (raw)
In-Reply-To: <20240318122148.196392-1-adhemerval.zanella@linaro.org> (message from Adhemerval Zanella on Mon, 18 Mar 2024 09:21:48 -0300)


Looks good to me with the exception of the one doc change Andreas
pointed out.  Ok with the proposed change.
Reviewed-by: DJ Delorie <dj@redhat.com>

Adhemerval Zanella <adhemerval.zanella@linaro.org> writes:
> Changes from v5:
> * Removed sysdeps/generic/features-time64.h.
> * Fixes documentation wording.

Confirmed.

> Changes from v4:
> * Move the __USE_TIME64_REDIRECTS documentation to creature.texi.
> * Do not define __USE_TIME64_REDIRECTS for generic case.

Confirmed.

> diff --git a/manual/creature.texi b/manual/creature.texi
> index 3fc53619ea..be0a5ac7e6 100644
> --- a/manual/creature.texi
> +++ b/manual/creature.texi
> @@ -192,6 +192,12 @@ Linux kernel version on which the system is running. For Linux kernel
>  version above @b{5.1} syscalls supporting 64-bit time are used. Otherwise,
>  a fallback code is used with legacy (i.e. 32-bit) syscalls.
>  
> +On such platforms, @theglibc{} will also define @code{__USE_TIME64_REDIRECTS}
> +to indicate whether the declarations are expanded to different ones
> +(either by redefiniding the symbol name or using symbol aliais).
> +For instance, if the symbol @code{clock_gettime} expands to
> +@code{__glock_gettime64}.

Ok.

> diff --git a/manual/maint.texi b/manual/maint.texi
> index 89da704f45..d08f30a6e0 100644
> --- a/manual/maint.texi
> +++ b/manual/maint.texi
> @@ -491,6 +491,10 @@ derived as in the dual-time configuration case, and which expands to
>  the symbol's name.  For instance, the macro @code{__clock_gettime64}
>  expands to @code{clock_gettime}.
>  
> +When @code{__TIMESIZE == 64} is set to 64, @theglibc{} will also define

As Andreas noted, needs fixing.

> +the@code{__USE_TIME_BITS64} macro.  It is used by the Linux kernel ABI
> +to set the expected @code{time_t} size used on some syscalls.

Ok.

> diff --git a/sysdeps/generic/features-time64.h b/sysdeps/generic/features-time64.h
> deleted file mode 100644

Ok.

> diff --git a/sysdeps/unix/sysv/linux/features-time64.h b/sysdeps/unix/sysv/linux/features-time64.h
> index dd3442c2ea..8d573cd23e 100644
> --- a/sysdeps/unix/sysv/linux/features-time64.h
> +++ b/sysdeps/unix/sysv/linux/features-time64.h
> @@ -24,9 +24,8 @@
>  # if _TIME_BITS == 64
>  #  if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
>  #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
> -#  elif __TIMESIZE == 32
> -#   define __USE_TIME_BITS64	1
>  #  endif
> +#  define __USE_TIME_BITS64	1
>  # elif _TIME_BITS == 32
>  #  if __TIMESIZE > 32
>  #   error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32"

Ok.

> @@ -34,4 +33,10 @@
>  # else
>  #  error Invalid _TIME_BITS value (can only be 32 or 64-bit)
>  # endif
> +#elif __TIMESIZE == 64
> +# define __USE_TIME_BITS64      1
> +#endif
> +
> +#if defined __USE_TIME_BITS64 && __TIMESIZE == 32
> +# define __USE_TIME64_REDIRECTS 1
>  #endif

Ok.


Mechanical change follows...

> diff --git a/io/bits/poll2.h b/io/bits/poll2.h
 . . .

Ok.


  parent reply	other threads:[~2024-04-02  2:57 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-18 12:21 [PATCH v5] " Adhemerval Zanella
2024-03-18 12:23 ` Adhemerval Zanella Netto
2024-03-18 12:37 ` Andreas Schwab
2024-03-18 12:53   ` Adhemerval Zanella Netto
2024-04-02  2:57 ` DJ Delorie [this message]
2024-04-04 17:28   ` [PATCH v6] " Joseph Myers
2024-04-04 18:22     ` Adhemerval Zanella Netto

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=xncyr85v5l.fsf@greed.delorie.com \
    --to=dj@redhat.com \
    --cc=adhemerval.zanella@linaro.org \
    --cc=libc-alpha@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: 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).