From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=3.0 tests=AWL,BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_PASS, SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id B8B691FB0A for ; Thu, 3 Dec 2020 23:25:23 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 870FC385482C; Thu, 3 Dec 2020 23:25:22 +0000 (GMT) Received: from mail-out.m-online.net (mail-out.m-online.net [IPv6:2001:a60:0:28:0:1:25:1]) by sourceware.org (Postfix) with ESMTPS id C6257385481A for ; Thu, 3 Dec 2020 23:25:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org C6257385481A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=denx.de Authentication-Results: sourceware.org; spf=none smtp.mailfrom=lukma@denx.de Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4CnBlF4T4Cz1rvxj; Fri, 4 Dec 2020 00:25:13 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4CnBlF2rCFz1rhFy; Fri, 4 Dec 2020 00:25:13 +0100 (CET) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id XuRM59lkv9mW; Fri, 4 Dec 2020 00:25:10 +0100 (CET) X-Auth-Info: R+BkBsURhA8JMwx6gyRguHfqgM2U6v5gcqsqOYi5gSc= Received: from jawa (89-64-5-98.dynamic.chello.pl [89.64.5.98]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Fri, 4 Dec 2020 00:25:10 +0100 (CET) Date: Fri, 4 Dec 2020 00:24:51 +0100 From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Subject: Re: [RFC] y2038: Export struct_stat_time64_helper.h with Y2038 safe stat{64} content Message-ID: <20201204002451.4d7d0447@jawa> In-Reply-To: <20201028094605.5d05098a@jawa> References: <20201020110154.10586-1-lukma@denx.de> <20201028094605.5d05098a@jawa> Organization: denx.de X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/=A1R/87NOk.1KbjaZf1+iWV"; protocol="application/pgp-signature" X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Florian Weimer , Andreas Schwab , Alistair Francis , Stepan Golosunov , GNU C Library Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" --Sig_/=A1R/87NOk.1KbjaZf1+iWV Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Wed, 28 Oct 2020 09:46:05 +0100 Lukasz Majewski wrote: > Dear Community, >=20 > > This patch exports fields of y2038 safe members of struct stat when > > -D_TIME_BITS=3D64 is passed as compilation flag. > >=20 > > Such approach will allow avoiding many copies of the same structure > > for several other architectures. > >=20 > > It was also necessary to redefine some parts of this structure for > > the glibc internal struct __stat64_t64 as the struct __timespec64 > > is not exported and only used locally in the glibc. > >=20 > > Exported, port specific (with __WORDSIZE=3D32 && __TIMESIZE!=3D64), > > struct stat has been modified to support 64 bit time as well. > > --- > > sysdeps/unix/sysv/linux/Makefile | 3 +- > > sysdeps/unix/sysv/linux/bits/struct_stat.h | 17 ++++- > > .../linux/bits/struct_stat_time64_helper.h | 70 > > +++++++++++++++++++ .../unix/sysv/linux/m68k/bits/struct_stat.h | > > 16 +++++ .../sysv/linux/microblaze/bits/struct_stat.h | 16 +++++ > > .../unix/sysv/linux/mips/bits/struct_stat.h | 16 +++++ > > .../sysv/linux/powerpc/bits/struct_stat.h | 48 ++++++++----- > > sysdeps/unix/sysv/linux/struct_stat_time64.h | 60 +++------------- > > .../unix/sysv/linux/x86/bits/struct_stat.h | 16 +++++ > > 9 files changed, 194 insertions(+), 68 deletions(-) > > create mode 100644 > > sysdeps/unix/sysv/linux/bits/struct_stat_time64_helper.h > >=20 > > diff --git a/sysdeps/unix/sysv/linux/Makefile > > b/sysdeps/unix/sysv/linux/Makefile index 09604e128b..2d5cf9bf09 > > 100644 --- a/sysdeps/unix/sysv/linux/Makefile > > +++ b/sysdeps/unix/sysv/linux/Makefile > > @@ -97,7 +97,8 @@ sysdep_headers +=3D sys/mount.h sys/acct.h \ > > bits/types/struct_msqid_ds.h \ > > bits/types/struct_shmid_ds.h \ > > bits/ipc-perm.h \ > > - bits/struct_stat.h > > + bits/struct_stat.h \ > > + bits/struct_stat_time64_helper.h > > =20 > > tests +=3D tst-clone tst-clone2 tst-clone3 tst-fanotify > > tst-personality \ tst-quota tst-sync_file_range tst-sysconf-iov_max > > tst-ttyname \ diff --git > > a/sysdeps/unix/sysv/linux/bits/struct_stat.h > > b/sysdeps/unix/sysv/linux/bits/struct_stat.h index > > 344bffece6..6dd7aeffcf 100644 --- > > a/sysdeps/unix/sysv/linux/bits/struct_stat.h +++ > > b/sysdeps/unix/sysv/linux/bits/struct_stat.h @@ -26,6 +26,13 @@ > > #include #include > > =20 > > +#ifdef __USE_TIME_BITS64 > > +# include > > +struct stat > > + { > > + __STAT64_T64_CONTENT > > + }; > > +#else > > struct stat > > { > > __dev_t st_dev; /* Device. */ > > @@ -81,8 +88,16 @@ struct stat > > __ino64_t st_ino; /* File serial > > number. */ #endif > > }; > > +#endif /* __USE_TIME_BITS64 */ > > =20 > > #ifdef __USE_LARGEFILE64 > > +# ifdef __USE_TIME_BITS64 > > +# include > > +struct stat64 > > + { > > + __STAT64_T64_CONTENT > > + }; > > +# else > > struct stat64 > > { > > __dev_t st_dev; /* Device. */ > > @@ -119,6 +134,7 @@ struct stat64 > > # endif > > __ino64_t st_ino; /* File serial > > number. */ }; > > +# endif /* __USE_TIME_BITS64 */ > > #endif > > =20 > > /* Tell code we have these members. */ > > @@ -127,5 +143,4 @@ struct stat64 > > /* Nanosecond resolution time values are supported. */ > > #define _STATBUF_ST_NSEC > > =20 > > - > > #endif /* _BITS_STRUCT_STAT_H */ > > diff --git > > a/sysdeps/unix/sysv/linux/bits/struct_stat_time64_helper.h > > b/sysdeps/unix/sysv/linux/bits/struct_stat_time64_helper.h new file > > mode 100644 index 0000000000..3ca6258bd5 --- /dev/null > > +++ b/sysdeps/unix/sysv/linux/bits/struct_stat_time64_helper.h > > @@ -0,0 +1,70 @@ > > +/* Definition for helper to define struct stat with 64 bit time. > > + Copyright (C) 2020 Free Software Foundation, Inc. > > + This file is part of the GNU C Library. > > + > > + The GNU C Library is free software; you can redistribute it > > and/or > > + modify it under the terms of the GNU Lesser General Public > > + License as published by the Free Software Foundation; either > > + version 2.1 of the License, or (at your option) any later > > version. + > > + The GNU C Library is distributed in the hope that it will be > > useful, > > + but WITHOUT ANY WARRANTY; without even the implied warranty of > > + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > GNU > > + Lesser General Public License for more details. > > + > > + You should have received a copy of the GNU Lesser General Public > > + License along with the GNU C Library. If not, see > > + . */ > > + > > +#ifndef _BITS_STRUCT_STAT_TIME64_HELPER_H > > +#define _BITS_STRUCT_STAT_TIME64_HELPER_H 1 > > + > > +#include > > + > > +/* The definition should be equal to the 'struct __timespec64' > > internal > > + layout. */ > > +#if BYTE_ORDER =3D=3D BIG_ENDIAN > > +# define __fieldts64(name) \ > > + __time64_t name; __int32_t :32; __int32_t name ## nsec > > +#else > > +# define __fieldts64(name) \ > > + __time64_t name; __int32_t name ## nsec; __int32_t :32 > > +#endif > > + > > +# ifdef __USE_XOPEN2K8 > > +# define st_atime st_atim.tv_sec > > +# define st_mtime st_mtim.tv_sec > > +# define st_ctime st_ctim.tv_sec > > + /* Nanosecond resolution timestamps are stored in a format > > + equivalent to 'struct timespec'. This is the type used > > + whenever possible but the Unix namespace rules do not allow > > the > > + identifier 'timespec' to appear in the header. > > + Therefore we have to handle the use of this header in > > strictly > > + standard-compliant sources special. */ > > +# define __STAT64_TIME64_CONTENT \ > > + struct timespec st_atim; \ > > + struct timespec st_mtim; \ > > + struct timespec st_ctim; > > +# else > > +# define __STAT64_TIME64_CONTENT \ > > + __fieldts64 (st_atime); \ > > + __fieldts64 (st_mtime); \ > > + __fieldts64 (st_ctime); > > +# endif /* __USE_XOPEN2K8 */ > > + > > +/* Content of internal __stat64_t64 struct. */ > > +#define __STAT64_T64_CONTENT > > \ > > + __dev_t st_dev; /* Device. */ > > \ > > + __ino64_t st_ino; /* file serial > > number. */ \ > > + __mode_t st_mode; /* File mode. */ > > \ > > + __nlink_t st_nlink; /* Link count. */ > > \ > > + __uid_t st_uid; /* User ID of the file's > > owner. */ \ > > + __gid_t st_gid; /* Group ID of the > > file's group.*/ \ > > + __dev_t st_rdev; /* Device number, if > > device. */ \ > > + __off64_t st_size; /* Size of file, in > > bytes. */ \ > > + __blksize_t st_blksize; /* Optimal block size > > for I/O. */ \ > > + __blkcnt64_t st_blocks; /* Number 512-byte > > blocks allocated. */\ > > + __STAT64_TIME64_CONTENT > > + > > +# undef __fieldts64 > > +#endif /* _BITS_STRUCT_STAT_TIME64_HELPER_H */ > > diff --git a/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h > > b/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h index > > bf457a0db7..5bf9e110fb 100644 --- > > a/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h +++ > > b/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h @@ -23,6 +23,13 @@ > > #ifndef _BITS_STRUCT_STAT_H > > #define _BITS_STRUCT_STAT_H 1 > > =20 > > +#ifdef __USE_TIME_BITS64 > > +# include > > +struct stat > > + { > > + __STAT64_T64_CONTENT > > + }; > > +#else > > struct stat > > { > > __dev_t st_dev; /* Device. */ > > @@ -78,8 +85,16 @@ struct stat > > __ino64_t st_ino; /* File serial > > number. */ #endif > > }; > > +#endif /* __USE_TIME_BITS64 */ > > =20 > > #ifdef __USE_LARGEFILE64 > > +# ifdef __USE_TIME_BITS64 > > +# include > > +struct stat64 > > + { > > + __STAT64_T64_CONTENT > > + }; > > +# else > > struct stat64 > > { > > __dev_t st_dev; /* Device. */ > > @@ -116,6 +131,7 @@ struct stat64 > > # endif > > __ino64_t st_ino; /* File serial > > number. */ }; > > +# endif /* __USE_TIME_BITS64 */ > > #endif > > =20 > > /* Tell code we have these members. */ > > diff --git a/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h > > b/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h index > > db81543b23..3fac74039a 100644 --- > > a/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h +++ > > b/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h @@ -63,6 > > +63,13 @@ struct stat unsigned int __glibc_reserved5; > > }; > > #else /* __USE_FILE_OFFSET64 */ > > +# ifdef __USE_TIME_BITS64 > > +# include > > +struct stat > > + { > > + __STAT64_T64_CONTENT > > + }; > > +# else > > /* MS: If __USE_FILE_OFFSET64 is setup then struct stat should > > match stat64 > > * structure. Glibc has no type __dev64_t that's why I had to use > > standard > > * type for st_dev and st_rdev. Several architectures uses pads > > after st_dev @@ -106,9 +113,17 @@ struct stat > > unsigned int __glibc_reserved4; > > unsigned int __glibc_reserved5; > > }; > > +# endif /* __USE_TIME_BITS64 */ > > #endif /* __USE_FILE_OFFSET64 */ > > =20 > > #ifdef __USE_LARGEFILE64 > > +# ifdef __USE_TIME_BITS64 > > +# include > > +struct stat64 > > + { > > + __STAT64_T64_CONTENT > > + }; > > +# else > > struct stat64 > > { > > unsigned long long st_dev; /* Device. */ > > @@ -147,6 +162,7 @@ struct stat64 > > unsigned int __glibc_reserved4; > > unsigned int __glibc_reserved5; > > }; > > +# endif /* __USE_TIME_BITS64 */ > > #endif > > =20 > > /* Tell code we have these members. */ > > diff --git a/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h > > b/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h index > > 5abd71fc23..0b88f7cba5 100644 --- > > a/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h +++ > > b/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h @@ -119,6 +119,13 > > @@ struct stat64 }; > > #endif > > #else > > +# ifdef __USE_TIME_BITS64 > > +# include > > +struct stat > > + { > > + __STAT64_T64_CONTENT > > + }; > > +# else > > struct stat > > { > > __dev_t st_dev; > > @@ -171,8 +178,16 @@ struct stat > > #endif > > int st_pad5[14]; > > }; > > +# endif /* __USE_TIME_BITS64 */ > > =20 > > #ifdef __USE_LARGEFILE64 > > +# ifdef __USE_TIME_BITS64 > > +# include > > +struct stat64 > > + { > > + __STAT64_T64_CONTENT > > + }; > > +# else > > struct stat64 > > { > > __dev_t st_dev; > > @@ -208,6 +223,7 @@ struct stat64 > > __blkcnt64_t st_blocks; > > int st_pad4[14]; > > }; > > +# endif /* __USE_TIME_BITS64 */ > > #endif > > #endif > > =20 > > diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h > > b/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h index > > cb41adc7c0..09228e046e 100644 --- > > a/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h +++ > > b/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h @@ -26,35 > > +26,41 @@ #include > > =20 > > #if __WORDSIZE =3D=3D 32 > > - > > +# ifdef __USE_TIME_BITS64 > > +# include > > +struct stat > > + { > > + __STAT64_T64_CONTENT > > + }; > > +# else > > struct stat > > { > > __dev_t st_dev; /* Device. */ > > -# ifndef __USE_FILE_OFFSET64 > > +# ifndef __USE_FILE_OFFSET64 > > unsigned short int __pad1; > > __ino_t st_ino; /* File serial > > number. */ -# else > > +# else > > __ino64_t st_ino; /* File serial > > number. */ -# endif > > +# endif > > __mode_t st_mode; /* File mode. */ > > __nlink_t st_nlink; /* Link count. */ > > __uid_t st_uid; /* User ID of the file's > > owner. */ __gid_t st_gid; /* Group ID > > of the file's group.*/ __dev_t st_rdev; /* > > Device number, if device. */ unsigned short int __pad2; > > -# ifndef __USE_FILE_OFFSET64 > > +# ifndef __USE_FILE_OFFSET64 > > __off_t st_size; /* Size of file, in > > bytes. */ -# else > > +# else > > __off64_t st_size; /* Size of file, in > > bytes. */ -# endif > > +# endif > > __blksize_t st_blksize; /* Optimal block size > > for I/O. */=20 > > -# ifndef __USE_FILE_OFFSET64 > > +# ifndef __USE_FILE_OFFSET64 > > __blkcnt_t st_blocks; /* Number 512-byte blocks > > allocated. */ -# else > > +# else > > __blkcnt64_t st_blocks; /* Number 512-byte > > blocks allocated. */ -# endif > > -# ifdef __USE_XOPEN2K8 > > +# endif > > +# ifdef __USE_XOPEN2K8 > > /* Nanosecond resolution timestamps are stored in a format > > equivalent to 'struct timespec'. This is the type used > > whenever possible but the Unix namespace rules do not allow > > the @@ -64,23 +70,30 @@ struct stat > > struct timespec st_atim; /* Time of last access. > > */ struct timespec st_mtim; /* Time of last > > modification. */ struct timespec st_ctim; /* Time of > > last status change. */ -# define st_atime st_atim.tv_sec /* > > Backward compatibility. */ -# define st_mtime st_mtim.tv_sec > > -# define st_ctime st_ctim.tv_sec > > -# else > > +# define st_atime st_atim.tv_sec /* Backward > > compatibility. */ +# define st_mtime st_mtim.tv_sec > > +# define st_ctime st_ctim.tv_sec > > +# else > > __time_t st_atime; /* Time of last > > access. */ unsigned long int st_atimensec; /* Nscecs of last > > access. */ __time_t st_mtime; /* Time of > > last modification. */ unsigned long int st_mtimensec; /* > > Nsecs of last modification. */ __time_t st_ctime; > > /* Time of last status change. */ unsigned long int > > st_ctimensec; /* Nsecs of last status change. */ -# endif > > +# endif > > unsigned long int __glibc_reserved4; > > unsigned long int __glibc_reserved5; > > }; > > - > > +# endif /* __USE_TIME_BITS64 */ > > =20 > > # ifdef __USE_LARGEFILE64 > > +# ifdef __USE_TIME_BITS64 > > +# include > > +struct stat64 > > + { > > + __STAT64_T64_CONTENT > > + }; > > +# else > > struct stat64 > > { > > __dev_t st_dev; /* Device. */ > > @@ -213,6 +226,7 @@ struct stat64 > > unsigned long int __glibc_reserved5; > > unsigned long int __glibc_reserved6; > > }; > > +# endif /* __USE_TIME_BITS64 */ > > # endif /* __USE_LARGEFILE64 */ > > #endif > > =20 > > diff --git a/sysdeps/unix/sysv/linux/struct_stat_time64.h > > b/sysdeps/unix/sysv/linux/struct_stat_time64.h index > > b85385b6f3..5a4949000e 100644 --- > > a/sysdeps/unix/sysv/linux/struct_stat_time64.h +++ > > b/sysdeps/unix/sysv/linux/struct_stat_time64.h @@ -23,63 +23,25 @@ > > # define __stat64_t64 stat64 > > #else > > # ifdef __USE_LARGEFILE64 > > -# include > > - > > -/* The definition should be equal to the 'struct __timespec64' > > internal > > - layout. */ > > -# if BYTE_ORDER =3D=3D BIG_ENDIAN > > -# define __fieldts64(name) > > \ > > - __time64_t name; __int32_t :32; __int32_t name ## nsec > > -# else > > -# define __fieldts64(name) > > \ > > - __time64_t name; __int32_t name ## nsec; __int32_t :32 > > -# endif > > - > > -/* Workaround for the definition from struct_stat.h */ > > -# undef st_atime > > -# undef st_mtime > > -# undef st_ctime > > - > > +# include > > +# include > > +# ifdef __USE_XOPEN2K8 > > +# undef __STAT64_TIME64_CONTENT > > +/* Use glibc internal types for time related members */ > > +# define __STAT64_TIME64_CONTENT \ > > + struct __timespec64 st_atim; \ > > + struct __timespec64 st_mtim; \ > > + struct __timespec64 st_ctim; > > +# endif /* __USE_XOPEN2K8 */ > > struct __stat64_t64 > > { > > - __dev_t st_dev; /* Device. */ > > - __ino64_t st_ino; /* file serial > > number. */ > > - __mode_t st_mode; /* File mode. */ > > - __nlink_t st_nlink; /* Link count. */ > > - __uid_t st_uid; /* User ID of the file's > > owner. */ > > - __gid_t st_gid; /* Group ID of the > > file's group.*/ > > - __dev_t st_rdev; /* Device number, if > > device. */ > > - __off64_t st_size; /* Size of file, in > > bytes. */ > > - __blksize_t st_blksize; /* Optimal block size > > for I/O. */ > > - __blkcnt64_t st_blocks; /* Number 512-byte > > blocks allocated. */ -# ifdef __USE_XOPEN2K8 > > - /* Nanosecond resolution timestamps are stored in a format > > - equivalent to 'struct timespec'. This is the type used > > - whenever possible but the Unix namespace rules do not allow > > the > > - identifier 'timespec' to appear in the header. > > - Therefore we have to handle the use of this header in > > strictly > > - standard-compliant sources special. */ > > - struct __timespec64 st_atim; /* Time of last access. */ > > - struct __timespec64 st_mtim; /* Time of last > > modification. */ > > - struct __timespec64 st_ctim; /* Time of last status > > change. */ -# define st_atime st_atim.tv_sec /* Backward > > compatibility. */ -# define st_mtime st_mtim.tv_sec > > -# define st_ctime st_ctim.tv_sec > > -# else > > - __fieldts64 (st_atime); > > - __fieldts64 (st_mtime); > > - __fieldts64 (st_ctime); > > -# endif /* __USE_XOPEN2K8 */ > > + __STAT64_T64_CONTENT > > }; > > =20 > > # define _STATBUF_ST_BLKSIZE > > # define _STATBUF_ST_RDEV > > # define _STATBUF_ST_NSEC > > =20 > > -# undef __fieldts64 > > - > > # endif /* __USE_LARGEFILE64 */ > > - > > # endif /* __TIMESIZE =3D=3D 64 */ > > - > > #endif /* _BITS_STRUCT_STAT_TIME64_H */ > > diff --git a/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h > > b/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h index > > dae7aa46b3..e7e87c62b4 100644 --- > > a/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h +++ > > b/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h @@ -23,6 +23,13 @@ > > #ifndef _BITS_STRUCT_STAT_H > > #define _BITS_STRUCT_STAT_H 1 > > =20 > > +#ifdef __USE_TIME_BITS64 > > +# include > > +struct stat > > + { > > + __STAT64_T64_CONTENT > > + }; > > +#else > > struct stat > > { > > __dev_t st_dev; /* Device. */ > > @@ -93,9 +100,17 @@ struct stat > > # endif > > #endif > > }; > > +#endif /* __USE_TIME_BITS64 */ > > =20 > > #ifdef __USE_LARGEFILE64 > > /* Note stat64 has the same shape as stat for x86-64. */ > > +# ifdef __USE_TIME_BITS64 > > +# include > > +struct stat64 > > + { > > + __STAT64_T64_CONTENT > > + }; > > +# else > > struct stat64 > > { > > __dev_t st_dev; /* Device. */ > > @@ -146,6 +161,7 @@ struct stat64 > > __ino64_t st_ino; /* File serial > > number. */ # endif > > }; > > +# endif /* __USE_TIME_BITS64 */ > > #endif > > =20 > > /* Tell code we have these members. */ =20 >=20 > Are there any other comments - despite ones from Andreas - regarding > this patch? >=20 > Joseph, is this patch providing solution which you outlined in the > other comment? Gentle ping for review on this patch. >=20 >=20 > Best regards, >=20 > Lukasz Majewski >=20 > -- >=20 > 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 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 --Sig_/=A1R/87NOk.1KbjaZf1+iWV Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEgAyFJ+N6uu6+XupJAR8vZIA0zr0FAl/Jc8MACgkQAR8vZIA0 zr3a6wf/c9bAhZkE3t+OI/2VA4H6pR56Hv9vwBybWVBETXr/a2DndfQCspTNUlIn sI0woz9IC+6zyoBGexp+Fq3N7FbU1Xbf+I8Gi2qU+kLPNRBIniPYl6EwyoFtRYxj JAcQfJ3aXLYS85CrAt60QyctTEN7dEve5xDJzDea3eRWNXVbOe0RMk+nrCi6kx37 PdH01YqyFwygCoEapeFHwkD/zOpkk28DGw0cE5SUmyeUlTu69rbc0MhQzBaV7DZ4 MOC1rBOngrKgV3gyJwLt+IBREHnOnIpPpGDNy1ZA3u+LrWfBWGb1NCVetgv+fMiY qMxS16/xhujjZmtFsdJLsaKGo+8kVQ== =fwn3 -----END PGP SIGNATURE----- --Sig_/=A1R/87NOk.1KbjaZf1+iWV--