This is the mail archive of the cygwin-apps mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] setup.exe: add autoload and version check for AttachConsole


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]