1
0
mirror of https://git.musl-libc.org/git/musl synced 2025-03-18 16:43:07 +03:00

switch all existing 32-bit archs to 64-bit time_t

this commit preserves ABI fully for existing interface boundaries
between libc and libc consumers (applications or libraries), by
retaining existing symbol names for the legacy 32-bit interfaces and
redirecting sources compiled against the new headers to alternate
symbol names. this does not necessarily, however, preserve the
pairwise ABI of libc consumers with one another; where they use
time_t-derived types in their interfaces with one another, it may be
necessary to synchronize updates with each other.

the intent is that ABI resulting from this commit already be stable
and permanent, but it will not be officially so until a release is
made. changes to some header-defined types that do not play any role
in the ABI between libc and its consumers may still be subject to
change.

mechanically, the changes made by this commit for each 32-bit arch are
as follows:

- _REDIR_TIME64 is defined to activate the symbol redirections in
  public headers

- COMPAT_SRC_DIRS is defined in arch.mak to activate build of ABI
  compat shims to serve as definitions for the original symbol names

- time_t and suseconds_t definitions are changed to long long (64-bit)

- IPC_STAT definition is changed to add the IPC_TIME64 bit (0x100),
  triggering conversion of semid_ds, shmid_ds, and msqid_ds split
  low/high time bits into new time_t members

- structs semid_ds, shmid_ds, msqid_ds, and stat are modified to add
  new 64-bit time_t/timespec members at the end, maintaining existing
  layout of other members.

- socket options (SO_*) and ioctl (sockios) command macros are
  redefined to use the kernel's "_NEW" values.

in addition, on archs where vdso clock_gettime is used, the
VDSO_CGT_SYM macro definition in syscall_arch.h is changed to use a
new time64 vdso function if available, and a new VDSO_CGT32_SYM macro
is added for use as fallback on kernels lacking time64.
This commit is contained in:
Rich Felker 2019-08-02 15:41:27 -04:00
parent 5127927f4b
commit 3814333964
85 changed files with 420 additions and 217 deletions

1
arch/arm/arch.mak Normal file

@ -0,0 +1 @@
COMPAT_SRC_DIRS = compat/time32

@ -1,3 +1,4 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
@ -19,5 +20,5 @@ TYPEDEF double double_t;
TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;

@ -1,2 +1,7 @@
#undef FIOQSIZE
#define FIOQSIZE 0x545e
#undef SIOCGSTAMP
#undef SIOCGSTAMPNS
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

@ -1 +1 @@
#define IPC_STAT 2
#define IPC_STAT 0x102

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

@ -1,9 +1,9 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
long __unused1;
time_t sem_ctime;
long __unused2;
unsigned long __sem_otime_lo;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_lo;
unsigned long __sem_ctime_hi;
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned short sem_nsems;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
@ -13,4 +13,6 @@ struct semid_ds {
#endif
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

@ -3,17 +3,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
int __unused1;
time_t shm_dtime;
int __unused2;
time_t shm_ctime;
int __unused3;
unsigned long __shm_atime_lo;
unsigned long __shm_atime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_ctime_lo;
unsigned long __shm_ctime_hi;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned long __pad3;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

5
arch/arm/bits/socket.h Normal file

@ -0,0 +1,5 @@
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67

@ -14,8 +14,12 @@ struct stat {
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
ino_t st_ino;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
ino_t st_ino;
};

@ -99,7 +99,9 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
}
#define VDSO_USEFUL
#define VDSO_CGT_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_VER "LINUX_2.6"
#define VDSO_CGT_SYM "__vdso_clock_gettime64"
#define VDSO_CGT_VER "LINUX_2.6"
#define SYSCALL_FADVISE_6_ARG

1
arch/i386/arch.mak Normal file

@ -0,0 +1 @@
COMPAT_SRC_DIRS = compat/time32

