This is the mail archive of the
cygwin
mailing list for the Cygwin project.
_GLIBCXX_USE_C99 not working?
- From: Christian Franke <Christian dot Franke at t-online dot de>
- To: cygwin at cygwin dot com
- Date: Thu, 17 May 2007 22:32:21 +0200
- Subject: _GLIBCXX_USE_C99 not working?
Defining _GLIBCXX_USE_C99 does not work with current Cygwin C++ includes.
Testcase:
#define _GLIBCXX_USE_C99 1 // need std::llabs()
#include <cstdlib>
long long f(long long x)
{
return std::llabs(x);
}
Compile fails with:
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdlib:181:
error: `::strtold' has not been declared
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdlib:200:
error: `__gnu_cxx::strtold' has not been declared
The function strtold() does actually not exist in stdlib.h
and the corresponding _GLIBCXX_HAVE_STRTOLD in
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/i686-pc-cygwin/bits/c++config.h
is not set.
But "using ::strtold" exists in the "#if _GLIBCXX_USE_C99" part of
/usr/lib/gcc/i686-pc-cygwin/3.4.4/include/c++/cstdlib
Workaround: delete the two "using ::strtold" lines from cstdlib.
Christian
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/