This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
RE: 26_numerics/c99_classification_macros_c++.cc fails on cygwin
- From: "Billinghurst, David (CRTS)" <David dot Billinghurst at riotinto dot com>
- To: <libstdc++ at gcc dot gnu dot org>,"Gabriel Dos Reis" <gdr at integrable-solutions dot net>
- Date: Fri, 11 Jul 2003 08:33:53 +1000
- Subject: RE: 26_numerics/c99_classification_macros_c++.cc fails on cygwin
I have made a little more progress on this.
- cygwin has full C99 support in <math.h>,
- but not in <stdlib.h>.
so that _GLIBCPP_USE_C99 is not defined
This means that the libstdc++-v3/include/c_std/std_cmath.h
doesn't undefine the C99 FP macros.
Details below. Where to from here?
On cygwin, libstdc++-v3 configure reports
...
checking for ISO C99 support in <math.h>... yes
checking for ISO C99 support in <stdio.h>... yes
checking for lldiv_t declaration... no
checking for ISO C99 support in <stdlib.h>... no
...
so that configure.h contains
...
// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
/* #undef _GLIBCPP_USE_C99 */
...
In libstdc++-v3/include/c_std/std_cmath.h code to undefine the
C99 macros is guarded by
#if _GLIBCPP_USE_C99
#if !_GLIBCPP_USE_C99_FP_MACROS_DYNAMIC
...
// Only undefine the C99 FP macros, if actually captured for namespace movement
#undef fpclassify
...
#endif /* _GLIBCPP_USE_C99_FP_MACROS_DYNAMIC */
#endif