From owner-svn-src-all@FreeBSD.ORG Fri Mar 6 06:14:44 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F3A61065670; Fri, 6 Mar 2009 06:14:44 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4D9C38FC0C; Fri, 6 Mar 2009 06:14:44 +0000 (UTC) (envelope-from kientzle@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n266EiRG010359; Fri, 6 Mar 2009 06:14:44 GMT (envelope-from kientzle@svn.freebsd.org) Received: (from kientzle@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n266EiSD010358; Fri, 6 Mar 2009 06:14:44 GMT (envelope-from kientzle@svn.freebsd.org) Message-Id: <200903060614.n266EiSD010358@svn.freebsd.org> From: Tim Kientzle Date: Fri, 6 Mar 2009 06:14:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r189440 - head/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Mar 2009 06:14:44 -0000 Author: kientzle Date: Fri Mar 6 06:14:44 2009 New Revision: 189440 URL: http://svn.freebsd.org/changeset/base/189440 Log: Merge r668 from libarchive.googlecode.com: Style correction to the 'ar' reader: Don't redefine 'isdigit' and don't create a macro that's only used once. Modified: head/lib/libarchive/archive_read_support_format_ar.c Modified: head/lib/libarchive/archive_read_support_format_ar.c ============================================================================== --- head/lib/libarchive/archive_read_support_format_ar.c Fri Mar 6 06:13:25 2009 (r189439) +++ head/lib/libarchive/archive_read_support_format_ar.c Fri Mar 6 06:14:44 2009 (r189440) @@ -72,8 +72,6 @@ struct ar { #define AR_fmag_offset 58 #define AR_fmag_size 2 -#define isdigit(x) (x) >= '0' && (x) <= '9' - static int archive_read_format_ar_bid(struct archive_read *a); static int archive_read_format_ar_cleanup(struct archive_read *a); static int archive_read_format_ar_read_data(struct archive_read *a, @@ -309,8 +307,10 @@ archive_read_format_ar_read_header(struc /* * GNU variant handles long filenames by storing / * to indicate a name stored in the filename table. + * XXX TODO: Verify that it's all digits... Don't be fooled + * by "/9xyz" XXX */ - if (filename[0] == '/' && isdigit(filename[1])) { + if (filename[0] == '/' && filename[1] >= '0' && filename[1] <= '9') { number = ar_atol10(h + AR_name_offset + 1, AR_name_size - 1); /* * If we can't look up the real name, warn and return