[PATCH v2] libc/time: Move internal newlib tz-structs to local.h
Corinna Vinschen
vinschen@redhat.com
Thu Oct 15 17:11:36 GMT 2020
On Oct 15 16:47, Torbjorn SVENSSON via Newlib wrote:
> Hello Corinna,
>
> Thanks for the feedback and I hope that you had a nice vacation!
>
> I haven't run tests with your patch applied, but just reading it should be fine.
> I see no reason why "sys/_tz_structs.h" would be included from
> "bits/stdc++.h", and it is this particular include chain that is
> causing the problems in the libstdc ++ test suite, so if it works for
> Cygwin, I'd say go for it!
Thanks for reviewing. I'll push the patch in a minute. I still
think we should rename the struct members as well, though. There's
no good reason that we have a user of these structures outside
newlib/Cygwin. But still, *iff* this file is included for whatever
dubious purpose, it might result in problems.
We have two ways to fix this:
- Either guard the definitions additionally with a preprocessor
expression like this:
#if defined (__INSIDE_CYGWIN__) || defined (_COMPILING_NEWLIB)
[...]
#endif
- or fix the names of the struct members and the newlib/Cygwin code
using them.
Thoughts? Jeff?
Corinna
More information about the Newlib
mailing list