[RFC,4/6] y2038: Enhance struct msqid_ds to support 64 bit time
Commit Message
---
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(-)
Comments
Dear Community,
> ---
> 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 <bits/msq.h> directly; include
> <sys/msg.h> instead." #endif
>
Gentle request for feedback for this patch set.
> +#include <bits/types/time_t.h>
> +
> /* 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 <bits/msq.h> directly; include
> <sys/msg.h> instead." #endif
> +#include <bits/types/time_t.h>
> +
> /* 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 <bits/msq.h> directly; include
> <sys/msg.h> instead." #endif
> +#include <bits/types/time_t.h>
> +
> /* 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 <bits/msq.h> directly; include
> <sys/msg.h> instead." #endif
> +#include <bits/types/time_t.h>
> +
> /* 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 <bits/msq.h> directly; include
> <sys/msg.h> instead." #endif
> +#include <bits/types/time_t.h>
> +
> /* 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
> */
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
@@ -20,18 +20,26 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* 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 */
@@ -20,18 +20,26 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* 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 */
@@ -20,26 +20,34 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* 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 */
@@ -20,18 +20,26 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* 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 */
@@ -20,18 +20,26 @@
# error "Never use <bits/msq.h> directly; include <sys/msg.h> instead."
#endif
+#include <bits/types/time_t.h>
+
/* 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 */