[RFC v6 03/23] time: Add a timeval with a long tv_sec and tv_usec

Lukasz Majewski lukma@denx.de
Tue Jan 14 11:27:00 GMT 2020


Hi Alistair,

> On Mon, Jan 13, 2020 at 12:48 AM Joseph Myers
> <joseph@codesourcery.com> wrote:
> >
> > On Sun, 12 Jan 2020, Alistair Francis wrote:
> >  
> > > On y2038 safe 32-bit systems the Linux kernel expects itimerval to
> > > use a 32-bit time_t, even though the other time_t's are 64-bit. To
> > > address this let's add a timeval_long struct to be used
> > > internally. ---
> > >  include/time.h                   | 29
> > > +++++++++++++++++++++++++++++ time/bits/types/struct_timeval.h |
> > > 8 ++++++++  
> >
> > bits/types/ headers are *installed* headers that should only define
> > the type in question.  If there is some good reason to need
> > __timeval_long in *installed* headers (i.e. a *public* interface
> > using this type) it should go in
> > bits/types/struct___timeval_long.h, otherwise it should go in a
> > non-installed header.  
> 
> Ok, I don't think this should be installed. The only possible reason
> installing this would be if someone was manually calling the syscalls
> and wanted to use this type to do that.
> 
> Do you have a recommendation of a non installed header where it
> should go?

I'm not sure if this hint will match your use case, but similar:

struct __timespec64 and struct __itimerspec64 are defined in
./include/time.h

This is the place for glibc internal definitions (not
installed/exported).

> 
> Alistair
> 
> >
> > --
> > Joseph S. Myers
> > joseph@codesourcery.com  




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20200114/bbf5072a/attachment.sig>


More information about the Libc-alpha mailing list