This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: PATCH [3/n]: Add __snseconds_t and __SNSECONDS_T_TYPE
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "H.J. Lu" <hongjiu dot lu at intel dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 15 Mar 2012 12:50:00 -0700 (PDT)
- Subject: Re: PATCH [3/n]: Add __snseconds_t and __SNSECONDS_T_TYPE
- References: <20120315192515.GA6585@intel.com>
> 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