unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Adhemerval Zanella Netto via Libc-alpha <libc-alpha@sourceware.org>
To: YunQiang Su <yunqiang.su@cipunited.com>, libc-alpha@sourceware.org
Cc: aurelien@aurel32.net, jiaxun.yang@flygoat.com, macro@orcam.me.uk,
	syq@debian.org
Subject: Re: [PATCH] Rename STAT_HAS_TIME32 to KERNEL_STAT64_HAS_TIME32
Date: Thu, 17 Nov 2022 13:47:04 -0300	[thread overview]
Message-ID: <9a9d4b58-2bb7-c31c-76c7-750b2b5fd9b7@linaro.org> (raw)
In-Reply-To: <20221104015428.1545677-1-yunqiang.su@cipunited.com>



On 03/11/22 22:54, YunQiang Su wrote:
> The macro name STAT_HAS_TIME32 is not so clear.
> 
> This macro is used for some arch like MIPSn64.
> The kernel_stat/kernel_stat64 of it has a 32bit unsigned time value.
> Thus that has y2106 problem.
> So we should statx to solve this problem.

I am not seeing much gain in this refactor, it is only an internal define
used once and on its definition it already states the problem (and the 
y2106 issue is already stated in 5b980d48099130).  I prefer to keep current
macro so keep git history simpler.

> ---
>  sysdeps/unix/sysv/linux/fstatat64.c        | 2 +-
>  sysdeps/unix/sysv/linux/mips/kernel_stat.h | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sysdeps/unix/sysv/linux/fstatat64.c b/sysdeps/unix/sysv/linux/fstatat64.c
> index 8b1a1a290d..532b9beb67 100644
> --- a/sysdeps/unix/sysv/linux/fstatat64.c
> +++ b/sysdeps/unix/sysv/linux/fstatat64.c
> @@ -42,7 +42,7 @@ _Static_assert (sizeof (__blkcnt_t) == sizeof (__blkcnt64_t),
>  
>  #if (__WORDSIZE == 32 \
>       && (!defined __SYSCALL_WORDSIZE || __SYSCALL_WORDSIZE == 32)) \
> -     || defined STAT_HAS_TIME32 \
> +     || defined KERNEL_STAT64_HAS_TIME32 \
>       || (!defined __NR_newfstatat && !defined __NR_fstatat64)
>  # define FSTATAT_USE_STATX 1
>  
> diff --git a/sysdeps/unix/sysv/linux/mips/kernel_stat.h b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
> index 19524f7ea4..044adfb8df 100644
> --- a/sysdeps/unix/sysv/linux/mips/kernel_stat.h
> +++ b/sysdeps/unix/sysv/linux/mips/kernel_stat.h
> @@ -69,7 +69,7 @@ struct kernel_stat
>  #endif
>  /* MIPS64 has unsigned 32 bit timestamps fields, so use statx as well.  */
>  #if _MIPS_SIM == _ABI64
> -# define STAT_HAS_TIME32
> +# define KERNEL_STAT64_HAS_TIME32
>  #endif
>  
>  #endif

      parent reply	other threads:[~2022-11-17 16:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-04  1:54 [PATCH] Rename STAT_HAS_TIME32 to KERNEL_STAT64_HAS_TIME32 YunQiang Su
2022-11-04 10:02 ` Arnd Bergmann
2022-11-07 18:08   ` Adhemerval Zanella Netto via Libc-alpha
2022-11-07 18:24     ` Arnd Bergmann
2022-11-07 18:45       ` Adhemerval Zanella Netto via Libc-alpha
2022-11-08 11:21         ` Arnd Bergmann
2022-11-08 12:04           ` Adhemerval Zanella Netto via Libc-alpha
2022-11-17 16:47 ` Adhemerval Zanella Netto via Libc-alpha [this message]

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=9a9d4b58-2bb7-c31c-76c7-750b2b5fd9b7@linaro.org \
    --to=libc-alpha@sourceware.org \
    --cc=adhemerval.zanella@linaro.org \
    --cc=aurelien@aurel32.net \
    --cc=jiaxun.yang@flygoat.com \
    --cc=macro@orcam.me.uk \
    --cc=syq@debian.org \
    --cc=yunqiang.su@cipunited.com \
    /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).