From 8013173924cf4096432b3d29ab8e9f7293e852f9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 6 Feb 2014 11:19:16 +0100 Subject: [PATCH] make_specfiles: Don't propagate -noname flag to non-ordinal functions. --- tools/make_specfiles | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/make_specfiles b/tools/make_specfiles index 1dd4533039f..9b9a6b691a1 100755 --- a/tools/make_specfiles +++ b/tools/make_specfiles @@ -223,15 +223,15 @@ sub update_file($) # parse a spec file line sub parse_line($$$) { - my ($name, $line, $_) = @_; + my ($name, $line, $str) = @_; - if (/^\s*(\@|\d+)\s+(stdcall|cdecl|varargs|thiscall|stub|extern)\s+((?:-\S+\s+)*)([A-Za-z0-9_\@\$?]+)(?:\s*(\([^)]*\)))?(?:\s+([A-Za-z0-9_\@\$?.]+))?(\s*\#.*)?/) + if ($str =~ /^\s*(\@|\d+)\s+(stdcall|cdecl|varargs|thiscall|stub|extern)\s+((?:-\S+\s+)*)([A-Za-z0-9_\@\$?]+)(?:\s*(\([^)]*\)))?(?:\s+([A-Za-z0-9_\@\$?.]+))?(\s*\#.*)?/) { return ( "ordinal" => $1, "callconv" => $2, "flags" => $3, "name" => $4, "args" => $5 || "", "target" => $6 || $4, "comment" => $7, "spec" => $name ); } - return () if /^\s*$/; - return () if /^\s*\#/; + return () if $str =~ /^\s*$/; + return () if $str =~ /^\s*\#/; printf STDERR "$name.spec:$line: error: Unrecognized line $_\n"; } @@ -300,6 +300,7 @@ sub update_spec_file($) { $flags = $parent{flags}; $flags =~ s/-ordinal\s*// if $descr{ordinal} eq "@"; + $flags =~ s/-noname\s*// if $descr{ordinal} eq "@"; if ($descr{flags} =~ /-private/) # preserve -private flag { $flags = "-private " . $flags unless $flags =~ /-private/; -- 2.11.4.GIT