[PATCH v4 1/3] y2038: include: Move struct __timespec64 definition to a separate file
Joseph Myers
joseph@codesourcery.com
Tue Mar 17 01:23:29 GMT 2020
On Mon, 16 Mar 2020, Lukasz Majewski wrote:
> Hi Joseph,
>
> > On Sat, 14 Mar 2020, Lukasz Majewski wrote:
> >
> > > The struct __timespec64's definition has been moved from
> > > ./include/time.h to ./include/bits/types/struct___timespec64.h.
> >
> > The header naming convention in glibc is that "bits/" is a namespace
> > used *only* for installed headers. This isn't an installed header,
> > so whatever name you use for it, it should not be of the form
> > "bits/something".
>
> I must admit that I'm a bit puzzled now.
>
> For example there is: ./include/bits/types/struct_rusage.h which has
> only #include <resource/bits/types/struct_rusage.h>
include/ has a mixture of installed headers, internal headers, and
wrappers for installed headers. Wrappers such as the above are needed in
include/ in the case where the installed header is in one subdirectory of
the glibc sources ("resource" in that case) but is used by a source file
compiled from another directory - compilations in one subdirectory don't
use -I options pointing to another subdirectory, so without such wrappers
the header couldn't be found.
Installed "bits" headers are in the top-level bits/ directory, in other
subdirectories or in sysdeps. So include/bits should only have wrappers
for installed headers.
> Isn't the ./include/bits/types/struct_timespec.h giving the opportunity
> to override this struct for internal glibc usage?
Generically, include/ wrappers may contain additional internal
definitions, provided those are disabled if _ISOMAC is defined. For
example, include/time.h contains internal time-related definitions.
In the case of the bits/types/ header namespace, the contents of such a
header are precisely defined (it's there to define a specific type for use
in installed headers), so there's not really much scope for an internal
wrapper to have anything more than the #include.
> Where would you recommend to put the struct___timespec64.h file?
Anywhere that doesn't use the bits/ namespace. It could be e.g.
include/struct___timespec64.h.
> Yes, I've received a notification that the message waits for libc-alpha
> moderator approval as I've add too many recipients. However, the same
> one-liner worked with the old setup.
Carlos, could you approve any messages waiting for moderation only because
of too many recipients, and increase the limit on recipients for messages
going to the list substantially (to at least 50, say, or disable that
check)?
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list