Fix the winapi_check local header checks

Francois Gouget fgouget at free.fr
Thu Oct 21 09:12:58 CDT 2004


winapi_check did not know about include/msvcrt and issued a bunch of 
warnings:

dlls/msvcrt/tests/headers.c: #include "dos.h": file not found
dlls/msvcrt/tests/headers.c: #include "dos.h" is not a local include
...

It also contained a bunch of kludges for headers that don't need to be 
kludged anymore thanks to the dll separation work.


Changelog:

  * tools/winapi_check/winapi_check

    Add support for include/msvcrt. Fixes a bunch of spurious warnings.
    Remove kludges for kernel_private.h, gdi_private.h, ntdll_misc.h, 
ts_xlib.h, x11drv.h and x11font.h. They are not needed anymore.

-- 
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
       Any sufficiently advanced bug is indistinguishable from a feature.
                             -- from some indian guy
-------------- next part --------------
Index: tools/winapi_check/winapi_check
===================================================================
RCS file: /var/cvs/wine/tools/winapi_check/winapi_check,v
retrieving revision 1.66
diff -u -r1.66 winapi_check
--- tools/winapi_check/winapi_check	7 Oct 2004 18:53:56 -0000	1.66
+++ tools/winapi_check/winapi_check	21 Oct 2004 11:14:48 -0000
@@ -530,6 +530,8 @@
 		    my $include;
 		    if(-e "$wine_dir/include/$header") {
 			$include = "include/$header";
+		    } elsif(-e "$wine_dir/include/msvcrt/$header") {
+			$include = "include/msvcrt/$header";
 		    } elsif(-e "$file_dir/$header") {
 			$include = "$file_dir/$header";
 		    } elsif(-e "$file_dir/../$header") {
@@ -538,16 +540,8 @@
 			} else {
 			    $include = "$header";
 			}
-		    } elsif($header =~ /^(?:kernel_private\.h)$/) { # FIXME: Kludge
-			$include = "dlls/kernel/$header";
-		    } elsif($header =~ /^(?:gdi_private\.h)$/) { # FIXME: Kludge
-			$include = "dlls/gdi/$header";
-		    } elsif($header =~ /^(?:ntdll_misc\.h)$/) { # FIXME: Kludge
-			$include = "dlls/ntdll/$header";
-		    } elsif($header =~ /^(?:controls\.h|message\.h)$/) { # FIXME: Kludge
+		    } elsif($header =~ /^(?:controls|message|winproc)\.h$/) { # FIXME: Kludge
 			$include = "dlls/user/$header";
-		    } elsif($header =~ /^(?:ts_xlib\.h|winproc\.h|x11drv\.h|x11font\.h)$/) { # FIXME: Kludge
-			$include = "dlls/x11drv/$header";
 		    } elsif($check_local && $header ne "config.h") {
 			$output->write("$file: #include \"$header\": file not found\n");
 		    }
@@ -619,36 +613,21 @@
 				$include2info{$name}{used}++;
 			    }
 			}
-		    } elsif($header =~ /^(?:kernel_private\.h)$/) { # FIXME: Kludge
-			$include2info{"dlls/kernel/$header"}{used}++;
-			foreach my $name (keys(%{$include2info{"dlls/kernel/$header"}{includes}})) {
-			    $include2info{$name}{used}++;
-			}
-		    } elsif($header =~ /^(?:gdi_private\.h)$/) { # FIXME: Kludge
-			$include2info{"dlls/gdi/$header"}{used}++;
-			foreach my $name (keys(%{$include2info{"dlls/gdi/$header"}{includes}})) {
-			    $include2info{$name}{used}++;
-			}
-		    } elsif($header =~ /^(?:ntdll_misc\.h)$/) { # FIXME: Kludge
-			$include2info{"dlls/ntdll/$header"}{used}++;
-			foreach my $name (keys(%{$include2info{"dlls/ntdll/$header"}{includes}})) {
-			    $include2info{$name}{used}++;
-			}
-		    } elsif($header =~ /^(?:controls\.h|message\.h)$/) { # FIXME: Kludge
+		    } elsif($header =~ /^(?:controls|message|winproc)\.h$/) { # FIXME: Kludge
 			$include2info{"dlls/user/$header"}{used}++;
 			foreach my $name (keys(%{$include2info{"dlls/user/$header"}{includes}})) {
 			    $include2info{$name}{used}++;
 			}
-		    } elsif($header =~ /^(?:ts_xlib\.h|winproc\.h|x11drv\.h|x11font\.h)$/) { # FIXME: Kludge
-			$include2info{"dlls/x11drv/$header"}{used}++;
-			foreach my $name (keys(%{$include2info{"dlls/x11drv/$header"}{includes}})) {
-			    $include2info{$name}{used}++;
-			}
 		    } elsif(-e "$wine_dir/include/$header") {
 			$include2info{"include/$header"}{used}++;
 			foreach my $name (keys(%{$include2info{"include/$header"}{includes}})) {
 			    $include2info{$name}{used}++;
 			}
+		    } elsif(-e "$wine_dir/include/msvcrt/$header") {
+			$include2info{"include/msvcrt/$header"}{used}++;
+			foreach my $name (keys(%{$include2info{"include/msvcrt/$header"}{includes}})) {
+			    $include2info{$name}{used}++;
+			}
 		    } elsif ($header ne "config.h") {
 			$output->write("$file: #include \"$header\" is not a local include\n");
 		    }


More information about the wine-patches mailing list