From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4029 invoked by alias); 5 Jan 2008 14:19:36 -0000 Received: (qmail 4013 invoked by uid 22791); 5 Jan 2008 14:19:36 -0000 X-Spam-Check-By: sourceware.org Received: from heller.inter.net.il (HELO heller.inter.net.il) (213.8.233.23) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 05 Jan 2008 14:19:13 +0000 Received: from HOME-C4E4A596F7 (IGLD-80-230-71-78.inter.net.il [80.230.71.78]) by heller.inter.net.il (MOS 3.7.3a-GA) with ESMTP id EOF82376 (AUTH halo1); Sat, 5 Jan 2008 16:18:52 +0200 (IST) Date: Sat, 05 Jan 2008 14:19:00 -0000 Message-Id: From: Eli Zaretskii To: Aleksandar Ristovski CC: gdb-patches@sourceware.org, drow@false.org, brobecker@adacore.com, RMansfield@qnx.com In-reply-to: <2F6320727174C448A52CEB63D85D11F40A4B@nova.ott.qnx.com> (message from Aleksandar Ristovski on Fri, 4 Jan 2008 14:02:30 -0500) Subject: Re: [patch] IS_ABSOLUTE_PATH to handle both DOS and POSIX path styles Reply-to: Eli Zaretskii References: <2F6320727174C448A52CEB63D85D11F40A4B@nova.ott.qnx.com> 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: 2008-01/txt/msg00079.txt.bz2 > From: Aleksandar Ristovski > Cc: Daniel Jacobowitz , Joel Brobecker , Ryan Mansfield > Date: Fri, 4 Jan 2008 14:02:30 -0500 > > +#define IS_DIR_SEPARATOR_X(c) ((c) == '/') > +#define IS_ABSOLUTE_PATH_X(c) (IS_DIR_SEPARATOR_X((f)[0])) I think _X is not appropriate here. How about _POSIX? > + > +/* Universal macros, to be used on paths that could be either > + POSIX or DOS. */ What would be the use of these _ANY predicates? We always run on a platform that is either DOS or Posix, but never both, right? A minor nit: your ChangeLog entry 2008-01-04 Aleksandar Ristovski * filenames.h (IS_DIR_SEPARATOR_DOS): New macro. (IS_ABSOLUTE_PATH_DOS): New macro. (IS_DIR_SEPARATOR_X): New macro. (IS_ABSOLUTE_PATH_X): New macro. (IS_DIR_SEPARATOR_ANY): New macro. (IS_ABSOLUTE_PATH_ANY): New macro. has two problems: . It uses leading spaces instead of a single TAB (maybe due to your mailer's munging of whitespace). . You could rewrite it as a much more compact single entry: 2008-01-04 Aleksandar Ristovski * filenames.h (IS_DIR_SEPARATOR_DOS, IS_ABSOLUTE_PATH_DOS) (IS_DIR_SEPARATOR_X, IS_ABSOLUTE_PATH_X, IS_DIR_SEPARATOR_ANY) (IS_ABSOLUTE_PATH_ANY): New macros.