system.h [...]: Wrap C function declarations in extern "C".
gcc: * system.h [__cplusplus]: Wrap C function declarations in extern "C". include: * xregex.h (regoff_t): Define. From-SVN: r176747
This commit is contained in:
parent
7fdab8d4fc
commit
4d1c74214e
4 changed files with 41 additions and 0 deletions
|
@ -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-25 Richard Guenther <rguenther@suse.de>
|
2011-07-25 Richard Guenther <rguenther@suse.de>
|
||||||
|
|
||||||
PR tree-optimization/49822
|
PR tree-optimization/49822
|
||||||
|
|
32
gcc/system.h
32
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)
|
# define fputc(C, Stream) fputc_unlocked (C, Stream)
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
# ifdef HAVE_CLEARERR_UNLOCKED
|
# ifdef HAVE_CLEARERR_UNLOCKED
|
||||||
# undef clearerr
|
# undef clearerr
|
||||||
# define clearerr(Stream) clearerr_unlocked (Stream)
|
# define clearerr(Stream) clearerr_unlocked (Stream)
|
||||||
|
@ -170,6 +174,10 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
|
||||||
# endif
|
# endif
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ??? Glibc's fwrite/fread_unlocked macros cause
|
/* ??? 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
|
here. These checks will be in the undefined state while configure
|
||||||
is running so be careful to test "defined (HAVE_DECL_*)". */
|
is running so be careful to test "defined (HAVE_DECL_*)". */
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined (HAVE_DECL_ATOF) && !HAVE_DECL_ATOF
|
#if defined (HAVE_DECL_ATOF) && !HAVE_DECL_ATOF
|
||||||
extern double atof (const char *);
|
extern double atof (const char *);
|
||||||
#endif
|
#endif
|
||||||
|
@ -430,10 +442,18 @@ extern void *sbrk (int);
|
||||||
extern char *strstr (const char *, const char *);
|
extern char *strstr (const char *, const char *);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MALLOC_H
|
#ifdef HAVE_MALLOC_H
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined (HAVE_DECL_MALLOC) && !HAVE_DECL_MALLOC
|
#if defined (HAVE_DECL_MALLOC) && !HAVE_DECL_MALLOC
|
||||||
extern void *malloc (size_t);
|
extern void *malloc (size_t);
|
||||||
#endif
|
#endif
|
||||||
|
@ -446,6 +466,10 @@ extern void *calloc (size_t, size_t);
|
||||||
extern void *realloc (void *, size_t);
|
extern void *realloc (void *, size_t);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_STDINT_H
|
#ifdef HAVE_STDINT_H
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -454,6 +478,10 @@ extern void *realloc (void *, size_t);
|
||||||
#include <inttypes.h>
|
#include <inttypes.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
/* If the system doesn't provide strsignal, we get it defined in
|
/* If the system doesn't provide strsignal, we get it defined in
|
||||||
libiberty but no declaration is supplied. */
|
libiberty but no declaration is supplied. */
|
||||||
#if !defined (HAVE_STRSIGNAL) \
|
#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);
|
extern int vsnprintf(char *, size_t, const char *, va_list);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* 1 if we have C99 designated initializers. */
|
/* 1 if we have C99 designated initializers. */
|
||||||
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
|
#if !defined(HAVE_DESIGNATED_INITIALIZERS)
|
||||||
#define HAVE_DESIGNATED_INITIALIZERS \
|
#define HAVE_DESIGNATED_INITIALIZERS \
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
2011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||||
|
|
||||||
|
* xregex.h (regoff_t): Define.
|
||||||
|
|
||||||
2011-07-22 Jakub Jelinek <jakub@redhat.com>
|
2011-07-22 Jakub Jelinek <jakub@redhat.com>
|
||||||
|
|
||||||
* dwarf2.h (DW_AT_GNU_macros): New.
|
* dwarf2.h (DW_AT_GNU_macros): New.
|
||||||
|
|
|
@ -8,6 +8,7 @@
|
||||||
# define regexec xregexec
|
# define regexec xregexec
|
||||||
# define regcomp xregcomp
|
# define regcomp xregcomp
|
||||||
# define regerror xregerror
|
# define regerror xregerror
|
||||||
|
# define regoff_t xregoff_t
|
||||||
# define re_set_registers xre_set_registers
|
# define re_set_registers xre_set_registers
|
||||||
# define re_match_2 xre_match_2
|
# define re_match_2 xre_match_2
|
||||||
# define re_match xre_match
|
# define re_match xre_match
|
||||||
|
|
Loading…
Add table
Reference in a new issue