sed uses proper BRE
authorCraig Small <csmall@users.sourceforge.net>
Mon, 11 Jun 2012 01:36:55 +0000 (11:36 +1000)
committerCraig Small <csmall@users.sourceforge.net>
Mon, 11 Jun 2012 01:36:55 +0000 (11:36 +1000)
Apparently even though [0-9]+ works most of the time, its not proper BRE
and doesn't work ALL of the time. Replacing this with [0-9][0-9]* makes
everyone happy.

Noticed by Rich from the busybox project and reported by John Spencer
of the same project.

ChangeLog
src/Makefile.am

index c12b2a80f985a328d6bc42717502e0db8dab969a..2be20300251a013ec561976fba927fd787d485e5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 Changes in 22.18
 ================
        * Added AC_CANONICAL_TARGET for target_os Debian #673485
+       * sed doesn't have [0-9]+ replace with [0-9][0-9]*
 
 Changes in 22.17
 ================
index 5768294a8ca0c5655f7cf9bc68329d63e8fbf61e..fdf886b62c2e7d51657b9d9d8e743b73871c295f 100644 (file)
@@ -57,7 +57,7 @@ signames.h: signames.c Makefile
                export LC_ALL=C ; \
                @CPP@ -dM $< |\
                tr -s '\t ' ' ' | sort -n -k 3 | sed \
-       's:#define SIG\([A-Z]\+[0-9]*\) \([0-9]\+\) *\(\|/\*.*\)$$:{\ \2,"\1" },:p;d' | \
+       's:#define SIG\([A-Z][A-Z]*[0-9]*\) \([0-9][0-9]*\) *\(\|/\*.*\)$$:{\ \2,"\1" },:p;d' | \
                  grep -v '[0-9][0-9][0-9]' >signames.h || \
                  { rm -f signames.h; exit 1; }
                grep '^{ 1,"HUP" },$$' signames.h >/dev/null || \