[PATCH] shell: Disable fnmatch by default

Herbert Xu <[email protected]>
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
As fnmatch(3) is terribly slow with multi-byte strings, disable
it by default.

Signed-off-by: Herbert Xu <[email protected]>

diff --git a/configure.ac b/configure.ac
index 50effc0..338d5bd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,8 +37,8 @@ if test "$enable_static" = "yes"; then
 	export LDFLAGS="-static"
 fi
 
-AC_ARG_ENABLE(fnmatch, AS_HELP_STRING(--disable-fnmatch, \
-				      [Do not use fnmatch(3) from libc]))
+AC_ARG_ENABLE(fnmatch, AS_HELP_STRING(--enable-fnmatch, \
+				      [Use fnmatch(3) from libc]))
 AC_ARG_ENABLE(glob, AS_HELP_STRING(--enable-glob, [Use glob(3) from libc]))
 
 dnl Checks for libraries.
@@ -122,7 +122,7 @@ if test "$enable_test_workaround" = "yes"; then
 		[Define if your faccessat tells root all files are executable])
 fi
 
-if test "$enable_fnmatch" != no; then
+if test "$enable_fnmatch" = yes; then
 	use_fnmatch=
 	AC_CHECK_FUNCS(fnmatch, use_fnmatch=yes)
 fi
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.