diff options
Diffstat (limited to 'gdb/defs.h')
-rw-r--r-- | gdb/defs.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gdb/defs.h b/gdb/defs.h index 47da43a6652..7de129e30c7 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -280,11 +280,19 @@ extern char *relocate_gdb_directory (const char *initial, int flag); extern int annotation_level; /* in stack.c */ +#ifdef __cplusplus +# define EXTERN_C extern "C" +# define EXTERN_CONST extern const +#else +# define EXTERN_C extern +# define EXTERN_CONST const +#endif + /* From regex.c or libc. BSD 4.4 declares this with the argument type as "const char *" in unistd.h, so we can't declare the argument as "char *". */ -extern char *re_comp (const char *); +EXTERN_C char *re_comp (const char *); /* From symfile.c */ |