summaryrefslogtreecommitdiff
path: root/utils/h2ph.PL
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-06-13 17:54:47 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2004-06-13 17:54:47 +0000
commit5fff27bd847e99d376dc14e8b7fb6503335c47f9 (patch)
tree7d18fe352a0a04514866901d84a670a462ca27cf /utils/h2ph.PL
parent26affc6c61604c9872ec2aaa162d647ce96277c4 (diff)
downloadperl-5fff27bd847e99d376dc14e8b7fb6503335c47f9.tar.gz
More h2ph voodoo.
p4raw-id: //depot/perl@22933
Diffstat (limited to 'utils/h2ph.PL')
-rw-r--r--utils/h2ph.PL11
1 files changed, 7 insertions, 4 deletions
diff --git a/utils/h2ph.PL b/utils/h2ph.PL
index 2e1c499e55..c6a39c9bb6 100644
--- a/utils/h2ph.PL
+++ b/utils/h2ph.PL
@@ -302,14 +302,17 @@ while (defined (my $file = next_file())) {
"unless defined(\&$enum_name);\n");
}
}
- } elsif (/^(?:__extension__\s+)?(?:extern|static)\s+(?:__)?inline(?:__)?\s+/) { # { for vi
+ } elsif (/^(?:__extension__\s+)?(?:extern|static)\s+(?:__)?inline(?:__)?\s+/
+ and !/;\s*$/ and !/{\s*}\s*$/)
+ { # { for vi
# This is a hack to parse the inline functions in the glibc headers.
- # Warning: massive kludge ahead. We suppose inline functions are mainly
- # constructed like macros.
+ # Warning: massive kludge ahead. We suppose inline functions
+ # are mainly constructed like macros.
while (1) {
last unless defined ($next = next_line($file));
chomp $next;
- undef $_, last if $next =~ /__THROW\s*;/;
+ undef $_, last if $next =~ /__THROW\s*;/
+ or $next =~ /^(__extension__|extern|static)\b/;
$_ .= " $next";
print OUT "# $next\n" if $opt_D;
last if $next =~ /^}|^{.*}\s*$/;