diff options
author | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-25 14:26:58 +0000 |
---|---|---|
committer | ro <ro@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-07-25 14:26:58 +0000 |
commit | 80e4662c8234910551e2a9c8b71551b908770c0b (patch) | |
tree | c36b78c8587a510ed8115e947d3bcae844686652 /libcpp | |
parent | 71d67b2d0f5b690ffaf73f20a25df42c9382f113 (diff) | |
download | gcc-80e4662c8234910551e2a9c8b71551b908770c0b.tar.gz |
* system.h [__cplusplus]: Wrap C function declarations in extern "C".
-This line, and those below, will be ignored--
M ChangeLog
M system.h
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176748 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libcpp')
-rw-r--r-- | libcpp/ChangeLog | 4 | ||||
-rw-r--r-- | libcpp/system.h | 16 |
2 files changed, 20 insertions, 0 deletions
diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index e500332dd27..b7d8d00b1bc 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,7 @@ +2011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + * system.h [__cplusplus]: Wrap C function declarations in extern "C". + 2011-07-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> Ralf Wildenhues <Ralf.Wildenhues@gmx.de> diff --git a/libcpp/system.h b/libcpp/system.h index d1fb87ed348..0f15e12737a 100644 --- a/libcpp/system.h +++ b/libcpp/system.h @@ -84,6 +84,10 @@ along with GCC; see the file COPYING3. If not see # define fputc(C, Stream) fputc_unlocked (C, Stream) # endif +#ifdef __cplusplus +extern "C" { +#endif + # ifdef HAVE_CLEARERR_UNLOCKED # undef clearerr # define clearerr(Stream) clearerr_unlocked (Stream) @@ -164,6 +168,10 @@ extern int fprintf_unlocked (FILE *, const char *, ...); # endif # endif +#ifdef __cplusplus +} +#endif + #endif /* ??? Glibc's fwrite/fread_unlocked macros cause @@ -286,10 +294,18 @@ extern int errno; here. These checks will be in the undefined state while configure is running so be careful to test "defined (HAVE_DECL_*)". */ +#ifdef __cplusplus +extern "C" { +#endif + #if defined (HAVE_DECL_ABORT) && !HAVE_DECL_ABORT extern void abort (void); #endif +#ifdef __cplusplus +} +#endif + #if HAVE_SYS_STAT_H # include <sys/stat.h> #endif |