This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] use POSIX awk expression rather than GNU extension


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]