- Minor API files update.
- Turned on calling convention checking for Win32 functions by default.
This commit is contained in:
parent
cf50ffbf0a
commit
d18837b7aa
|
@ -41,11 +41,6 @@ dlls/ddraw/dclipper
|
||||||
|
|
||||||
dlls/dinput
|
dlls/dinput
|
||||||
|
|
||||||
% dlls/display/display.spec
|
|
||||||
|
|
||||||
dlls/display
|
|
||||||
objects
|
|
||||||
|
|
||||||
% dlls/dplayx/dplay.spec
|
% dlls/dplayx/dplay.spec
|
||||||
|
|
||||||
dlls/dplayx
|
dlls/dplayx
|
||||||
|
@ -93,6 +88,58 @@ dlls/imagehlp
|
||||||
|
|
||||||
dlls/imm32
|
dlls/imm32
|
||||||
|
|
||||||
|
% dlls/kernel/comm.spec
|
||||||
|
|
||||||
|
% dlls/kernel/kernel.spec
|
||||||
|
|
||||||
|
files
|
||||||
|
if1632
|
||||||
|
loader/ne
|
||||||
|
loader
|
||||||
|
memory
|
||||||
|
misc
|
||||||
|
msdos
|
||||||
|
relay32
|
||||||
|
scheduler
|
||||||
|
win32
|
||||||
|
|
||||||
|
% dlls/kernel/kernel32.spec
|
||||||
|
|
||||||
|
files
|
||||||
|
loader/ne
|
||||||
|
loader
|
||||||
|
memory
|
||||||
|
misc
|
||||||
|
objects
|
||||||
|
ole
|
||||||
|
relay32
|
||||||
|
scheduler
|
||||||
|
win32
|
||||||
|
|
||||||
|
% dlls/kernel/system.spec
|
||||||
|
|
||||||
|
misc
|
||||||
|
|
||||||
|
% dlls/kernel/toolhelp.spec
|
||||||
|
|
||||||
|
loader/ne
|
||||||
|
loader
|
||||||
|
memory
|
||||||
|
misc
|
||||||
|
windows
|
||||||
|
|
||||||
|
% dlls/kernel/wow32.spec
|
||||||
|
|
||||||
|
relay32
|
||||||
|
|
||||||
|
% dlls/kernel/wprocs.spec
|
||||||
|
|
||||||
|
if1632
|
||||||
|
loader/ne
|
||||||
|
msdos
|
||||||
|
relay32
|
||||||
|
windows
|
||||||
|
|
||||||
% dlls/lzexpand/lz32.spec
|
% dlls/lzexpand/lz32.spec
|
||||||
|
|
||||||
dlls/lzexpand
|
dlls/lzexpand
|
||||||
|
@ -274,6 +321,11 @@ windows
|
||||||
dlls/user
|
dlls/user
|
||||||
misc
|
misc
|
||||||
|
|
||||||
|
% dlls/user/display.spec
|
||||||
|
|
||||||
|
dlls/user
|
||||||
|
objects
|
||||||
|
|
||||||
% dlls/user/user.spec
|
% dlls/user/user.spec
|
||||||
|
|
||||||
controls
|
controls
|
||||||
|
@ -414,55 +466,3 @@ win32
|
||||||
% dlls/x11drv/x11drv.spec
|
% dlls/x11drv/x11drv.spec
|
||||||
|
|
||||||
dlls/x11drv
|
dlls/x11drv
|
||||||
|
|
||||||
% if1632/comm.spec
|
|
||||||
|
|
||||||
% if1632/kernel.spec
|
|
||||||
|
|
||||||
files
|
|
||||||
if1632
|
|
||||||
loader/ne
|
|
||||||
loader
|
|
||||||
memory
|
|
||||||
misc
|
|
||||||
msdos
|
|
||||||
relay32
|
|
||||||
scheduler
|
|
||||||
win32
|
|
||||||
|
|
||||||
% if1632/system.spec
|
|
||||||
|
|
||||||
misc
|
|
||||||
|
|
||||||
% if1632/toolhelp.spec
|
|
||||||
|
|
||||||
loader/ne
|
|
||||||
loader
|
|
||||||
memory
|
|
||||||
misc
|
|
||||||
windows
|
|
||||||
|
|
||||||
% if1632/wprocs.spec
|
|
||||||
|
|
||||||
if1632
|
|
||||||
loader/ne
|
|
||||||
msdos
|
|
||||||
relay32
|
|
||||||
windows
|
|
||||||
|
|
||||||
% relay32/kernel32.spec
|
|
||||||
|
|
||||||
files
|
|
||||||
loader/ne
|
|
||||||
loader
|
|
||||||
memory
|
|
||||||
misc
|
|
||||||
objects
|
|
||||||
ole
|
|
||||||
relay32
|
|
||||||
scheduler
|
|
||||||
win32
|
|
||||||
|
|
||||||
% relay32/wow32.spec
|
|
||||||
|
|
||||||
relay32
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
DWORD
|
DWORD
|
||||||
|
HRESULT
|
||||||
HWND
|
HWND
|
||||||
UINT
|
UINT
|
||||||
|
|
||||||
|
@ -23,6 +24,7 @@ LPPAGESETUPDLGA
|
||||||
LPPAGESETUPDLGW
|
LPPAGESETUPDLGW
|
||||||
LPPRINTDLGA
|
LPPRINTDLGA
|
||||||
LPPRINTDLGW
|
LPPRINTDLGW
|
||||||
|
LPVOID
|
||||||
|
|
||||||
%str
|
%str
|
||||||
|
|
||||||
|
|
|
@ -7,14 +7,11 @@ SQLHENV
|
||||||
SQLHSTMT
|
SQLHSTMT
|
||||||
SQLHWND
|
SQLHWND
|
||||||
SQLINTEGER
|
SQLINTEGER
|
||||||
|
SQLRETURN
|
||||||
SQLSMALLINT
|
SQLSMALLINT
|
||||||
SQLUINTEGER
|
SQLUINTEGER
|
||||||
SQLUSMALLINT
|
SQLUSMALLINT
|
||||||
|
|
||||||
%long --extension
|
|
||||||
|
|
||||||
SQLRETURNTYPE
|
|
||||||
|
|
||||||
%ptr
|
%ptr
|
||||||
|
|
||||||
SQLCHAR *
|
SQLCHAR *
|
||||||
|
|
|
@ -387,11 +387,11 @@ foreach my $file ($options->c_files) {
|
||||||
if($options->local && $options->argument) {
|
if($options->local && $options->argument) {
|
||||||
if($options->win16 && $options->report_module($module16)) {
|
if($options->win16 && $options->report_module($module16)) {
|
||||||
winapi_local::check_function $options, $output16,
|
winapi_local::check_function $options, $output16,
|
||||||
$return_type, $calling_convention, $external_name16, $internal_name, [@argument_types], $win16api;
|
$return_type, $calling_convention, $external_name16, $internal_name, [@argument_types], $nativeapi, $win16api;
|
||||||
}
|
}
|
||||||
if($options->win32 && $options->report_module($module32)) {
|
if($options->win32 && $options->report_module($module32)) {
|
||||||
winapi_local::check_function $options, $output32,
|
winapi_local::check_function $options, $output32,
|
||||||
$return_type, $calling_convention, $external_name32, $internal_name, [@argument_types], $win32api;
|
$return_type, $calling_convention, $external_name32, $internal_name, [@argument_types], $nativeapi, $win32api;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,7 @@ sub check_function {
|
||||||
my $internal_name = shift;
|
my $internal_name = shift;
|
||||||
my $refargument_types = shift;
|
my $refargument_types = shift;
|
||||||
my @argument_types = @$refargument_types;
|
my @argument_types = @$refargument_types;
|
||||||
|
my $nativeapi = shift;
|
||||||
my $winapi = shift;
|
my $winapi = shift;
|
||||||
|
|
||||||
my $module = $winapi->function_module($internal_name);
|
my $module = $winapi->function_module($internal_name);
|
||||||
|
@ -76,7 +77,7 @@ sub check_function {
|
||||||
} elsif($calling_convention =~ /^__stdcall|VFWAPI|WINAPI|CALLBACK$/) {
|
} elsif($calling_convention =~ /^__stdcall|VFWAPI|WINAPI|CALLBACK$/) {
|
||||||
$implemented_calling_convention = "stdcall";
|
$implemented_calling_convention = "stdcall";
|
||||||
} else {
|
} else {
|
||||||
$implemented_calling_convention = "<default>";
|
$implemented_calling_convention = "cdecl";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,7 +97,11 @@ sub check_function {
|
||||||
!($declared_calling_convention =~ /^pascal/ && $forbidden_return_type) &&
|
!($declared_calling_convention =~ /^pascal/ && $forbidden_return_type) &&
|
||||||
!($implemented_calling_convention =~ /^cdecl|varargs$/ && $declared_calling_convention =~ /^cdecl|varargs$/))
|
!($implemented_calling_convention =~ /^cdecl|varargs$/ && $declared_calling_convention =~ /^cdecl|varargs$/))
|
||||||
{
|
{
|
||||||
if($options->calling_convention) {
|
if($options->calling_convention && (
|
||||||
|
($options->calling_convention_win16 && $winapi->name eq "win16") ||
|
||||||
|
($options->calling_convention_win32 && $winapi->name eq "win32")) &&
|
||||||
|
!$nativeapi->is_function($internal_name))
|
||||||
|
{
|
||||||
&$output("calling convention mismatch: $implemented_calling_convention != $declared_calling_convention");
|
&$output("calling convention mismatch: $implemented_calling_convention != $declared_calling_convention");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -58,7 +58,9 @@ my %options = (
|
||||||
parser => \&parser_comma_list,
|
parser => \&parser_comma_list,
|
||||||
description => "argument kind checking"
|
description => "argument kind checking"
|
||||||
},
|
},
|
||||||
"calling-convention" => { default => 0, parent => "local", description => "calling convention checking" },
|
"calling-convention" => { default => 1, parent => "local", description => "calling convention checking" },
|
||||||
|
"calling-convention-win16" => { default => 0, parent => "calling-convention", description => "calling convention checking (Win16)" },
|
||||||
|
"calling-convention-win32" => { default => 1, parent => "calling-convention", description => "calling convention checking (Win32)" },
|
||||||
"misplaced" => { default => 1, parent => "local", description => "check for misplaced functions" },
|
"misplaced" => { default => 1, parent => "local", description => "check for misplaced functions" },
|
||||||
"statements" => { default => 0, parent => "local", description => "check for statements inconsistances" },
|
"statements" => { default => 0, parent => "local", description => "check for statements inconsistances" },
|
||||||
"cross-call" => { default => 0, parent => "statements", description => "check for cross calling functions" },
|
"cross-call" => { default => 0, parent => "statements", description => "check for cross calling functions" },
|
||||||
|
|
Loading…
Reference in New Issue