This is the mail archive of the
cygwin-apps
mailing list for the Cygwin project.
Re: [PATCH] setup.exe: add autoload and version check for AttachConsole
- From: Christopher Faylor <cgf-use-the-mailinglist-please at cygwin dot com>
- To: cygwin-apps at cygwin dot com
- Date: Wed, 1 Apr 2009 10:00:03 -0400
- Subject: Re: [PATCH] setup.exe: add autoload and version check for AttachConsole
- References: <49D3560D.40505@gmail.com>
- Reply-to: cygwin-apps at cygwin dot com
On Wed, Apr 01, 2009 at 12:54:53PM +0100, Dave Korn wrote:
>
> Hi gang,
>
> AttachConsole (added recently for stdout/stderr handling) doesn't exist on
>win2k, having been introduced in xp/2k3, so setup HEAD currently doesn't run
>there.
>
> The attached patch fixes the load-time problem by adding an autoload. That
>won't prevent the run-time crash if the function gets called, of course; so it
>also adds a version check before the call.
>
> Unless anyone shouts, I'll commit it later today; I think this is basically
>obvious. Tested by verifying under GDB that it avoids the SEGV and by seeing
>that with the patch the setup.log and setup.log.full files are successfully
>generated.
>
> * autoload.c (kernel32): Add autoload entry for AttachConsole.
> * main.cc (set_cout): Check IsXpOrBetter before trying to use it.
> * win32.h (IsXpOrBetter): New version check macro.
Please don't submit this. I'll fix the problem but not this way.
cgf