summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorwolfgang.laun@chello.at <wolfgang.laun@chello.at>2004-05-30 19:27:07 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-05-31 12:50:57 +0000
commit55c8af0d29e97571eaa9bbcffa216a005af1aa1d (patch)
treefcfad3496405e35ec74ef31f6933c5559ed1993a /utils
parent59b0a8b7fe6b66a1488f6943ad58e73704f876b0 (diff)
downloadperl-55c8af0d29e97571eaa9bbcffa216a005af1aa1d.tar.gz
Re: [perl #29969] h2ph not correctly processing glibc sys/sysmacros.ph
Message-Id: <20040530152707.ZLWL22856.viefep16-int.chello.at@localhost> p4raw-id: //depot/perl@22877
Diffstat (limited to 'utils')
-rw-r--r--utils/h2ph.PL10
1 files changed, 8 insertions, 2 deletions
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index eaa019a287..c5cc185dd4 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -380,10 +380,16 @@ sub expr {
};
# Eliminate typedefs
/\(([\w\s]+)[\*\s]*\)\s*[\w\(]/ && do {
+ my $doit = 1;
foreach (split /\s+/, $1) { # Make sure all the words are types,
- last unless ($isatype{$_} or $_ eq 'struct' or $_ eq 'union');
+ unless($isatype{$_} or $_ eq 'struct' or $_ eq 'union'){
+ $doit = 0;
+ last;
+ }
+ }
+ if( $doit ){
+ s/\([\w\s]+[\*\s]*\)// && next; # then eliminate them.
}
- s/\([\w\s]+[\*\s]*\)// && next; # then eliminate them.
};
# struct/union member, including arrays:
s/^([_A-Z]\w*(\[[^\]]+\])?((\.|->)[_A-Z]\w*(\[[^\]]+\])?)+)//i && do {