This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
_GNU_SOURCE defined for g++, not for gcc
- To: gcc at gcc dot gnu dot org
- Subject: _GNU_SOURCE defined for g++, not for gcc
- From: Stefan Seefeld <seefeld at sympatico dot ca>
- Date: Fri, 16 Mar 2001 23:27:31 -0500
hi there,
in of of the most recent compiler snapshots there the _GNU_SOURCE
macro is defined implicitely when calling 'g++', but not 'gcc'.
What is the reason for this ? Is there anywhere a table of symbols
that are defined (per platform and compile time switch) ?
I'm working on an autoconf based build system, where I test for
the presence of declarations such as 'strsignal'. It now happens
that this function is declared if the above symbol is defined.
If I use the typical autoconf setting, where such tests are performed
with cc, I therefor don't see the symbol. As a consequence, I declare
it myself in a config.h file, which then leads to a clash when I compile
my application with 'c++', which then sees two separate declarations.
What is the correct fix for this problem ? Do I need to use AC_LANG_CPLUSPLUS
for all autoconf tests ?
Regards,
Stefan