From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32531 invoked by alias); 9 Feb 2006 21:06:49 -0000 Received: (qmail 32519 invoked by uid 22791); 9 Feb 2006 21:06:48 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Thu, 09 Feb 2006 21:06:48 +0000 Received: from drow by nevyn.them.org with local (Exim 4.54) id 1F7J01-0000UF-Uf for gdb-patches@sourceware.org; Thu, 09 Feb 2006 16:06:46 -0500 Date: Thu, 09 Feb 2006 21:06:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sourceware.org Subject: Re: RFA: Support Windows extended error numbers in safe_strerror Message-ID: <20060209210645.GA1854@nevyn.them.org> Mail-Followup-To: gdb-patches@sourceware.org References: <200602062254.k16MsagK009925@elgar.sibelius.xs4all.nl> <20060206225829.GA31895@nevyn.them.org> <20060208000855.GA5040@nevyn.them.org> <200602082107.k18L7xRh013417@elgar.sibelius.xs4all.nl> <200602082310.k18NAQNe027038@elgar.sibelius.xs4all.nl> <15661.192.87.1.22.1139496247.squirrel@webmail.xs4all.nl> <20060209145753.GA25270@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.8i X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2006-02/txt/msg00221.txt.bz2 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 > > Cc: Eli Zaretskii , 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