Makefile: replace lowercase letters regex with POSIX character class
PATCH 1/1 Makefile: replace lowercase letters regex with POSIX character class
Latest glibc changed some rules of sorting and regexes, the usage likes "[a-z]" maybe not only stand for lowcase letters a..z in different locale. Similar issues include [A-Z], [0-9] and so on.
For example, in en_US.UTF-8 locale, [a-z] means aAbBcCdD...zZ, it stands for both of uppercase and lowercase. Currently this issue cause make install fails on system with new glibc.
So use POSIX character class to instead of [...] group, something likes [:lower:], [:upper:], [:alpha:], [:alnum:], etc... are common.
---
Hi,
I found that there're two lines in common/config:
export LANG=C
export LC_ALL=C
That can make sure that all cases can use [a-z], [A-Z], [0-9] ... as our expected. So we only need to fix this Makefile issue. Due to I only find this one issue, so I'd like to use [:lower:].
If you prefer set locale in Makefile, please tell me.
Thanks,
Zorro
tests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tests/Makefile +1 -1
@@ -5,7 +5,7 @@ TOPDIR = .. include $(TOPDIR)/include/builddefs -TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[a-z]*/))) +TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[[:lower:]]*/))) include $(BUILDRULES)
Signature · 1 line
2.14.4
Quoted 4 lines · Zorro Lang
Latest glibc changed some rules of sorting and regexes, the usage likes "[a-z]" maybe not only stand for lowcase letters a..z in different locale. Similar issues include [A-Z], [0-9] and so on.
Quoted 8 lines
For example, in en_US.UTF-8 locale, [a-z] means aAbBcCdD...zZ, it stands for both of uppercase and lowercase. Currently this issue cause
make installfails on system with new glibc.So use POSIX character class to instead of [...] group, something likes [:lower:], [:upper:], [:alpha:], [:alnum:], etc... are common.
Signed-off-by Zorro Lang <[email protected]>
This looks fine to me, thanks for the fix!
Eryu
Quoted 40 lines
---
Hi,
I found that there're two lines in common/config:
export LANG=C
export LC_ALL=CThat can make sure that all cases can use [a-z], [A-Z], [0-9] ... as our expected. So we only need to fix this
Makefileissue. Due to I only find this one issue, so I'd like to use [:lower:].If you prefer set locale in
Makefile, please tell me.Thanks,
Zorrotests/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tests/Makefile +1
-1@@ -5,7 +5,7 @@ TOPDIR = .. include $(TOPDIR)/include/builddefs -TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[a-z]*/))) +TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[[:lower:]]*/))) include $(BUILDRULES)Signature · 6 lines
2.14.4 -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html