--- utils/h2ph.PL.orig 2012-04-25 02:18:36.000000000 +0200 +++ utils/h2ph.PL 2012-05-22 16:04:20.840544873 +0200 @@ -168,10 +168,14 @@ } print OUT "'sub $name () {$new;}' unless defined(&$name);\n"; } - } elsif (/^(include|import|include_next)\s*([<\"])(.*)[>\"]/) { + } elsif (/^(include|import|include_next)\s*([<\"])(.*)([>\"])/) { $incl_type = $1; $incl_quote = $2; $incl = $3; + if ($4 eq '"') { + $incl = "$1$incl" if $file =~ m!(.*/)! && -e "$1$incl"; + } + if (($incl_type eq 'include_next') || ($opt_e && exists($bad_file{$incl}))) { $incl =~ s/\.h$/.ph/;