[PATCH] setup.exe: add autoload and version check for AttachConsole
Christopher Faylor
cgf-use-the-mailinglist-please@cygwin.com
Wed Apr 1 14:00:00 GMT 2009
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
More information about the Cygwin-apps
mailing list