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
On 03/15/2012 01:57 PM, H.J. Lu wrote:
> What is the real consequence of using long long on tv_nsec,
> except for not POSIX compliant? Will it lead to wrong code?
It would break applications that do anything like this:
struct timespec t;
long *p = &t->tv_nsec;
Such applications work fine now and conform to POSIX, but would
either not compile or (worse) might compile and do the
wrong thing, if tv_nsec were wider than 'long'.