aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 798d15a4c..34f70ecfc 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -43,8 +43,6 @@
43#endif 43#endif
44 44
45#include "busybox.h" /* for applet_names */ 45#include "busybox.h" /* for applet_names */
46//TODO: pull in some .h and find out do we have SINGLE_APPLET_MAIN?
47//#include "applet_tables.h" doesn't work
48#include <paths.h> 46#include <paths.h>
49#include <setjmp.h> 47#include <setjmp.h>
50#include <fnmatch.h> 48#include <fnmatch.h>
@@ -58,12 +56,15 @@
58# define CLEAR_RANDOM_T(rnd) ((void)0) 56# define CLEAR_RANDOM_T(rnd) ((void)0)
59#endif 57#endif
60 58
61#if defined SINGLE_APPLET_MAIN 59#define SKIP_definitions 1
60#include "applet_tables.h"
61#undef SKIP_definitions
62#if NUM_APPLETS == 1
62/* STANDALONE does not make sense, and won't compile */ 63/* STANDALONE does not make sense, and won't compile */
63# undef CONFIG_FEATURE_SH_STANDALONE 64# undef CONFIG_FEATURE_SH_STANDALONE
64# undef ENABLE_FEATURE_SH_STANDALONE 65# undef ENABLE_FEATURE_SH_STANDALONE
65# undef IF_FEATURE_SH_STANDALONE 66# undef IF_FEATURE_SH_STANDALONE
66# undef IF_NOT_FEATURE_SH_STANDALONE(...) 67# undef IF_NOT_FEATURE_SH_STANDALONE
67# define ENABLE_FEATURE_SH_STANDALONE 0 68# define ENABLE_FEATURE_SH_STANDALONE 0
68# define IF_FEATURE_SH_STANDALONE(...) 69# define IF_FEATURE_SH_STANDALONE(...)
69# define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__ 70# define IF_NOT_FEATURE_SH_STANDALONE(...) __VA_ARGS__
@@ -4539,7 +4540,7 @@ forkchild(struct job *jp, union node *n, int mode)
4539 if (mode == FORK_NOJOB /* is it `xxx` ? */ 4540 if (mode == FORK_NOJOB /* is it `xxx` ? */
4540 && n && n->type == NCMD /* is it single cmd? */ 4541 && n && n->type == NCMD /* is it single cmd? */
4541 /* && n->ncmd.args->type == NARG - always true? */ 4542 /* && n->ncmd.args->type == NARG - always true? */
4542 && strcmp(n->ncmd.args->narg.text, "trap") == 0 4543 && n->ncmd.args && strcmp(n->ncmd.args->narg.text, "trap") == 0
4543 && n->ncmd.args->narg.next == NULL /* "trap" with no arguments */ 4544 && n->ncmd.args->narg.next == NULL /* "trap" with no arguments */
4544 /* && n->ncmd.args->narg.backquote == NULL - do we need to check this? */ 4545 /* && n->ncmd.args->narg.backquote == NULL - do we need to check this? */
4545 ) { 4546 ) {
@@ -4627,7 +4628,7 @@ forkchild(struct job *jp, union node *n, int mode)
4627 } 4628 }
4628#if JOBS 4629#if JOBS
4629 if (n && n->type == NCMD 4630 if (n && n->type == NCMD
4630 && strcmp(n->ncmd.args->narg.text, "jobs") == 0 4631 && n->ncmd.args && strcmp(n->ncmd.args->narg.text, "jobs") == 0
4631 ) { 4632 ) {
4632 TRACE(("Job hack\n")); 4633 TRACE(("Job hack\n"));
4633 /* "jobs": we do not want to clear job list for it, 4634 /* "jobs": we do not want to clear job list for it,