PATCH [3/n]: Add __snseconds_t and __SNSECONDS_T_TYPE
Roland McGrath
roland@hack.frob.com
Thu Mar 15 19:50:00 GMT 2012
> Linux/x32 uses long long for time_t. timespec has
>
> struct timespec
> {
> __time_t tv_sec; /* Seconds. */
> long int tv_nsec; /* Nanoseconds. */
> };
>
> Linux/x32 uses the same timespec as x86-64 inside kernel. That means
> tv_nsec must also be 64bit for Linux/x32. However, we don't have
> __snseconds_t. This patch defines time_t to 64bit and adds __snseconds_t
> similar to __suseconds_t.
That's fine, but it's its own one change to start using that and
a separate change to add sysdeps/unix/sysv/linux/x86_64/bits/typesizes.h
afterwards.
> This patch defines __SSYSCALL_LONG_TYPE and __USYSCALL_LONG_TYPE to
That doesn't belong in the __snseconds_t patch.
> struct ipc_perm
> {
> __key_t __key; /* Key. */
> __uid_t uid; /* Owner's user ID. */
> __gid_t gid; /* Owner's group ID. */
> __uid_t cuid; /* Creator's user ID. */
> __gid_t cgid; /* Creator's group ID. */
> unsigned short int mode; /* Read/write permission. */
> unsigned short int __pad1;
> unsigned short int __seq; /* Sequence number. */
> unsigned short int __pad2;
> __USYSCALL_LONG_TYPE __unused1;
> __USYSCALL_LONG_TYPE __unused2;
> };
Definitions like this shouldn't use __*_TYPE macros at all.
They should use typedefs instead.
Thanks,
Roland
More information about the Libc-alpha
mailing list