diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2016-12-21 06:13:23 +0300 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2017-01-01 15:01:04 +0300 |
commit | 18a7bee73670af792d25dac1835e75eeeef0a08e (patch) | |
tree | 2aae08a920348fc6bd73a637aee874b6077eed01 | |
parent | dc3701d2e7d847536814b939022f024ca16cbad6 (diff) |
ash: error out if ASH_INTERNAL_GLOB is not selected on uClibc
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | shell/ash.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index 8d8cc466b..7d45b2cd2 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 |