From owner-cvs-src@FreeBSD.ORG Wed Dec 17 19:35:02 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 19EA016A4CE; Wed, 17 Dec 2003 19:35:02 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9EACA43D36; Wed, 17 Dec 2003 19:34:59 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from gamplex.bde.org (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3p2/8.8.7) with ESMTP id OAA08317; Thu, 18 Dec 2003 14:34:53 +1100 Date: Thu, 18 Dec 2003 14:34:51 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Nate Lawson In-Reply-To: <20031216234451.B68813@root.org> Message-ID: <20031218141559.L18573@gamplex.bde.org> References: <20031217025442.D3EA816A54F@hub.freebsd.org> <20031216234451.B68813@root.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: "Jordan K. Hubbard" cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org cc: cvs-src@FreeBSD.org Subject: Re: cvs commit: src/include fnmatch.h X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Dec 2003 03:35:02 -0000 On Tue, 16 Dec 2003, Nate Lawson wrote: > On Tue, 16 Dec 2003, Jordan K. Hubbard wrote: > > FreeBSD src repository > > > > Modified files: > > include fnmatch.h > > Log: > > Conformance: Define FNM_NOSYS (see http://www.opengroup.org/onlinepubs/007904975/basedefs/fnmatch.h.html) > > > > Revision Changes Path > > 1.12 +2 -0 src/include/fnmatch.h > > > > Index: src/include/fnmatch.h > > diff -u src/include/fnmatch.h:1.11 src/include/fnmatch.h:1.12 > > --- src/include/fnmatch.h:1.11 Tue Sep 17 15:25:40 2002 > > +++ src/include/fnmatch.h Tue Dec 16 18:54:29 2003 > > @@ -44,6 +44,8 @@ > > #define FNM_NOESCAPE 0x01 /* Disable backslash escaping. */ > > #define FNM_PATHNAME 0x02 /* Slash must be matched by slash. */ > > #define FNM_PERIOD 0x04 /* Period must be matched by period. */ > > + > > +#define FNM_NOSYS -1 /* Reserved */ > > > > #if __BSD_VISIBLE > > #define FNM_LEADING_DIR 0x08 /* Ignore / after Imatch. */ > > Lack of tabs? There are some other bugs in this commit. In order of importance: - namespace pollution. The new macro is an XSI mistak^Wextension in POSIX. It should be under an _XSI_VISIBLE ifdef like most other XSI extensions. - missing parentheses around macro. While there may be no conforming uses of the macro where this matters, it is routine header engineering to fully parenthesize macros. The corresponding parentheses are not missing for the EOF macro in , though using EOF in contexts where the parentheses make a difference would be almost as weird as using FNM_NOSYS in such contexts. - new macro in a section all by itself. In POSIX it is together with the other macros but it is marked up as being an obsolescent XSI extension. This won't be a bug when the namespace pollution is fixed -- the ifdef will naturally create a separate section. - missing "." in the comment, unlike in the comments on all the other FNM_* macros. Bruce