@ -1,3 +1,4 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
@ -29,5 +30,5 @@ TYPEDEF struct { __attribute__((__aligned__(8))) long long __ll; long double __l
TYPEDEF struct { alignas(8) long long __ll; long double __ld; } max_align_t;
#endif
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;

@ -0,0 +1,4 @@
#undef SIOCGSTAMP
#undef SIOCGSTAMPNS
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

@ -1 +1 @@
#define IPC_STAT 2
#define IPC_STAT 0x102

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

@ -1,11 +1,13 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
long __unused1;
time_t sem_ctime;
long __unused2;
unsigned long __sem_otime_lo;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_lo;
unsigned long __sem_ctime_hi;
unsigned short sem_nsems;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

@ -3,17 +3,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
int __unused1;
time_t shm_dtime;
int __unused2;
time_t shm_ctime;
int __unused3;
unsigned long __shm_atime_lo;
unsigned long __shm_atime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_ctime_lo;
unsigned long __shm_ctime_hi;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned long __pad3;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

5
arch/i386/bits/socket.h Normal file

@ -0,0 +1,5 @@
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67

@ -14,8 +14,12 @@ struct stat {
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
ino_t st_ino;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
ino_t st_ino;
};

@ -83,7 +83,9 @@ static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a
}
#define VDSO_USEFUL
#define VDSO_CGT_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_VER "LINUX_2.6"
#define VDSO_CGT_SYM "__vdso_clock_gettime64"
#define VDSO_CGT_VER "LINUX_2.6"
#define SYSCALL_USE_SOCKETCALL

1
arch/m68k/arch.mak Normal file

@ -0,0 +1 @@
COMPAT_SRC_DIRS = compat/time32

@ -1,3 +1,4 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
@ -23,5 +24,5 @@ TYPEDEF long double double_t;
TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;

@ -0,0 +1,4 @@
#undef SIOCGSTAMP
#undef SIOCGSTAMPNS
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

@ -1 +1 @@
#define IPC_STAT 2
#define IPC_STAT 0x102

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

@ -1,11 +1,13 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
long __unused1;
time_t sem_ctime;
long __unused2;
unsigned long __sem_otime_lo;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_lo;
unsigned long __sem_ctime_hi;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
unsigned short sem_nsems;
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

@ -3,17 +3,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
int __unused1;
time_t shm_dtime;
int __unused2;
time_t shm_ctime;
int __unused3;
unsigned long __shm_atime_lo;
unsigned long __shm_atime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_ctime_lo;
unsigned long __shm_ctime_hi;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned long __pad3;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

5
arch/m68k/bits/socket.h Normal file

@ -0,0 +1,5 @@
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67

@ -14,8 +14,12 @@ struct stat {
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
ino_t st_ino;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
ino_t st_ino;
};

1
arch/microblaze/arch.mak Normal file

@ -0,0 +1 @@
COMPAT_SRC_DIRS = compat/time32

@ -1,3 +1,4 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
@ -19,5 +20,5 @@ TYPEDEF double double_t;
TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;

@ -0,0 +1,4 @@
#undef SIOCGSTAMP
#undef SIOCGSTAMPNS
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

@ -1 +1 @@
#define IPC_STAT 2
#define IPC_STAT 0x102

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

