[PATCH] setup.exe: add autoload and version check for AttachConsole
Dave Korn
dave.korn.cygwin@googlemail.com
Wed Apr 1 11:44:00 GMT 2009
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.
cheers,
DaveK
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: setup-console-autoload.diff
URL: <http://cygwin.com/pipermail/cygwin-apps/attachments/20090401/f55deff7/attachment.ksh>
More information about the Cygwin-apps
mailing list