diff options
author | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2017-09-06 10:00:42 +0200 |
---|---|---|
committer | Albert ARIBAUD (3ADEV) <albert.aribaud@3adev.fr> | 2018-10-24 12:53:27 +0200 |
commit | 3500dd283b8e5d8a4916423855514cdbfee36eac (patch) | |
tree | 1a4a7a09096f94d446db94617b86b5b10ebe4ea7 /sysdeps/unix/sysv/linux/bits | |
parent | f1869e11225d9aa054fb11474887d8f109af0949 (diff) | |
download | glibc-aaribaud/y2038.tar glibc-aaribaud/y2038.tar.gz glibc-aaribaud/y2038.tar.bz2 glibc-aaribaud/y2038.zip |
Y2038: add _TIME_BITS supportaaribaud/y2038
This makes all previously defined Y2038-proof API types, functions and
implementations the default when _TIME_BITS==64 and __WORDSIZE==32 (so
that 64-bit architectures are unaffected).
Note: it is assumed that the API is consistent, i.e. for each API type
which is enabled here, all API functions which depend on this type are
enabled and mapped to Y2038-proof implementations.
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/msq.h | 17 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/stat.h | 6 |
2 files changed, 20 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/msq.h b/sysdeps/unix/sysv/linux/bits/msq.h index 5f43fa36a6..3adaf3b9a7 100644 --- a/sysdeps/unix/sysv/linux/bits/msq.h +++ b/sysdeps/unix/sysv/linux/bits/msq.h @@ -46,6 +46,22 @@ typedef __syscall_ulong_t msglen_t; /* Structure of record for one message inside the kernel. The type `struct msg' is opaque. */ +#ifdef __USE_TIME_BITS64 +struct msqid_ds +{ + struct ipc_perm msg_perm; /* structure describing operation permission */ + __time64_t msg_stime; /* time of last msgsnd command */ + __time64_t msg_rtime; /* time of last msgrcv command */ + __time64_t msg_ctime; /* time of last change */ + unsigned long int __msg_cbytes; /* current number of bytes on queue */ + msgqnum_t msg_qnum; /* number of messages currently on queue */ + msglen_t msg_qbytes; /* max number of bytes allowed on queue */ + __pid_t msg_lspid; /* pid of last msgsnd() */ + __pid_t msg_lrpid; /* pid of last msgrcv() */ + unsigned long int __glibc_reserved4; + unsigned long int __glibc_reserved5; +}; +#else struct msqid_ds { struct ipc_perm msg_perm; /* structure describing operation permission */ @@ -60,6 +76,7 @@ struct msqid_ds __syscall_ulong_t __glibc_reserved4; __syscall_ulong_t __glibc_reserved5; }; +#endif #ifdef __USE_MISC diff --git a/sysdeps/unix/sysv/linux/bits/stat.h b/sysdeps/unix/sysv/linux/bits/stat.h index 48ef82d862..fde673ef8d 100644 --- a/sysdeps/unix/sysv/linux/bits/stat.h +++ b/sysdeps/unix/sysv/linux/bits/stat.h @@ -119,11 +119,11 @@ struct stat64 struct timespec st_mtim; /* Time of last modification. */ struct timespec st_ctim; /* Time of last status change. */ # else - __time_t st_atime; /* Time of last access. */ + 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. */ + 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. */ + time_t st_ctime; /* Time of last status change. */ unsigned long int st_ctimensec; /* Nsecs of last status change. */ # endif __ino64_t st_ino; /* File serial number. */ |