From: Nicholas Clark Date: Fri, 15 Sep 2006 22:03:53 +0000 (+0000) Subject: Avoid warnings when $Config{d_cplusplus} is undefined. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9f20e2cfb903d33f1df637b45bc92463e8540f62;p=p5sagit%2Fp5-mst-13.2.git Avoid warnings when $Config{d_cplusplus} is undefined. p4raw-id: //depot/perl@28849 --- diff --git a/ext/Encode/bin/enc2xs b/ext/Encode/bin/enc2xs index 8a85ca0..7665fa5 100644 --- a/ext/Encode/bin/enc2xs +++ b/ext/Encode/bin/enc2xs @@ -689,7 +689,7 @@ sub addstrings } if ($a->{'Forward'}) { - my $cpp = $Config{d_cplusplus} eq 'define'; + my $cpp = ($Config{d_cplusplus} || '') eq 'define'; my $var = $^O eq 'MacOS' || $cpp ? 'extern' : 'static'; my $const = $cpp ? '' : 'const'; print $fh "$var $const encpage_t $name\[",scalar(@{$a->{'Entries'}}),"];\n"; @@ -755,7 +755,7 @@ sub outbigstring } $strings = length $string_acc; - my $cpp = $Config{d_cplusplus} eq 'define'; + my $cpp = ($Config{d_cplusplus} || '') eq 'define'; my $var = $cpp ? '' : 'static'; my $definition = "\n$var const U8 $name\[$strings] = { " . join(',',unpack "C*",$string_acc); @@ -782,7 +782,7 @@ sub outtable my ($s,$e,$out,$t,$end,$l) = @$b; outtable($fh,$t,$bigname) unless $t->{'Done'}; } - my $cpp = $Config{d_cplusplus} eq 'define'; + my $cpp = ($Config{d_cplusplus} || '') eq 'define'; my $var = $cpp ? '' : 'static'; my $const = $cpp ? '' : 'const'; print $fh "\n$var $const encpage_t $name\[",