This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add USE_CPLUSPLUS build option to win32 makefiles
[perl5.git] / win32 / config_sh.PL
index 60fb4ed..98255a8 100644 (file)
@@ -286,6 +286,11 @@ if ($opt{useithreads} eq 'define' && $opt{ccflags} =~ /-DPERL_IMPLICIT_SYS\b/) {
     $opt{d_pseudofork} = 'define';
 }
 
+if ($opt{usecplusplus} eq 'define') {
+    $opt{d_cplusplus} = 'define';
+    $opt{extern_C} = 'extern "C"';
+}
+
 #if the fields above are defined, they override the defaults in the premade
 #config file
 while (<>) {