This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: RFA: Support Windows extended error numbers in safe_strerror
On Thu, Feb 09, 2006 at 10:38:53PM +0200, Eli Zaretskii wrote:
> > Date: Thu, 9 Feb 2006 09:57:53 -0500
> > From: Daniel Jacobowitz <drow@false.org>
> > Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sourceware.org
> >
> > Of course there's a flip side. If I do it Eli's way, the default
> > version has to compile and link. Which happens to be the case for
> > the two examples we have today, but also a pretty limiting assumption.
>
> If the default version doesn't compile on the platform that needs the
> hook, the solution is simple: define enough macros and stub functions
> to effectively make it the default version a nop on that platform.
Except now I can't define either macros or prototypes for the stub
functions, since part of the point of this exercise is to avoid the
xm.h header!
A more concrete example: win32-termcap.c currently provides tgetnum,
because the current Windows setup does not use a curses library.
Unfortunately there's no prototype in scope for this anywhere,
so we get a warning. I'm going to have to autoconf for the prototype
and put it somewhere generic, instead of tucking it away in
config/i386/xm-mingw.h. I don't really love this idea but I don't
see another way to fix -Werror builds.
--
Daniel Jacobowitz
CodeSourcery