summaryrefslogtreecommitdiff
path: root/lib/ExtUtils
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2006-05-01 17:28:43 +0000
committerNicholas Clark <nick@ccl4.org>2006-05-01 17:28:43 +0000
commit71adef125534c48a9b41d31beff5cf0c57c9c240 (patch)
tree323504a8eb4b2d44df5067154595b01c8ca032d3 /lib/ExtUtils
parent485f531e502dcba5ee00641e3b64706a16e1b995 (diff)
downloadperl-71adef125534c48a9b41d31beff5cf0c57c9c240.tar.gz
Allow a macro of "0" to mean "#if 0" for convenient elimination of
constants. p4raw-id: //depot/perl@28038
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r--lib/ExtUtils/Constant/Base.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ExtUtils/Constant/Base.pm b/lib/ExtUtils/Constant/Base.pm
index 8dab240d23..48e0c37691 100644
--- a/lib/ExtUtils/Constant/Base.pm
+++ b/lib/ExtUtils/Constant/Base.pm
@@ -5,7 +5,7 @@ use vars qw($VERSION $is_perl56);
use Carp;
use Text::Wrap;
use ExtUtils::Constant::Utils qw(C_stringify perl_stringify);
-$VERSION = '0.02';
+$VERSION = '0.03';
$is_perl56 = ($] < 5.007 && $] > 5.005_50);
@@ -78,7 +78,7 @@ sub macro_to_ifdef {
return $macro->[0];
}
if (defined $macro && $macro ne "" && $macro ne "1") {
- return "#ifdef $macro\n";
+ return $macro ? "#ifdef $macro\n" : "#if 0\n";
}
return "";
}