From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25444 invoked by alias); 4 Feb 2006 15:33:31 -0000 Received: (qmail 25434 invoked by uid 22791); 4 Feb 2006 15:33:31 -0000 X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO sibelius.xs4all.nl) (82.92.89.47) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 04 Feb 2006 15:33:30 +0000 Received: from elgar.sibelius.xs4all.nl (root@elgar.sibelius.xs4all.nl [192.168.0.2]) by sibelius.xs4all.nl (8.13.4/8.13.4) with ESMTP id k14FWpcr032605; Sat, 4 Feb 2006 16:32:51 +0100 (CET) Received: from elgar.sibelius.xs4all.nl (kettenis@localhost.sibelius.xs4all.nl [127.0.0.1]) by elgar.sibelius.xs4all.nl (8.13.4/8.13.3) with ESMTP id k14FWpp1005407; Sat, 4 Feb 2006 16:32:51 +0100 (CET) Received: (from kettenis@localhost) by elgar.sibelius.xs4all.nl (8.13.4/8.13.4/Submit) id k14FWpPo018123; Sat, 4 Feb 2006 16:32:51 +0100 (CET) Date: Sat, 04 Feb 2006 15:33:00 -0000 Message-Id: <200602041532.k14FWpPo018123@elgar.sibelius.xs4all.nl> From: Mark Kettenis To: eliz@gnu.org CC: gdb-patches@sourceware.org, jimb@red-bean.com In-reply-to: (message from Eli Zaretskii on Sat, 04 Feb 2006 12:24:31 +0200) Subject: Re: RFA: Support Windows extended error numbers in safe_strerror References: <20060203215455.GA3501@nevyn.them.org> <200602032325.k13NPJ6g028001@elgar.sibelius.xs4all.nl> <8f2776cb0602031706s55e09abfr4354becf8278921c@mail.gmail.com> <20060204030025.GA9890@nevyn.them.org> 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/msg00084.txt.bz2 > Date: Sat, 04 Feb 2006 12:24:31 +0200 > From: Eli Zaretskii > > > Date: Fri, 3 Feb 2006 22:00:25 -0500 > > From: Daniel Jacobowitz > > Cc: Mark Kettenis , gdb-patches@sourceware.org > > > > > If we had safe_strerror try a macro which the nm-*.h file could > > > define, I'd feel better about the change. > > > > Except we're trying to kill the aggravating NM files, remember? Also, > > it would be an XM file, and we've already successfully killed those (or > > most of them). We replaced them with autoconf magic, which is not > > fundamentally different from the USE_WIN32API bits. > > Right. > > But we still can separate system-specific code from system-independent > one. One way is to have a function which is only defined on systems > which need it. Something like this: > > #ifdef NEED_FOOBAR > foobar (); > #endif > > with the body of `foobar' hiding all the rest on a Windows-specific > source file. I think such a method minimizes the bad impact of > ifdef's and does not annoy too much when one reads the sources. This is slightly better, but starts to get problematic if there are many places in the code where this is necessary. Mark