This is the mail archive of the
cygwin-patches
mailing list for the Cygwin project.
Re: [patch] un-NT-ify cygcheck (was: cygwin 1.5.25-7: cygcheck does not work?)
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Thu, 20 Dec 2007 16:11:30 -0500
- Subject: Re: [patch] un-NT-ify cygcheck (was: cygwin 1.5.25-7: cygcheck does not work?)
- References: <836045.82708.qm@web33207.mail.mud.yahoo.com> <476A726D.50100@byu.net> <476A78EF.2322FB0A@dessent.net> <476A8729.5C05B169@dessent.net>
- Reply-to: cygwin-patches at cygwin dot com
On Thu, Dec 20, 2007 at 07:15:53AM -0800, Brian Dessent wrote:
>Brian Dessent wrote:
>
>> Fortunately, I have VMware with a Win98 image here.
>>
>> The problem is that bloda.c calls NtQuerySystemInformation without using
>> any kind of autoload.cc-type indirection, and so cygcheck gets a hard
>> dependency on ntdll.dll which doesn't exist on 9x/ME. We need to do one
>> of:
>>
>> - Revert the bloda-check feature on the 1.5 branch
>> - Check windows version at runtime and only do NT calls through
>> LoadLibrary/GetProcAddress
>> - Use the autoload.cc trick in cygcheck
>>
>> If we're going to make releases from the 1.5 branch then I don't think
>> it's quite acceptible just yet to shaft 9x users, after all that's the
>> whole point of the branch.
>
>The attached patch un-NT-ifies bloda.cc but sadly a similar cleanup is
>still required for cygpath as well if we are to support 9x/ME out of the
>1.5 branch. In that case I suppose you could just revert cygpath.cc to
>an older revision before the native APIs were added.
>
>Brian
>2007-12-20 Brian Dessent <brian@dessent.net>
>
> * Makefile.in (cygcheck.exe): Don't link to ntdll.
> * bloda.cc (pNtQuerySystemInformation): Add.
> (pRtlAnsiStringToUnicodeString): Add.
> (get_process_list): Use function pointers for NT functions.
> (dump_dodgy_apps): Skip dodgy app check on non-NT platforms.
> Use GetProcAddress for NT-specific functions.
I had something similar in my sandbox but 1) you beat me to it and 2)
yours is better. So, please check this into the trunk. I don't have
any problem with cygcheck being Windows 9x aware since it could help us
track down problems with people who are trying to run Cygwin 1.7.x on
older systems.
Unless Corinna says differently, I think she wants to be in control of
what goes into the branch so I don't want to suggest that you should
check it in there too.
cgf