From patchwork Fri Feb 7 13:00:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 37726 Received: (qmail 118381 invoked by alias); 7 Feb 2020 13:01:04 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 118148 invoked by uid 89); 7 Feb 2020 13:00:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-21.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 spammy=modification, HContent-Transfer-Encoding:8bit X-HELO: mail-out.m-online.net From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Cc: Alistair Francis , Alistair Francis , GNU C Library , Siddhesh Poyarekar , Florian Weimer , Florian Weimer , Zack Weinberg , Carlos O'Donell , Andreas Schwab , Lukasz Majewski Subject: [PATCH 1/3] y2038: Introduce struct __utimbuf64 - new internal glibc type Date: Fri, 7 Feb 2020 14:00:07 +0100 Message-Id: <20200207130009.19396-2-lukma@denx.de> In-Reply-To: <20200207130009.19396-1-lukma@denx.de> References: <20200207130009.19396-1-lukma@denx.de> MIME-Version: 1.0 This type is a glibc's "internal" type to store file's access and modification times in __time64_t rather than __time_t, which makes it Y2038-proof. Build tests: ./src/scripts/build-many-glibcs.py glibcs Reviewed-by: Alistair Francis Reviewed-by: Adhemerval Zanella --- include/time.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/time.h b/include/time.h index 389355a5a5..e38f5e32e6 100644 --- a/include/time.h +++ b/include/time.h @@ -109,6 +109,18 @@ struct __timeval64 }; #endif +#if __TIMESIZE == 64 +# define __utimbuf64 utimbuf +#else +/* The glibc Y2038-proof struct __utimbuf64 structure for file's access + and modification time values. */ +struct __utimbuf64 +{ + __time64_t actime; /* Access time. */ + __time64_t modtime; /* Modification time. */ +}; +#endif + #if __TIMESIZE == 64 # define __itimerval64 itimerval #else