summaryrefslogtreecommitdiffstats
path: root/Configure
diff options
context:
space:
mode:
authorRich Salz <rsalz@akamai.com>2014-08-27 21:43:25 -0400
committerRich Salz <rsalz@akamai.com>2014-08-27 21:45:09 -0400
commit089f10e69ece75ce31540501fe0898b15e898552 (patch)
tree7a3d6b91f2de16844feb98f99cd7577a0506326d /Configure
parent7f7c05ca638c3cc6d261961fae439cd91e3c1d27 (diff)
RT2308: Add extern "C" { ... } wrapper
Add the wrapper to all public header files (Configure generates one). Don't bother for those that are just lists of #define's that do renaming. Reviewed-by: Tim Hudson <tjh@openssl.org> Cherry-pick of commit 17e80c6bd05de7406a65116f34ed59665607d8d5
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure6
1 files changed, 6 insertions, 0 deletions
diff --git a/Configure b/Configure
index c4e7dbb454..a6b35bf256 100755
--- a/Configure
+++ b/Configure
@@ -1791,6 +1791,9 @@ open(OUT,'>crypto/opensslconf.h.new') || die "unable to create crypto/opensslcon
print OUT "/* opensslconf.h */\n";
print OUT "/* WARNING: Generated automatically from opensslconf.h.in by Configure. */\n\n";
+print OUT "#ifdef __cplusplus\n";
+print OUT "extern \"C\" {\n";
+print OUT "#endif\n";
print OUT "/* OpenSSL was configured with the following options: */\n";
my $openssl_algorithm_defines_trans = $openssl_algorithm_defines;
$openssl_experimental_defines =~ s/^\s*#\s*define\s+OPENSSL_NO_(.*)/#ifndef OPENSSL_EXPERIMENTAL_$1\n# ifndef OPENSSL_NO_$1\n# define OPENSSL_NO_$1\n# endif\n#endif/mg;
@@ -1895,6 +1898,9 @@ while (<IN>)
{ print OUT $_; }
}
close(IN);
+print OUT "#ifdef __cplusplus\n";
+print OUT "}\n";
+print OUT "#endif\n";
close(OUT);
rename("crypto/opensslconf.h","crypto/opensslconf.h.bak") || die "unable to rename crypto/opensslconf.h\n" if -e "crypto/opensslconf.h";
rename("crypto/opensslconf.h.new","crypto/opensslconf.h") || die "unable to rename crypto/opensslconf.h.new\n";