summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2001-03-14 00:49:52 +0000
committerEric Andersen <andersen@codepoet.org>2001-03-14 00:49:52 +0000
commit4e7244e6b2b8b941f6d2b03d2ca9cc2afbb5258e (patch)
tree6cbf0123fc92c2552e8e1e36e3e2e2e3a2fe5840
parent8658816f719047fc723639e9f0a13352367dcf48 (diff)
libc5 glob is pretty stupid and doesn't do GLOB_BRACE or GLOB_TILDE
-Erik
-rw-r--r--lash.c9
-rw-r--r--sh.c9
-rw-r--r--shell/lash.c9
3 files changed, 24 insertions, 3 deletions
diff --git a/lash.c b/lash.c
index dcec14aba..3c52e2a28 100644
--- a/lash.c
+++ b/lash.c
@@ -1010,7 +1010,14 @@ static int expand_arguments(char *command)
* (char*) into cmd (char**, one word per string) */
{
- int flags = GLOB_NOCHECK|GLOB_BRACE|GLOB_TILDE;
+ int flags = GLOB_NOCHECK
+#ifdef GLOB_BRACE
+ | GLOB_BRACE
+#endif
+#ifdef GLOB_TILDE
+ | GLOB_TILDE
+#endif
+ ;
char *tmpcmd, *cmd, *cmd_copy;
/* We need a clean copy, so strsep can mess up the copy while
* we write stuff into the original (in a minute) */
diff --git a/sh.c b/sh.c
index dcec14aba..3c52e2a28 100644
--- a/sh.c
+++ b/sh.c
@@ -1010,7 +1010,14 @@ static int expand_arguments(char *command)
* (char*) into cmd (char**, one word per string) */
{
- int flags = GLOB_NOCHECK|GLOB_BRACE|GLOB_TILDE;
+ int flags = GLOB_NOCHECK
+#ifdef GLOB_BRACE
+ | GLOB_BRACE
+#endif
+#ifdef GLOB_TILDE
+ | GLOB_TILDE
+#endif
+ ;
char *tmpcmd, *cmd, *cmd_copy;
/* We need a clean copy, so strsep can mess up the copy while
* we write stuff into the original (in a minute) */
diff --git a/shell/lash.c b/shell/lash.c
index dcec14aba..3c52e2a28 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -1010,7 +1010,14 @@ static int expand_arguments(char *command)
* (char*) into cmd (char**, one word per string) */
{
- int flags = GLOB_NOCHECK|GLOB_BRACE|GLOB_TILDE;
+ int flags = GLOB_NOCHECK
+#ifdef GLOB_BRACE
+ | GLOB_BRACE
+#endif
+#ifdef GLOB_TILDE
+ | GLOB_TILDE
+#endif
+ ;
char *tmpcmd, *cmd, *cmd_copy;
/* We need a clean copy, so strsep can mess up the copy while
* we write stuff into the original (in a minute) */