This is the mail archive of the 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] Y2038: add struct __timespec64

Generally, what is the design for struct __timespec64 on configurations 
where time_t is already 64-bit - normal 64-bit configurations, not just 
x32?  I'd expect one of:

* #define __timespec64 timespec (and no separate structure defined at 
all).  This is probably also the right thing to do with x32 (if there are 
appropriate header conditionals already available, that may mean you don't 
need an x86-specific header variant at all).

* The header doesn't get included at all for such configurations and no 
APIs using the struct __timespec64 are declared at all for them.  That's 
probably harder to implement (needs more conditionals all over glibc), so 
the first approach seems better.

> +/* check if a value lies with the valid nanoseconds range */

Comments start with an uppercase letter, end with "." and two spaces.  
This needs fixing throughout the patch series.

> +static inline bool timespec_to_timespec64 (const struct timespec *ts32,

The "static inline bool" should go on a separate line; the function name 
in a definition always goes at the start of a line.  Likewise elsewhere.

Joseph S. Myers

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