Native build fails in winsup/cygwin/libc/strptime.cc because of strtou?l_l()
Corinna Vinschen
corinna-cygwin@cygwin.com
Wed Aug 24 08:38:00 GMT 2016
On Aug 24 00:19, Hans-Bernhard Bröker wrote:
> Hello everyone,
>
> building the git version of cygwin natively on Cygwin-2.5.3, I'm running
> into a problem with strtoul_l / strtol_l. winsup/cygwin/libc/strptime.cc
> fails to build:
> [...]
>
> Looking at the .ii file, it appears __GNU_VISIBLE is not active for this C++
> source file?
Yes, we discussed this already yesterday on the Freenode #cygwin-developers
IRC channel. The reason is that sys/cdefs.h is included before winsup.h
is included, the latter defining _GNU_SOURCE.
However, it appears that I don't see this problem when cross building on
Linux. It only shows up in a native build.
After some digging it turned out that in the cross build case _GNU_SOURCE
is predefined when using the -xc++ option:
Native:
$ x86_64-pc-cygwin-c++ -xc++ -dM -E - < /dev/null | grep GNU_SOURCE
[no output]
Linux:
$ x86_64-pc-cygwin-c++ -xc++ -dM -E - < /dev/null | grep GNU_SOURCE
#define _GNU_SOURCE 1
That's pretty weird since _GNU_SOURCE is not supposed to be defined
by the compiler or C preprocessor at all.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Maintainer cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20160824/30a9c124/attachment.sig>
More information about the Cygwin
mailing list