This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v10] y2038: Provide conversion helpers for struct __timespec64
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: Paul Eggert <eggert at cs dot ucla dot edu>, Alistair Francis <alistair23 at gmail dot com>, Arnd Bergmann <arnd at arndb dot de>, Alistair Francis <alistair dot francis at wdc dot com>, GNU C Library <libc-alpha at sourceware dot org>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>, Florian Weimer <fweimer at redhat dot com>, Carlos O'Donell <carlos at redhat dot com>, Stepan Golosunov <stepan at golosunov dot pp dot ru>, Florian Weimer <fw at deneb dot enyo dot de>, Zack Weinberg <zackw at panix dot com>
- Date: Tue, 1 Oct 2019 21:58:33 +0000
- Subject: Re: [PATCH v10] y2038: Provide conversion helpers for struct __timespec64
- Ironport-sdr: 9/vkO47nYOJPO2acm6nga58z9zGAZLjZiHoK6gV1VEAKKXyC1WMFFEIiY9p+4B4CFBUOx2/QST 14QnzV4Ib344myHA2xPAPMHTIAVfcRJSmBcZVBncuZ9g10EC/Esn1oU9xDotBe1Gzr8fkEXNAc GCu8TsSh5xNK9fmzhZrDsQWmOn0UU5dNQ3KhDZZDRz56uEyBNdqGc8bxleYYUcoc9cgi4BAwp0 yleR866UHuwH7ppECAznb7vJTLhtWIOgQaV29KGnJKgmudfzxdJMAtBaFFnvveg/73chM1zV+V eo4=
- Ironport-sdr: 7EHA9ATdLnVOo4dohFuUa5KS56n2oyd7ec+TTBWlfxqbfe/Qn/M5eiR1gHZwxPc9HKjjIZz6br JPSYkOC5FnQdNZ26AqEYzgdcRA4cMq92IYJTy6cqMT3Z3rD3Chlrq7vFU/b/CV79p3MACMXU0u HL4TM7rFFDV6l0m/sTfDJobgklTcA1vM1RrCZRR4JKwNjKIEU9jsQ5hLyvtMDEe/DPakZRKHjK c2cr9FbgbsT+rbLE4MZbfYmgVpkZwHKPRS3IkyjdRcWOqWXtXakixPhvkalDYXK1MxQWQiF9EH xmA=
- References: <20190930133134.14771-1-lukma@denx.de> <alpine.DEB.2.21.1910011323230.4084@digraph.polyomino.org.uk> <20191001160522.65e8d534@jawa> <20191001235434.52166d85@jawa>
On Tue, 1 Oct 2019, Lukasz Majewski wrote:
> It seems to me like it would be best to add the missing
> #include <sys/time.h> to HURD's #include <hurd/hurd_types.h> as it also
> includes for example struct timespec header. However, is is not so
> simple as this file is in hurd compiler includes
> (glibc-many-build/install/compilers/i686-gnu/sysroot/include/hurd/hurd_types.h).
>
> The other option would be to add #include <sys/time.h> just before
> struct __timespec64 conversion in ./include/time.h
>
> I'm going to submit such patch for review.
How about including <bits/types/struct_timeval.h> in include/time.h
(inside the !_ISOMAC conditional)? It already includes
<bits/types/locale_t.h>, for example; since it's using struct timeval, it
seems natural for it to include the corresponding header (rather than a
more general sys/time.h include).
--
Joseph S. Myers
joseph@codesourcery.com