Re: RFA: Support Windows extended error numbers in safe_strerror

Mark Kettenis
2006-02-09T14:44:14Z

>> Date: Thu, 9 Feb 2006 00:10:26 +0100 (CET)
>> From: Mark Kettenis <mark.kettenis@xs4all.nl>
>> CC: gdb-patches@sourceware.org
>>
>> but if we don't [drop the attempt to support MinGW], I want to make
>> sure the MinGW support is integrated in such a way that its impact
>> on the rest of the code is as small as possible.
>
> Can you state what are your expectations from such a ``as small as
> possible'' impact? That is, what are the do's and dont's which, if
> satisfied, will cause you to endorse the MinGW support?
>
> I think, if Daniel is about to rewrite his patches yet another time,
> he deserves to know the rules of the game in advance.
>
> For example, here's a suggestion for what I think is more seamless
> integration of MinGW and other ``illegal aliens'', here for the
> `select' issue:
>
> int gdb_select (...)
> {
> if (select_hook)
> return (*select_hook) (...);
> else
> return select (...);
> }
>
> We make `select_hook' a global pointer to a function, and then MinGW
> can define its own emulation on win32-something.c and plug its address
> into `select_hook'.

There is absolutely no reason for this additional complexity. GDB will
never be able to run on two different hosts at once. Just having two
different implementations and have configure.host choose the apprpriate
one will work just fine.

Mark