From patchwork Fri Dec 4 23:36:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 41319 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 877AC397A03F; Fri, 4 Dec 2020 23:37:20 +0000 (GMT) X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.9]) by sourceware.org (Postfix) with ESMTPS id E82703870874 for ; Fri, 4 Dec 2020 23:37:16 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org E82703870874 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 4Cnpyg71rmz1qs3t; Sat, 5 Dec 2020 00:37:15 +0100 (CET) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Cnpyg6cvzz1sJ3c; Sat, 5 Dec 2020 00:37:15 +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 dZxlSb9sAxrW; Sat, 5 Dec 2020 00:37:14 +0100 (CET) X-Auth-Info: X/jBo26V4NYOlia3CHnIfrDbKnv5lbf6eYLPI6GSLAQ= Received: from localhost.localdomain (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; Sat, 5 Dec 2020 00:37:14 +0100 (CET) From: Lukasz Majewski To: Joseph Myers , Paul Eggert , Adhemerval Zanella Subject: [RFC 4/6] y2038: Enhance struct msqid_ds to support 64 bit time Date: Sat, 5 Dec 2020 00:36:02 +0100 Message-Id: <20201204233604.7430-5-lukma@denx.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201204233604.7430-1-lukma@denx.de> References: <20201204233604.7430-1-lukma@denx.de> MIME-Version: 1.0 X-Spam-Status: No, score=-11.1 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org 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 , GNU C Library , Siddhesh Poyarekar , Andreas Schwab , Stepan Golosunov , Alistair Francis Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" --- sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h | 8 ++++++++ .../sysv/linux/hppa/bits/types/struct_msqid_ds.h | 8 ++++++++ .../sysv/linux/mips/bits/types/struct_msqid_ds.h | 12 ++++++++++-- .../sysv/linux/powerpc/bits/types/struct_msqid_ds.h | 8 ++++++++ .../sysv/linux/sparc/bits/types/struct_msqid_ds.h | 8 ++++++++ 5 files changed, 42 insertions(+), 2 deletions(-) diff --git a/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h index 43b38175ad..6d8194991f 100644 --- a/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h @@ -20,18 +20,26 @@ # error "Never use directly; include instead." #endif +#include + /* Structure of record for one message inside the kernel. The type `struct msg' is opaque. */ struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ #if __TIMESIZE == 32 +# if __USE_TIME_BITS64 + __time64_t msg_stime; /* time of last msgsnd command */ + __time64_t msg_rtime; /* time of last msgsnd command */ + __time64_t msg_ctime; /* time of last change */ +# else __time_t msg_stime; /* time of last msgsnd command */ unsigned long int __msg_stime_high; __time_t msg_rtime; /* time of last msgsnd command */ unsigned long int __msg_rtime_high; __time_t msg_ctime; /* time of last change */ unsigned long int __msg_ctime_high; +# endif #else __time_t msg_stime; /* time of last msgsnd command */ __time_t msg_rtime; /* time of last msgsnd command */ diff --git a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h index 16eac46941..08c5323f03 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h @@ -20,18 +20,26 @@ # error "Never use directly; include instead." #endif +#include + /* Structure of record for one message inside the kernel. The type `struct msg' is opaque. */ struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ #if __TIMESIZE == 32 +# if __USE_TIME_BITS64 + __time64_t msg_stime; /* time of last msgsnd command */ + __time64_t msg_rtime; /* time of last msgsnd command */ + __time64_t msg_ctime; /* time of last change */ +# else unsigned long int __msg_stime_high; __time_t msg_stime; /* time of last msgsnd command */ unsigned long int __msg_rtime_high; __time_t msg_rtime; /* time of last msgsnd command */ unsigned long int __msg_ctime_high; __time_t msg_ctime; /* time of last change */ +# endif #else __time_t msg_stime; /* time of last msgsnd command */ __time_t msg_rtime; /* time of last msgsnd command */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h index 513e01a171..ac077bfca8 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h @@ -20,26 +20,34 @@ # error "Never use directly; include instead." #endif +#include + /* Structure of record for one message inside the kernel. The type `struct msg' is opaque. */ struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ #if __TIMESIZE == 32 -# ifdef __MIPSEL__ +# if __USE_TIME_BITS64 + __time64_t msg_stime; /* time of last msgsnd command */ + __time64_t msg_rtime; /* time of last msgsnd command */ + __time64_t msg_ctime; /* time of last change */ +# else +# ifdef __MIPSEL__ __time_t msg_stime; /* time of last msgsnd command */ unsigned long int __msg_stime_high; __time_t msg_rtime; /* time of last msgsnd command */ unsigned long int __msg_rtime_high; __time_t msg_ctime; /* time of last change */ unsigned long int __msg_ctime_high; -# else +# else unsigned long int __msg_stime_high; __time_t msg_stime; /* time of last msgsnd command */ unsigned long int __msg_rtime_high; __time_t msg_rtime; /* time of last msgsnd command */ unsigned long int __msg_ctime_high; __time_t msg_ctime; /* time of last change */ +# endif # endif #else __time_t msg_stime; /* time of last msgsnd command */ diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h index 35cc51f733..bf450c9605 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h @@ -20,18 +20,26 @@ # error "Never use directly; include instead." #endif +#include + /* Structure of record for one message inside the kernel. The type `struct msg' is opaque. */ struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ #if __TIMESIZE == 32 +# if __USE_TIME_BITS64 + __time64_t msg_stime; /* time of last msgsnd command */ + __time64_t msg_rtime; /* time of last msgsnd command */ + __time64_t msg_ctime; /* time of last change */ +# else unsigned long int __msg_stime_high; __time_t msg_stime; /* time of last msgsnd command */ unsigned long int __msg_rtime_high; __time_t msg_rtime; /* time of last msgsnd command */ unsigned long int __msg_ctime_high; __time_t msg_ctime; /* time of last change */ +# endif #else __time_t msg_stime; /* time of last msgsnd command */ __time_t msg_rtime; /* time of last msgsnd command */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h index 502c23d91e..a9e309dafc 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h @@ -20,18 +20,26 @@ # error "Never use directly; include instead." #endif +#include + /* Structure of record for one message inside the kernel. The type `struct msg' is opaque. */ struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ #if __TIMESIZE == 32 +# if __USE_TIME_BITS64 + __time64_t msg_stime; /* time of last msgsnd command */ + __time64_t msg_rtime; /* time of last msgsnd command */ + __time64_t msg_ctime; /* time of last change */ +# else unsigned long int __msg_stime_high; __time_t msg_stime; /* time of last msgsnd command */ unsigned long int __msg_rtime_high; __time_t msg_rtime; /* time of last msgsnd command */ unsigned long int __msg_ctime_high; __time_t msg_ctime; /* time of last change */ +# endif #else __time_t msg_stime; /* time of last msgsnd command */ __time_t msg_rtime; /* time of last msgsnd command */