This is the mail archive of the
mailing list for the Cygwin project.
Cygwin 1.7/1.5 C99 conformance (GCC, libc)
- From: "Matthias Andree" <matthias dot andree at gmx dot de>
- To: cygwin at cygwin dot com
- Cc: "Bjorn Reese" <breese at mail1 dot stofanet dot dk>
- Date: Tue, 15 Sep 2009 11:38:44 +0200
- Subject: Cygwin 1.7/1.5 C99 conformance (GCC, libc)
I recently figured that ctrio (from sourceforge.net) fails to link (GCC
Reason is that ctrio checks the __STDC_VERSION__ for C99 support, which
there is, and assumes that the implementation were a hosted one (as
opposed to a freestanding one) and uses powl() without further checks.
Now, Cygwin 1.5 and 1.7 appear to lack long double library support in
libc/libm -- which is required for a hosted C99 implementation however,
but not for a freestanding C99 implementation.
Trying to solve this, I found another Cygwin issue: GCC 3.4.4 sets
__STDC_HOSTED__ to 1 by default (that's a GCC factory default).
I propose that this gets overridden to 0 in Cygwin-ported GCC compilers
until the library support for a C99-conforming full hosted implementation
is in place, so that applications can safely check
#if __STDC_HOSTED__ - 0 > 0
/* assume hosted C99 implementation, i. e. with powl() capable libc/libm */
/* ... */
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple