aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2011-07-25 14:24:59 +0000
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2011-07-25 14:24:59 +0000
commitd60892e0569e17ab20f5a4f2efaf3e2772e0becc (patch)
treef9bf9d2997edf89b4628f4a012d7aa90b35109e5 /gcc/system.h
parenta333ae8239cce80f5a410890edaafa2bd44a4f86 (diff)
gcc:
* system.h [__cplusplus]: Wrap C function declarations in extern "C". include: * xregex.h (regoff_t): Define. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@176747 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index ce027b2ea1e..7ac98596bc7 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -90,6 +90,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)
@@ -170,6 +174,10 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
# endif
# endif
+#ifdef __cplusplus
+}
+#endif
+
#endif
/* ??? Glibc's fwrite/fread_unlocked macros cause
@@ -390,6 +398,10 @@ 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_ATOF) && !HAVE_DECL_ATOF
extern double atof (const char *);
#endif
@@ -430,10 +442,18 @@ extern void *sbrk (int);
extern char *strstr (const char *, const char *);
#endif
+#ifdef __cplusplus
+}
+#endif
+
#ifdef HAVE_MALLOC_H
#include <malloc.h>
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#if defined (HAVE_DECL_MALLOC) && !HAVE_DECL_MALLOC
extern void *malloc (size_t);
#endif
@@ -446,6 +466,10 @@ extern void *calloc (size_t, size_t);
extern void *realloc (void *, size_t);
#endif
+#ifdef __cplusplus
+}
+#endif
+
#ifdef HAVE_STDINT_H
#include <stdint.h>
#endif
@@ -454,6 +478,10 @@ extern void *realloc (void *, size_t);
#include <inttypes.h>
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* If the system doesn't provide strsignal, we get it defined in
libiberty but no declaration is supplied. */
#if !defined (HAVE_STRSIGNAL) \
@@ -493,6 +521,10 @@ extern int snprintf (char *, size_t, const char *, ...);
extern int vsnprintf(char *, size_t, const char *, va_list);
#endif
+#ifdef __cplusplus
+}
+#endif
+
/* 1 if we have C99 designated initializers. */
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
#define HAVE_DESIGNATED_INITIALIZERS \