[patch #10282] port libtool to grep 3.8 and to POSIX

2022-09-19 Thread Paul Eggert
Follow-up Comment #3, patch #10282 (project libtool):

[comment #2 comment #2:]

> Did you test to see if the new pattern still works with `grep` < 3.8 by any
chance?
Yes, it works.

> Just to check my understanding here: the intention of `[[-]]L` is to escape
`"[-]L"` in M4, taking advantage of the old `grep "[-]-not-an-option";` trick
to force grep to recognize argument 1 as a pattern rather than a flag?
Yes, that's right.

> The one I didn't totally understand was removing the `@<:@` handler; mostly
because I don't remember the context off hand. 
Without the patch, a test is generated that runs a shell command like this:


grep '\]'


This usage of grep is not portable, since POSIX says that the regular
expression \] has undefined effect (unlike \[ which is well defined to match
an opening square bracket). A failure of the test does not mean that grep is
broken; it means libtool is broken. To fix libtool, we should remove the
incorrect test.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[patch #10282] port libtool to grep 3.8 and to POSIX

2022-09-19 Thread Alex Ameen
Follow-up Comment #2, patch #10282 (project libtool):

Thanks for the report and patch. 

Did you test to see if the new pattern still works with `grep` < 3.8 by any
chance?

Just to check my understanding here: the intention of `[[-]]L` is to escape
`"[-]L"` in M4, taking advantage of the old `grep "[-]-not-an-option";` trick
to force grep to recognize argument 1 as a pattern rather than a flag? This
one makes sense to me. 

The one I didn't totally understand was removing the `@<:@` handler; mostly
because I don't remember the context off hand. 




___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[patch #10275] link-order.at: fix tests with GNU grep 3.8

2022-09-19 Thread Paul Eggert
Follow-up Comment #1, patch #10275 (project libtool):

Oh, I see I independently reported the bug and proposed a more-complete patch
in patch #10202. Sorry about the duplication.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[patch #10282] port libtool to grep 3.8 and to POSIX

2022-09-19 Thread Paul Eggert
Follow-up Comment #1, patch #10282 (project libtool):

This patch partly duplicates patch #10275, but it is more complete as it fixes
more instances of the problem. Sorry I did not notice this earlier. I do not
know how to merge the patch requests.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[patch #10282] port libtool to grep 3.8 and to POSIX

2022-09-19 Thread Paul Eggert
URL:
  

 Summary: port libtool to grep 3.8 and to POSIX
 Project: GNU Libtool
   Submitter: eggert
   Submitted: Mon 19 Sep 2022 01:27:13 PM PDT
Category: None
Priority: 5 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any


___

Follow-up Comments:


---
Date: Mon 19 Sep 2022 01:27:13 PM PDT By: Paul Eggert 
GNU grep 3.8 warns about some regular expressions that POSIX says have
undefined effect, e.g., '\-'. Unfortunately Libtool uses regular expressions
of this form.

I'm attaching two proposed patches against libtool's current HEAD (commit
6132006b5fb6b95f31c30a972fbb829f93e1878b dated 2022-05-16). The first patch
should suffice to pacify GNU grep 3.8. The second patch fixes some other
regular expressions that GNU grep 3.8 does not warn about (I found them with
an even-pickier 'grep').

I did not look systematically for all portability bugs of this form.






___
File Attachments:


---
Date: Mon 19 Sep 2022 01:27:13 PM PDT  Name:
0001-libtool-port-to-GNU-grep-3.8.patch  Size: 5KiB   By: eggert
Patches to port libtool to GNU and POSIX grep

---
Date: Mon 19 Sep 2022 01:27:13 PM PDT  Name:
0002-libtool-port-better-to-POSIX-grep.patch  Size: 2KiB   By: eggert
Patches to port libtool to GNU and POSIX grep


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/