@ -1,9 +1,9 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
long __unused1;
time_t sem_ctime;
long __unused2;
unsigned long __sem_otime_lo;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_lo;
unsigned long __sem_ctime_hi;
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned short sem_nsems;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
@ -13,4 +13,6 @@ struct semid_ds {
#endif
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

@ -3,17 +3,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
int __unused1;
time_t shm_dtime;
int __unused2;
time_t shm_ctime;
int __unused3;
unsigned long __shm_atime_lo;
unsigned long __shm_atime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_ctime_lo;
unsigned long __shm_ctime_hi;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned long __pad3;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

@ -0,0 +1,5 @@
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67

@ -14,8 +14,12 @@ struct stat {
blksize_t st_blksize;
int __st_blksize_padding;
blkcnt_t st_blocks;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
unsigned __unused[2];
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
unsigned __unused[2];
};

1
arch/mips/arch.mak Normal file

@ -0,0 +1 @@
COMPAT_SRC_DIRS = compat/time32

@ -1,3 +1,4 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
@ -19,5 +20,5 @@ TYPEDEF double double_t;
TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;

@ -110,5 +110,5 @@
#define SIOCATMARK _IOR('s', 7, int)
#define SIOCSPGRP _IOW('s', 8, pid_t)
#define SIOCGPGRP _IOR('s', 9, pid_t)
#define SIOCGSTAMP 0x8906
#define SIOCGSTAMPNS 0x8907
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

@ -1 +1 @@
#define IPC_STAT 2
#define IPC_STAT 0x102

@ -1,19 +1,19 @@
struct msqid_ds {
struct ipc_perm msg_perm;
#if _MIPSEL || __MIPSEL || __MIPSEL__
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
#else
int __unused1;
time_t msg_stime;
int __unused2;
time_t msg_rtime;
int __unused3;
time_t msg_ctime;
unsigned long __msg_stime_hi;
unsigned long __msg_stime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_ctime_hi;
unsigned long __msg_ctime_lo;
#endif
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
@ -21,4 +21,7 @@ struct msqid_ds {
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

@ -1,7 +1,7 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
time_t sem_ctime;
unsigned long __sem_otime_lo;
unsigned long __sem_ctime_lo;
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned short sem_nsems;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
@ -9,6 +9,8 @@ struct semid_ds {
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
unsigned short sem_nsems;
#endif
long __unused3;
long __unused4;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_hi;
time_t sem_otime;
time_t sem_ctime;
};

@ -3,14 +3,19 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
unsigned long __shm_atime_lo;
unsigned long __shm_dtime_lo;
unsigned long __shm_ctime_lo;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned short __shm_atime_hi;
unsigned short __shm_dtime_hi;
unsigned short __shm_ctime_hi;
unsigned short __pad1;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

@ -16,13 +16,16 @@
#define SO_RCVBUF 0x1002
#define SO_SNDLOWAT 0x1003
#define SO_RCVLOWAT 0x1004
#define SO_RCVTIMEO 0x1006
#define SO_SNDTIMEO 0x1005
#define SO_ERROR 0x1007
#define SO_TYPE 0x1008
#define SO_ACCEPTCONN 0x1009
#define SO_PROTOCOL 0x1028
#define SO_DOMAIN 0x1029
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67
#define SO_NO_CHECK 11
#define SO_PRIORITY 12

@ -12,11 +12,15 @@ struct stat {
dev_t st_rdev;
long __st_padding2[2];
off_t st_size;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
blksize_t st_blksize;
long __st_padding3;
blkcnt_t st_blocks;
long __st_padding4[14];
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
long __st_padding4[2];
};

@ -142,7 +142,9 @@ static inline long __syscall7(long n, long a, long b, long c, long d, long e, lo
}
#define VDSO_USEFUL
#define VDSO_CGT_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_VER "LINUX_2.6"
#define VDSO_CGT_SYM "__vdso_clock_gettime64"
#define VDSO_CGT_VER "LINUX_2.6"
#define SO_SNDTIMEO_OLD 0x1005

1
arch/mipsn32/arch.mak Normal file

@ -0,0 +1 @@
COMPAT_SRC_DIRS = compat/time32

@ -1,3 +1,4 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
@ -19,5 +20,5 @@ TYPEDEF double double_t;
TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;

@ -110,5 +110,5 @@
#define SIOCATMARK _IOR('s', 7, int)
#define SIOCSPGRP _IOW('s', 8, pid_t)
#define SIOCGPGRP _IOR('s', 9, pid_t)
#define SIOCGSTAMP 0x8906
#define SIOCGSTAMPNS 0x8907
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

@ -1 +1 @@
#define IPC_STAT 2
#define IPC_STAT 0x102

@ -1,19 +1,19 @@
struct msqid_ds {
struct ipc_perm msg_perm;
#if _MIPSEL || __MIPSEL || __MIPSEL__
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
#else
int __unused1;
time_t msg_stime;
int __unused2;
time_t msg_rtime;
int __unused3;
time_t msg_ctime;
unsigned long __msg_stime_hi;
unsigned long __msg_stime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_ctime_hi;
unsigned long __msg_ctime_lo;
#endif
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
@ -21,4 +21,7 @@ struct msqid_ds {
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

@ -1,7 +1,7 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
time_t sem_ctime;
unsigned long __sem_otime_lo;
unsigned long __sem_ctime_lo;
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned short sem_nsems;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
@ -9,6 +9,8 @@ struct semid_ds {
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
unsigned short sem_nsems;
#endif
long __unused3;
long __unused4;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_hi;
time_t sem_otime;
time_t sem_ctime;
};

@ -3,14 +3,19 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
unsigned long __shm_atime_lo;
unsigned long __shm_dtime_lo;
unsigned long __shm_ctime_lo;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned short __shm_atime_hi;
unsigned short __shm_dtime_hi;
unsigned short __shm_ctime_hi;
unsigned short __pad1;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

@ -16,13 +16,16 @@
#define SO_RCVBUF 0x1002
#define SO_SNDLOWAT 0x1003
#define SO_RCVLOWAT 0x1004
#define SO_RCVTIMEO 0x1006
#define SO_SNDTIMEO 0x1005
#define SO_ERROR 0x1007
#define SO_TYPE 0x1008
#define SO_ACCEPTCONN 0x1009
#define SO_PROTOCOL 0x1028
#define SO_DOMAIN 0x1029
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67
#define SO_NO_CHECK 11
#define SO_PRIORITY 12

@ -9,11 +9,15 @@ struct stat {
dev_t st_rdev;
long __pad2[2];
off_t st_size;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
blksize_t st_blksize;
long __pad3;
blkcnt_t st_blocks;
long __pad4[14];
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
long __pad4[2];
};

@ -116,7 +116,9 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo
}
#define VDSO_USEFUL
#define VDSO_CGT_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_SYM "__vdso_clock_gettime"
#define VDSO_CGT32_VER "LINUX_2.6"
#define VDSO_CGT_SYM "__vdso_clock_gettime64"
#define VDSO_CGT_VER "LINUX_2.6"
#define SO_SNDTIMEO_OLD 0x1005

1
arch/or1k/arch.mak Normal file

@ -0,0 +1 @@
COMPAT_SRC_DIRS = compat/time32

@ -1,3 +1,4 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
@ -14,5 +15,5 @@ TYPEDEF double double_t;
TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;

@ -0,0 +1,4 @@
#undef SIOCGSTAMP
#undef SIOCGSTAMPNS
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

@ -1 +1 @@
#define IPC_STAT 2
#define IPC_STAT 0x102

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

@ -1,11 +1,13 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
long __unused1;
time_t sem_ctime;
long __unused2;
unsigned long __sem_otime_lo;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_lo;
unsigned long __sem_ctime_hi;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
unsigned short sem_nsems;
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

@ -3,17 +3,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
int __unused1;
time_t shm_dtime;
int __unused2;
time_t shm_ctime;
int __unused3;
unsigned long __shm_atime_lo;
unsigned long __shm_atime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_ctime_lo;
unsigned long __shm_ctime_hi;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned long __pad3;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

5
arch/or1k/bits/socket.h Normal file

@ -0,0 +1,5 @@
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67

@ -14,8 +14,12 @@ struct stat {
blksize_t st_blksize;
int __st_blksize_padding;
blkcnt_t st_blocks;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
unsigned __unused[2];
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
};

1
arch/powerpc/arch.mak Normal file

@ -0,0 +1 @@
COMPAT_SRC_DIRS = compat/time32

@ -1,3 +1,4 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
@ -18,5 +19,5 @@ TYPEDEF double double_t;
TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;

@ -116,5 +116,5 @@
#define FIOGETOWN 0x8903
#define SIOCGPGRP 0x8904
#define SIOCATMARK 0x8905
#define SIOCGSTAMP 0x8906
#define SIOCGSTAMPNS 0x8907
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

@ -1 +1 @@
#define IPC_STAT 2
#define IPC_STAT 0x102

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
int __unused1;
time_t msg_stime;
int __unused2;
time_t msg_rtime;
int __unused3;
time_t msg_ctime;
unsigned long __msg_stime_hi;
unsigned long __msg_stime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_ctime_hi;
unsigned long __msg_ctime_lo;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

@ -1,10 +1,12 @@
struct semid_ds {
struct ipc_perm sem_perm;
int __unused1;
time_t sem_otime;
int __unused2;
time_t sem_ctime;
unsigned long __sem_otime_hi;
unsigned long __sem_otime_lo;
unsigned long __sem_ctime_hi;
unsigned long __sem_ctime_lo;
unsigned short __sem_nsems_pad, sem_nsems;
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

@ -2,19 +2,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
int __unused1;
time_t shm_atime;
int __unused2;
time_t shm_dtime;
int __unused3;
time_t shm_ctime;
int __unused4;
unsigned long __shm_atime_hi;
unsigned long __shm_atime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_ctime_hi;
unsigned long __shm_ctime_lo;
size_t shm_segsz;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

@ -15,8 +15,6 @@
#define SO_REUSEPORT 15
#define SO_RCVLOWAT 16
#define SO_SNDLOWAT 17
#define SO_RCVTIMEO 18
#define SO_SNDTIMEO 19
#define SO_PASSCRED 20
#define SO_PEERCRED 21
#define SO_ACCEPTCONN 30
@ -25,3 +23,8 @@
#define SO_RCVBUFFORCE 33
#define SO_PROTOCOL 38
#define SO_DOMAIN 39
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67

@ -13,8 +13,12 @@ struct stat {
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
unsigned __unused[2];
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
unsigned __unused[2];
};

1
arch/sh/arch.mak Normal file

@ -0,0 +1 @@
COMPAT_SRC_DIRS = compat/time32

@ -1,3 +1,4 @@
#define _REDIR_TIME64 1
#define _Addr int
#define _Int64 long long
#define _Reg int
@ -23,5 +24,5 @@ TYPEDEF double double_t;
TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
TYPEDEF long time_t;
TYPEDEF long suseconds_t;
TYPEDEF long long time_t;
TYPEDEF long long suseconds_t;

@ -108,5 +108,5 @@
#define SIOCATMARK _IOR('s', 7, int)
#define SIOCSPGRP _IOW('s', 8, int)
#define SIOCGPGRP _IOW('s', 9, int)
#define SIOCGSTAMP _IOR('s', 100, char[8])
#define SIOCGSTAMPNS _IOR('s', 101, char[8])
#define SIOCGSTAMP _IOR(0x89, 6, char[16])
#define SIOCGSTAMPNS _IOR(0x89, 7, char[16])

@ -1 +1 @@
#define IPC_STAT 2
#define IPC_STAT 0x102

@ -1,15 +1,18 @@
struct msqid_ds {
struct ipc_perm msg_perm;
time_t msg_stime;
int __unused1;
time_t msg_rtime;
int __unused2;
time_t msg_ctime;
int __unused3;
unsigned long __msg_stime_lo;
unsigned long __msg_stime_hi;
unsigned long __msg_rtime_lo;
unsigned long __msg_rtime_hi;
unsigned long __msg_ctime_lo;
unsigned long __msg_ctime_hi;
unsigned long msg_cbytes;
msgqnum_t msg_qnum;
msglen_t msg_qbytes;
pid_t msg_lspid;
pid_t msg_lrpid;
unsigned long __unused[2];
time_t msg_stime;
time_t msg_rtime;
time_t msg_ctime;
};

@ -1,9 +1,9 @@
struct semid_ds {
struct ipc_perm sem_perm;
time_t sem_otime;
long __unused1;
time_t sem_ctime;
long __unused2;
unsigned long __sem_otime_lo;
unsigned long __sem_otime_hi;
unsigned long __sem_ctime_lo;
unsigned long __sem_ctime_hi;
#if __BYTE_ORDER == __LITTLE_ENDIAN
unsigned short sem_nsems;
char __sem_nsems_pad[sizeof(long)-sizeof(short)];
@ -13,4 +13,6 @@ struct semid_ds {
#endif
long __unused3;
long __unused4;
time_t sem_otime;
time_t sem_ctime;
};

@ -3,17 +3,21 @@
struct shmid_ds {
struct ipc_perm shm_perm;
size_t shm_segsz;
time_t shm_atime;
int __unused1;
time_t shm_dtime;
int __unused2;
time_t shm_ctime;
int __unused3;
unsigned long __shm_atime_lo;
unsigned long __shm_atime_hi;
unsigned long __shm_dtime_lo;
unsigned long __shm_dtime_hi;
unsigned long __shm_ctime_lo;
unsigned long __shm_ctime_hi;
pid_t shm_cpid;
pid_t shm_lpid;
unsigned long shm_nattch;
unsigned long __pad1;
unsigned long __pad2;
unsigned long __pad3;
time_t shm_atime;
time_t shm_dtime;
time_t shm_ctime;
};
struct shminfo {

5
arch/sh/bits/socket.h Normal file

@ -0,0 +1,5 @@
#define SO_TIMESTAMP 63
#define SO_TIMESTAMPNS 64
#define SO_TIMESTAMPING 65
#define SO_RCVTIMEO 66
#define SO_SNDTIMEO 67

@ -14,8 +14,12 @@ struct stat {
off_t st_size;
blksize_t st_blksize;
blkcnt_t st_blocks;
struct {
long tv_sec;
long tv_nsec;
} __st_atim32, __st_mtim32, __st_ctim32;
ino_t st_ino;
struct timespec st_atim;
struct timespec st_mtim;
struct timespec st_ctim;
ino_t st_ino;
};