summaryrefslogtreecommitdiff
path: root/Porting/expand-macro.pl
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2009-06-18 20:37:28 +0100
committerNicholas Clark <nick@ccl4.org>2009-06-18 20:37:28 +0100
commit4784c5e80ccedd3734ce162e02ed1c7e25e60c01 (patch)
treec4aa3a47932c336249f68fa50eb58e373bfc2fe4 /Porting/expand-macro.pl
parented690650a4d3639a6ac1ace13598aa3f1c99d7dc (diff)
downloadperl-4784c5e80ccedd3734ce162e02ed1c7e25e60c01.tar.gz
Allow expand-macro.pl to expand macros in perl.h without pre-processor warnings.
Diffstat (limited to 'Porting/expand-macro.pl')
-rw-r--r--Porting/expand-macro.pl7
1 files changed, 6 insertions, 1 deletions
diff --git a/Porting/expand-macro.pl b/Porting/expand-macro.pl
index 34b76cb81f..ed8e188efa 100644
--- a/Porting/expand-macro.pl
+++ b/Porting/expand-macro.pl
@@ -57,7 +57,12 @@ my $sentinel = "$macro expands to";
print $out <<"EOF";
#include "EXTERN.h"
#include "perl.h"
-#include "$header"
+EOF
+
+print qq{#include "$header"\n}
+ unless $header eq 'perl.h' or $header eq 'EXTERN.h';
+
+print $out <<"EOF";
#line 4 "$sentinel"
$macro$args
EOF