diff options
author | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-03-09 00:42:46 +0000 |
---|---|---|
committer | andersen <andersen@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2001-03-09 00:42:46 +0000 |
commit | d990108a7ab7bd9c647892813c34ee04c57655bc (patch) | |
tree | 656b778ba72ca18571d8d215afc669a1c39cd3e0 /sh.c | |
parent | 14e34e69cb0a5908c425c73aa7df5c75f99ec39b (diff) | |
download | busybox-w32-d990108a7ab7bd9c647892813c34ee04c57655bc.tar.gz busybox-w32-d990108a7ab7bd9c647892813c34ee04c57655bc.tar.bz2 busybox-w32-d990108a7ab7bd9c647892813c34ee04c57655bc.zip |
Cleanup patch from Larry
git-svn-id: svn://busybox.net/trunk/busybox@2016 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'sh.c')
-rw-r--r-- | sh.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -61,6 +61,9 @@ | |||
61 | #include <unistd.h> | 61 | #include <unistd.h> |
62 | #include <getopt.h> | 62 | #include <getopt.h> |
63 | 63 | ||
64 | #undef __GLIBC__ | ||
65 | #undef __UCLIBC__ | ||
66 | |||
64 | #if ( (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) ) || defined (__UCLIBC__) | 67 | #if ( (__GLIBC__ >= 2) && (__GLIBC_MINOR__ >= 1) ) || defined (__UCLIBC__) |
65 | #include <wordexp.h> | 68 | #include <wordexp.h> |
66 | #define expand_t wordexp_t | 69 | #define expand_t wordexp_t |
@@ -983,7 +986,7 @@ static int expand_arguments(char *command) | |||
983 | error_msg("out of space during expansion"); | 986 | error_msg("out of space during expansion"); |
984 | return FALSE; | 987 | return FALSE; |
985 | } | 988 | } |
986 | if (retval == GLOB_ABORTED || retval == GLOB_NOSYS) { | 989 | if (retval != 0 && retval != GLOB_NOMATCH) { |
987 | /* Some other error. */ | 990 | /* Some other error. */ |
988 | error_msg("syntax error"); | 991 | error_msg("syntax error"); |
989 | return FALSE; | 992 | return FALSE; |
@@ -1722,9 +1725,9 @@ static int busy_loop(FILE * input) | |||
1722 | 1725 | ||
1723 | #ifdef BB_FEATURE_SH_ENVIRONMENT | 1726 | #ifdef BB_FEATURE_SH_ENVIRONMENT |
1724 | last_return_code=WEXITSTATUS(status); | 1727 | last_return_code=WEXITSTATUS(status); |
1725 | #endif | ||
1726 | debug_printf("'%s' exited -- return code %d\n", | 1728 | debug_printf("'%s' exited -- return code %d\n", |
1727 | job_list.fg->text, last_return_code); | 1729 | job_list.fg->text, last_return_code); |
1730 | #endif | ||
1728 | if (!job_list.fg->running_progs) { | 1731 | if (!job_list.fg->running_progs) { |
1729 | /* child exited */ | 1732 | /* child exited */ |
1730 | remove_job(&job_list, job_list.fg); | 1733 | remove_job(&job_list, job_list.fg); |