[Mesa-dev] [PATCH] configure.ac: Use POSIX word boundary regex.
Jan Beich
jbeich at freebsd.org
Fri Mar 17 00:16:29 UTC 2017
Vinson Lee <vlee at freedesktop.org> writes:
> - # Use \> (marks the end of the word)
> + # Use [[:>:]] (marks the end of the word)
[[:>:]] is "an extension, compatible with but not specified by POSIX 1003.2".
GNU libc doesn't support it.
$ echo 'foot foo bar' | sed -E 's/foo[[:>:]]//g'
sed: -e expression #1, char 15: Invalid character class name
$ sed --version | sed 1q
sed (GNU sed) 4.4
$ ldd --version
ldd (Debian GLIBC 2.24-9) 2.24
> echo " `$1`" | sed -E \
> -e 's/[[[:space:]]]+-m[[^[:space:]]]*//g' \
> - -e 's/[[[:space:]]]+-DNDEBUG\>//g' \
> + -e 's/[[[:space:]]]+-DNDEBUG[[[:>:]]]//g' \
Try matching some whitespace after the word as a workaround e.g.,
-e 's/[[[:space:]]]+-DNDEBUG($|[[[:space:]]])/\1/g'
More information about the mesa-dev
mailing list