[v2,11/25] y2038: Add __USE_TIME_BITS64 support for struct utimbuf

Message ID 20210518205613.1487824-12-adhemerval.zanella@linaro.org
State Superseded
Headers
Series Add 64 bit time support on legacy ABIs |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Adhemerval Zanella Netto May 18, 2021, 8:55 p.m. UTC
  The __USE_TIME_BITS64 is not defined internally yet.
---
 io/utime.h | 5 +++++
 1 file changed, 5 insertions(+)
  

Comments

Lukasz Majewski May 19, 2021, 9:04 a.m. UTC | #1
On Tue, 18 May 2021 17:55:59 -0300
Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:

> The __USE_TIME_BITS64 is not defined internally yet.
> ---
>  io/utime.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/io/utime.h b/io/utime.h
> index df2299e406..c7612d0838 100644
> --- a/io/utime.h
> +++ b/io/utime.h
> @@ -35,8 +35,13 @@ __BEGIN_DECLS
>  /* Structure describing file times.  */
>  struct utimbuf
>    {
> +#ifdef __USE_TIME_BITS64
> +    __time64_t actime;		/* Access time.  */
> +    __time64_t modtime;		/* Modification time.  */
> +#else
>      __time_t actime;		/* Access time.  */
>      __time_t modtime;		/* Modification time.  */
> +#endif
>    };
>  
>  /* Set the access and modification times of FILE to those given in

Reviewed-by: Lukasz Majewski <lukma@denx.de>

Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
  
Carlos O'Donell June 4, 2021, 7:31 p.m. UTC | #2
On 5/18/21 4:55 PM, Adhemerval Zanella wrote:
> The __USE_TIME_BITS64 is not defined internally yet.

LGTM. Reviewed utime usage in this case.

No regressions on x86_64, i686, ppc64le, aarch64, s390x.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
Tested-by: Carlos O'Donell <carlos@redhat.com>

> ---
>  io/utime.h | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/io/utime.h b/io/utime.h
> index df2299e406..c7612d0838 100644
> --- a/io/utime.h
> +++ b/io/utime.h
> @@ -35,8 +35,13 @@ __BEGIN_DECLS
>  /* Structure describing file times.  */
>  struct utimbuf
>    {
> +#ifdef __USE_TIME_BITS64
> +    __time64_t actime;		/* Access time.  */
> +    __time64_t modtime;		/* Modification time.  */

OK.

> +#else
>      __time_t actime;		/* Access time.  */
>      __time_t modtime;		/* Modification time.  */
> +#endif
>    };
>  
>  /* Set the access and modification times of FILE to those given in
>
  

Patch

diff --git a/io/utime.h b/io/utime.h
index df2299e406..c7612d0838 100644
--- a/io/utime.h
+++ b/io/utime.h
@@ -35,8 +35,13 @@  __BEGIN_DECLS
 /* Structure describing file times.  */
 struct utimbuf
   {
+#ifdef __USE_TIME_BITS64
+    __time64_t actime;		/* Access time.  */
+    __time64_t modtime;		/* Modification time.  */
+#else
     __time_t actime;		/* Access time.  */
     __time_t modtime;		/* Modification time.  */
+#endif
   };
 
 /* Set the access and modification times of FILE to those given in