This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [patch] use POSIX awk expression rather than GNU extension
- From: Jim Meyering <jim at meyering dot net>
- To: Ulrich Drepper <drepper at redhat dot com>
- Cc: Mike Frysinger <vapier at gentoo dot org>, libc-alpha at sourceware dot org
- Date: Fri, 28 Dec 2007 20:03:37 +0100
- Subject: Re: [patch] use POSIX awk expression rather than GNU extension
- References: <200712241424.39260.vapier@gentoo.org> <4771E551.6000104@redhat.com>
Ulrich Drepper <drepper@redhat.com> wrote:
> Mike Frysinger wrote:
>> attached patch makes this change.
>
> Why should this be necessary? Everything works as is. Such a patch
> could lead only lead to problems. Don't ever send unnecessary patches.
Mike's change looks like a useful and safe one.
Why not apply it? Otherwise, the existing non-POSIX regex syntax
causes glibc's build process to malfunction when using mawk or
a vendor awk from at least Solaris 10, OpenBSD 3.9, or FreeBSD 6:
(and it's probably the same for any awk not based on GNU regex)
solaris 10$ awk '/^u(|v)/'
awk: illegal primary in regular expression ^u(|v) at v)
source line number 1
context is
>>> /^u(|v)/ <<<
[Exit 2]
$ mawk '/^u(|v)/'
mawk: line 1: regular expression compile failed (missing operand)
^u(|v)
[Exit 2]
Besides, I find "(literal)?" slightly more readable than "(|literal)".
While *I* understand what you mean by "Don't ever send unnecessary
patches.", I find such comments unnecessary when directed towards a
regular contributor like Mike. I've been on the receiving end of such
feedback, and it can be quite discouraging. Most people are doing this
on a volunteer basis, after all.