This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH [3/n]: Add __snseconds_t and __SNSECONDS_T_TYPE


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]