diff options
author | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-08-11 20:36:33 +0000 |
---|---|---|
committer | bothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4> | 1994-08-11 20:36:33 +0000 |
commit | 93aa68b4add148a26e933603f2bb019a090a1c81 (patch) | |
tree | 98e41f69671c4b84a60c3d434858f6160f0d61fa /gcc/fix-header.c | |
parent | 6c9cb5cc7542de983b3b8004824e8cea8bb196b0 (diff) | |
download | gcc-93aa68b4add148a26e933603f2bb019a090a1c81.tar.gz |
If NO_IMPLICIT_EXTERN_C is defined, add extern "C" { ... }.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7894 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fix-header.c')
-rw-r--r-- | gcc/fix-header.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/gcc/fix-header.c b/gcc/fix-header.c index 421992ae297..eba15fa909a 100644 --- a/gcc/fix-header.c +++ b/gcc/fix-header.c @@ -381,8 +381,13 @@ write_rbrac () char **rptr; if (required_unseen_count) - fprintf (outf, - "#if defined(__cplusplus) || defined(__USE_FIXED_PROTOTYPES__)\n"); + { + fprintf (outf, + "#if defined(__cplusplus) || defined(__USE_FIXED_PROTOTYPES__)\n"); +#ifdef NO_IMPLICIT_EXTERN_C + fprintf (outf, "extern \"C\" {\n"); +#endif + } /* Now we print out prototypes for those functions that we haven't seen. */ for (rptr = required_functions; *rptr; rptr++) @@ -410,8 +415,13 @@ write_rbrac () fprintf (outf, "#endif\n"); } if (required_unseen_count) - fprintf (outf, - "#endif /* defined(__cplusplus) || defined(__USE_FIXED_PROTOTYPES__*/\n"); + { +#ifdef NO_IMPLICIT_EXTERN_C + fprintf (outf, "}\n"); +#endif + fprintf (outf, + "#endif /* defined(__cplusplus) || defined(__USE_FIXED_PROTOTYPES__*/\n"); + } switch (special_file_handling) { |