From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26530 invoked by alias); 5 Sep 2009 16:12:13 -0000 Received: (qmail 26520 invoked by uid 22791); 5 Sep 2009 16:12:12 -0000 X-SWARE-Spam-Status: No, hits=-1.6 required=5.0 tests=AWL,BAYES_00,SPF_SOFTFAIL X-Spam-Check-By: sourceware.org Received: from mtaout7.012.net.il (HELO mtaout7.012.net.il) (84.95.2.19) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 05 Sep 2009 16:12:06 +0000 Received: from conversion-daemon.i-mtaout7.012.net.il by i-mtaout7.012.net.il (HyperSendmail v2007.08) id <0KPI00E00A4CKD00@i-mtaout7.012.net.il> for gdb-patches@sourceware.org; Sat, 05 Sep 2009 19:11:29 +0300 (IDT) Received: from HOME-C4E4A596F7 ([84.228.50.163]) by i-mtaout7.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KPI00LD9AB437A0@i-mtaout7.012.net.il>; Sat, 05 Sep 2009 19:11:29 +0300 (IDT) Date: Sat, 05 Sep 2009 16:12:00 -0000 From: Eli Zaretskii Subject: Re: Build question In-reply-to: <1252143311.6106.252.camel@pavilion> To: danny.backx@scarlet.be Cc: gdb-patches@sourceware.org Reply-to: Eli Zaretskii Message-id: <83eiql4blw.fsf@gnu.org> References: <1250803105.11282.96.camel@pavilion> <83d46pgjkq.fsf@gnu.org> <1250877901.11282.116.camel@pavilion> <83ab1tgh9h.fsf@gnu.org> <1250880746.11282.128.camel@pavilion> <1250931899.11282.142.camel@pavilion> <83skfkfa4n.fsf@gnu.org> <1251095160.16357.352.camel@pavilion> <1251828295.6106.119.camel@pavilion> <83zl9e8nro.fsf@gnu.org> <1251835928.6106.124.camel@pavilion> <83vdk281xb.fsf@gnu.org> <1252143311.6106.252.camel@pavilion> X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2009-09/txt/msg00123.txt.bz2 > From: Danny Backx > Cc: gdb@sourceware.org > Date: Sat, 05 Sep 2009 11:35:11 +0200 Patches should be sent to gdb-patches@ (redirected). > ESR said "early and often", right ? Here is a first draft of my work. > Showing this early allows you to steer me in the right direction. Thanks. > Otherwise, this code appears to work for me. I hardcoded the variable in > gdb/main.c, set this to both 0 and 1 for testing, and saw the expected > results. Later we should probably have a user option to control that. > Should I copy code that handles a variable like "solib-search-path" or > "annotate" to set the _have_dos_based_file_system at runtime ? Yes, IMO. > +/* Filesystem type */ > +int _have_dos_based_file_system = 1; I don't like its starting with an underline. This is a normal variable, no need to pretend it's internal or something. > + if (_have_dos_based_file_system) { Please use the GNU style of brace-placing. > + } else { Ditto. > +/* > + * Defined in gdb/main.c > + * > + * This determines whether we have > + * as a separator : / or \ > + * a prefix [a-z]: or not > + * Replaces HAVE_DOS_BASED_FILE_SYSTEM and FILENAME_PREFIX_LEN. > + * > + * Case sensitive/insensitive file name comparison is *not* influenced by this. > + */ This is not the GNU style of comments. > +static inline int _isalpha(int c) > +{ > + if (c <= 'Z' && c >= 'A') > + return TRUE; > + if (c <= 'z' && c >= 'a') > + return TRUE; > + return FALSE; > +} I'm not sure what The Powers That Be think about defining inline functions in a header. In general, if a host does not support the `inline' keyword, it will be defined away, so you get several identically-named functions in the same program (although I think `static' prevents them from causing a link error).