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: Fifth draft of the Y2038 design document


On Wed, 22 Feb 2017, Zack Weinberg wrote:

> Speaking of struct timespec, though, why does this spec not consider
> the possibility of changing the type of 'tv_nsec' to a new typedef,
> say nsec_t, which can vary between 32- and 64-bit modes?  Yes, this
> requires a change in POSIX (and ISO C as well now, unfortunately), but
> one that would be a good idea *anyway*.

That's a gratuitous incompatibility with the existing standards (see Rich 
Felker passim, e.g. bug 16437).  Adding typedefs makes sense when there is 
a use for storing values that cannot be represented in the current type.  
But long is guaranteed to be able to store all valid tv_nsec values (plus 
the extra value UTIME_NOW and UTIME_OMIT).

-- 
Joseph S. Myers
joseph@codesourcery.com


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