summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorDenys Vlasenko2016-12-21 04:13:23 +0100
committerDenys Vlasenko2016-12-21 04:13:23 +0100
commit3a4cdf45f928de0af09088bbbb96f60d9ac44e87 (patch)
tree0c387f253ef83214d075cd25b8f359f99d07201a /shell/ash.c
parentb5b1d2c5a8909ae245b59bec21bba0bf2a4bf80c (diff)
downloadbusybox-3a4cdf45f928de0af09088bbbb96f60d9ac44e87.zip
busybox-3a4cdf45f928de0af09088bbbb96f60d9ac44e87.tar.gz
ash: error out if ASH_INTERNAL_GLOB is not selected on uClibc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 8d8cc46..7d45b2c 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -51,6 +51,14 @@
# define ENABLE_ASH_INTERNAL_GLOB 1
#endif
+#if !ENABLE_ASH_INTERNAL_GLOB && defined(__UCLIBC__)
+# error uClibc glob() is buggy, use ASH_INTERNAL_GLOB.
+# error The bug is: for "$PWD"/<pattern> ash will escape e.g. dashes in "$PWD"
+# error with backslash, even ones which do not need to be: "/a-b" -> "/a\-b"
+# error glob() should unbackslash them and match. uClibc does not unbackslash,
+# error fails to match dirname, subsequently not expanding <pattern> in it.
+#endif
+
#if !ENABLE_ASH_INTERNAL_GLOB
# include <glob.h>
#endif