summaryrefslogtreecommitdiff
path: root/perly.fixer
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-03-14 04:42:54 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-03-14 04:42:54 +0000
commitdae2d13f8edc3ee84694ec70a87a495ba78e08f2 (patch)
tree2bfbdcc664fe531d464520294e72c65ebff8a5e8 /perly.fixer
parent4af0bda917eceeead6e59e5dc7c6b28fce055a0a (diff)
downloadperl-dae2d13f8edc3ee84694ec70a87a495ba78e08f2.tar.gz
Preserve the #ifdef PERL_CORE in perly.h.
p4raw-id: //depot/perl@9146
Diffstat (limited to 'perly.fixer')
-rwxr-xr-xperly.fixer11
1 files changed, 11 insertions, 0 deletions
diff --git a/perly.fixer b/perly.fixer
index daa558e84e..00f583c675 100755
--- a/perly.fixer
+++ b/perly.fixer
@@ -19,6 +19,17 @@ input=$1
output=$2
tmp=/tmp/f$$
+inputh=`echo $input|sed 's:\.c$:.h:'`
+if grep '^#ifdef PERL_CORE' $inputh; then
+ : never mind
+else
+ echo "#ifdef PERL_CORE" > $tmp
+ sed -e 's:^typedef union {:#endif /* PERL_CORE */\
+\
+typedef union {:' $inputh >> $tmp
+ mv -f $tmp $inputh
+fi
+
if grep 'yaccpar 1.8 (Berkeley)' $input >/dev/null 2>&1; then
cp $input $output
# Don't expect the diff to do everything -- do some by hand