[PATCH] configure.ac: Avoid empty subexpression in grep
Mike Frysinger
vapier@gentoo.org
Sun Mar 12 01:53:00 GMT 2017
On 09 Mar 2017 13:50, Paul Eggert wrote:
> On 03/09/2017 08:12 AM, Alexey Neyman wrote:
> > - if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then
> > + if $READELF -S conftest.so | grep '\.\(rel\|rela\)\.dyn' > /dev/null; then
>
> Neither the old nor the new code is portable, as POSIX does not require
> support for '\|'. Instead, how about something like this?
>
> if $READELF -S conftest.so | grep -F -e '.rel.dyn' -e '.rela.dyn' >
> /dev/null; then
why not just use an ERE then ?
if $READELF -S conftest.so | grep -E '\.rela?\.dyn' >/dev/null; then
it's not clear what standard glibc is attempting to adhere to, but it
seems like we should just permit whatever is in POSIX. i.e. replace
all the /dev/null redirects with a -q flag.
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: Digital signature
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20170312/9746654a/attachment.sig>
More information about the Libc-alpha
mailing list