From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14225 invoked by alias); 4 Feb 2006 10:24:29 -0000 Received: (qmail 14215 invoked by uid 22791); 4 Feb 2006 10:24:28 -0000 X-Spam-Check-By: sourceware.org Received: from gandalf.inter.net.il (HELO gandalf.inter.net.il) (192.114.186.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 04 Feb 2006 10:24:28 +0000 Received: from nitzan.inter.net.il (nitzan.inter.net.il [192.114.186.20]) by gandalf.inter.net.il (MOS 3.7.1-GA) with ESMTP id HTS01049; Sat, 4 Feb 2006 12:24:25 +0200 (IST) Received: from HOME-C4E4A596F7 (IGLD-83-130-205-46.inter.net.il [83.130.205.46]) by nitzan.inter.net.il (MOS 3.7.3-GA) with ESMTP id CPY32677 (AUTH halo1); Sat, 4 Feb 2006 12:24:24 +0200 (IST) Date: Sat, 04 Feb 2006 10:24:00 -0000 Message-Id: From: Eli Zaretskii To: gdb-patches@sourceware.org CC: jimb@red-bean.com In-reply-to: <20060204030025.GA9890@nevyn.them.org> (message from Daniel Jacobowitz on Fri, 3 Feb 2006 22:00:25 -0500) Subject: Re: RFA: Support Windows extended error numbers in safe_strerror Reply-to: Eli Zaretskii References: <20060203215455.GA3501@nevyn.them.org> <200602032325.k13NPJ6g028001@elgar.sibelius.xs4all.nl> <8f2776cb0602031706s55e09abfr4354becf8278921c@mail.gmail.com> <20060204030025.GA9890@nevyn.them.org> 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/msg00061.txt.bz2 > 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.