Re: Plain text matching with regex: RE_PLAIN

2010-09-14 Thread Bruno Haible
Hi Reuben, > > Why can't you instead add \ escaping to all existing regex meta-characters > > that occur in the string, at which point you get the same effect without a > > new flag? > > Because that is error-prone (in particular, I would have to take the > current syntax into account). Error-pr

Re: Internal regex.h is always used

2010-09-14 Thread Bruno Haible
Hi Reuben, > #include "regex.h" > uses the included regex.h, not the system one. Yes. > There are obvious potential problems with this: if the > ABI changes you could end up with a header that doesn't match the > linked code, and even without that you can end up thinking you have > features (e.

Re: Plain text matching with regex: RE_PLAIN

2010-09-14 Thread Reuben Thomas
On 15 September 2010 02:09, Eric Blake wrote: > On 09/14/2010 06:27 PM, Reuben Thomas wrote: >> >> The attached patch adds a new syntax flag, RE_PLAIN. > > Why can't you instead add \ escaping to all existing regex meta-characters > that occur in the string, at which point you get the same effect

Re: Plain text matching with regex: RE_PLAIN

2010-09-14 Thread Eric Blake
On 09/14/2010 06:27 PM, Reuben Thomas wrote: The attached patch adds a new syntax flag, RE_PLAIN. Why can't you instead add \ escaping to all existing regex meta-characters that occur in the string, at which point you get the same effect without a new flag? And while the addition of a new fl

Internal regex.h is always used

2010-09-14 Thread Reuben Thomas
Even when configure detects a working system regex, or --without-included-regex is used, #include "regex.h" (which is what gnulib tells you to use) uses the included regex.h, not the system one. There are obvious potential problems with this: if the ABI changes you could end up with a header that

Plain text matching with regex: RE_PLAIN

2010-09-14 Thread Reuben Thomas
With my "maintainer of GNU Zile" hat on, I was improving the searching code recently, and a thought struck me which has often struck me before: the code would be much simpler if I could do non-regex searches using the regex APIs. In particular, I had written (simple) text searching routines, and ha

Re: MinGW-w64 Compatibility

2010-09-14 Thread Bruno Haible
Hello, David Hoyt wrote: > A build using the latest from MinGW-w64 fails with a redefinition error b/c > it finds socklen_t in two places. Configure finds both winsock2.h and > ws2tcipip.h and when it finds winsock.h, it does a "typedef int socklen_t" > in gl/sys_socket.in.h but this is already de

[PATCH] test-rawmemchr: make more robust

2010-09-14 Thread Eric Blake
* modules/rawmemchr-tests (Files): Add zerosize-ptr.h, mmap-anon.m4. (Depends-on, configure.ac): Add needed prerequisites to use it. * modules/memchr-tests (Files, Depends-on, configure.ac): Likewise, to avoid implicit reliance on memchr module prereqs. * tests/test-memchr.c (main): Ensure proper m

Re: author names in .c files

2010-09-14 Thread Karl Berry
First, adding author names to files suggests that there is some ownership, in copyright terms, No, I have to strongly disagree here. The copyright lines (not to mention actual signed papers) are what count, not random commentary lines. new contributors tend to leave the existing aut

MinGW-w64 Compatibility

2010-09-14 Thread Hoyt, David
Hello, The guys in the gnutls project mentioned that I should forward this on to you. I don't know the structure or layout of gnulib, so I don't know how cleanly what I'm talking about applies to the project, so please take it in context of gnutls. Here was my message to the gnutls folks: A b

[PATCH] memchr: also detect Alpha bug

2010-09-14 Thread Eric Blake
http://sourceware.org/bugzilla/show_bug.cgi?id=12019 * m4/memchr.m4 (gl_FUNC_MEMCHR): Detect glibc 2.11.2 failure on Alpha. * doc/posix-functions/memchr.texi (memchr): Tweak wording. * tests/test-memchr.c (main): Enhance test. Reported by Nelson H. F. Beebe. Signed-off-by: Eric Blake --- Tested

Re: [PATCH] fts, getcwd, glob: audit for dirfd returning -1

2010-09-14 Thread Paul Eggert
On 09/14/10 07:36, Jim Meyering wrote: > Reverse the condition and put the single-stmt block first > (with no braces) if you'd prefer. I did that, and installed the patch. Thanks for catching the glitch.

Re: author names in .c files

2010-09-14 Thread Jim Meyering
Eric Blake wrote: > Ralf just pointed this out to me: > http://producingoss.com/en/producingoss.html#territoriality > > For an example of something that looks like territoriality, notice how > many tests/test-*.c files are attached to my name: > > $ git grep 'Eric Blake' tests |wc > 95 762

Re: strstr broken on alpha GNU/Linux

2010-09-14 Thread Eric Blake
On 09/08/2010 02:48 PM, Mike Frysinger wrote: On Wednesday, September 08, 2010 16:36:13 Eric Blake wrote: I received an off-list report of a test-strstr failure on m4 1.4.15: Linux xxx 2.6.34-gentoo-r1 #1 SMP Sun Aug 8 17:45:07 MDT 2010 alpha GNU/Linux gcc (Gentoo 4.4.3-r2 p1.2) 4.4.3 /bin/sh:

Re: author names in .c files

2010-09-14 Thread Dustin J. Mitchell
On Tue, Sep 14, 2010 at 6:03 AM, Bruno Haible wrote: > You should be able to feel reward by your name in a file that you wrote. I don't have any feelings one way or the other on the application of this principle to gnulib, but I thought I'd add two points to this particular question all the same.

Re: [PATCH] fts, getcwd, glob: audit for dirfd returning -1

2010-09-14 Thread Jim Meyering
Paul Eggert wrote: > I audited fts, getcwd, and glob for the possibility of dirfd returning > -1, and propose the following patch to fix all the problems I saw. > > * For fts, rewrite to avoid dirfd entirely. This is doable now that > the fdopendir replacement doesn't close its argument. The tr

Re: [PATCH] float: fix broken MirBSD header

2010-09-14 Thread Bruno Haible
Hi Eric, > * m4/float_h.m4 (gl_FLOAT_H): MirBSD copied OpenBSD's bug. > * doc/posix-headers/float.texi (float.h): Document it. This fix is perfect. Note that it exploits the fact that on MirBSD, both __OpenBSD__ and __MirBSD__ are defined [1]. > Honestly, sometimes I wonder how much standards-c

Re: author names in .c files

2010-09-14 Thread Bruno Haible
Hi Eric, > Ralf just pointed this out to me: > http://producingoss.com/en/producingoss.html#territoriality This view values "egalitarian spirit" and argues against written credits in files for contributors. My opinion is different. > Would anyone object if I removed most (if not all) 95 instance