|
Message-ID: <20140719234533.GI17402@brightrain.aerifal.cx> Date: Sat, 19 Jul 2014 19:45:34 -0400 From: Rich Felker <dalias@...c.org> To: Glauber Costa <glommer@...udius-systems.com> Cc: musl@...ts.openwall.com Subject: Re: [PATCH] implement glibc's glob_pattern_p On Sun, Jul 20, 2014 at 03:17:27AM +0400, Glauber Costa wrote: > On Sun, Jul 20, 2014 at 12:11 AM, Rich Felker <dalias@...c.org> wrote: > > > On Thu, Jul 17, 2014 at 01:12:55PM +0400, Glauber Costa wrote: > > > Currently, glob is implemented but glob_pattern_p is not. This function > > > can trivially be implemented with existing glob machinery, since all it > > > does is to tell whether or not the string contains special symbols. This > > > is basically the same logic as is_literal, but with inverted return > > value. > > > > > > The value of the "quote" parameter should also be inverted, since the man > > > page states that when the quote parameter is *non*-zero, then backslashes > > > are ignored. is_literal ignores them when useesc is *zero*. > > > > I don't where this function would meet any of the criteria for > > exclusion, and so it looks like a candidate to add. Are there many > > programs that need it? What is the motivation for adding it? > > > > I found this missing symbol while running the rpm binary. I would not say > there are many programs using it. > It's the first time I hit it. Do you have any examples? I ask because, in general when adding non-standard extensions like this, there are two principles to check: 1. Criteria for exclusion: A. Does the interface have multiple incompatible historical versions where adding support for one would break software expecting the other? B. Does adding the interface force a more complex, less robust, or otherwise worse implementation of related standard functionality or otherwise have significant cost to support? 2. Criteria for inclusion: A. Are there existing programs using the interface? B. Is there a reason that adding the interface to libc is significantly better/easier than patching the programs to work without it? Like I said glob_pattern_p looks okay but I think we should have at least some documentation of programs using it as justification for adding it. Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.