summaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2012-04-03 11:26:11 +0100
committerRon Yorston <rmy@pobox.com>2012-04-03 11:26:11 +0100
commitb542b6651ac0cb2332693596382080925d924a53 (patch)
tree121d00c6aade96746be3768f2c2d4ad8e24a4cbb /shell/ash.c
parentb02302fedd1f8320d89c5d794622bef050f6e54c (diff)
downloadbusybox-w32-b542b6651ac0cb2332693596382080925d924a53.tar.gz
busybox-w32-b542b6651ac0cb2332693596382080925d924a53.tar.bz2
busybox-w32-b542b6651ac0cb2332693596382080925d924a53.zip
ash: some fixes so busybox-w32 (almost) compiles on POSIX
Diffstat (limited to '')
-rw-r--r--shell/ash.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/shell/ash.c b/shell/ash.c
index f8fc668c8..68d39c1f3 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -85,6 +85,10 @@
85# define PIPE_BUF 4096 /* amount of buffering in a pipe */ 85# define PIPE_BUF 4096 /* amount of buffering in a pipe */
86#endif 86#endif
87 87
88#if !ENABLE_PLATFORM_MINGW32
89# define is_absolute_path(path) ((path)[0] == '/')
90#endif
91
88#if !BB_MMU 92#if !BB_MMU
89# error "Do not even bother, ash will not run on NOMMU machine" 93# error "Do not even bother, ash will not run on NOMMU machine"
90#endif 94#endif
@@ -9036,7 +9040,7 @@ forkshell_evalsubshell(struct forkshell *fs)
9036static void 9040static void
9037evalsubshell(union node *n, int flags) 9041evalsubshell(union node *n, int flags)
9038{ 9042{
9039 IF_PLATFORM_MINGW32(struct forkshell fs); 9043 IF_PLATFORM_MINGW32(struct forkshell fs;)
9040 struct job *jp; 9044 struct job *jp;
9041 int backgnd = (n->type == NBACKGND); 9045 int backgnd = (n->type == NBACKGND);
9042 int status; 9046 int status;
@@ -9158,7 +9162,7 @@ forkshell_evalpipe(struct forkshell *fs)
9158static void 9162static void
9159evalpipe(union node *n, int flags) 9163evalpipe(union node *n, int flags)
9160{ 9164{
9161 IF_PLATFORM_MINGW32(struct forkshell fs); 9165 IF_PLATFORM_MINGW32(struct forkshell fs;)
9162 struct job *jp; 9166 struct job *jp;
9163 struct nodelist *lp; 9167 struct nodelist *lp;
9164 int pipelen; 9168 int pipelen;
@@ -12821,7 +12825,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path)
12821 struct stat statb; 12825 struct stat statb;
12822 int e; 12826 int e;
12823 int updatetbl; 12827 int updatetbl;
12824 IF_PLATFORM_MINGW32(int len); 12828 IF_PLATFORM_MINGW32(int len;)
12825 struct builtincmd *bcmd; 12829 struct builtincmd *bcmd;
12826 12830
12827 /* If name contains a slash, don't use PATH or hash table */ 12831 /* If name contains a slash, don't use PATH or hash table */
@@ -13860,6 +13864,7 @@ int ash_main(int argc UNUSED_PARAM, char **argv)
13860 /* NOTREACHED */ 13864 /* NOTREACHED */
13861} 13865}
13862 13866
13867#if ENABLE_PLATFORM_MINGW32
13863/* FIXME: should consider running forkparent() and forkchild() */ 13868/* FIXME: should consider running forkparent() and forkchild() */
13864static int 13869static int
13865spawn_forkshell(struct job *jp, struct forkshell *fs, int mode) 13870spawn_forkshell(struct job *jp, struct forkshell *fs, int mode)
@@ -14378,6 +14383,7 @@ sticky_free(void *base)
14378 return; 14383 return;
14379 free(base); 14384 free(base);
14380} 14385}
14386#endif
14381 14387
14382/*- 14388/*-
14383 * Copyright (c) 1989, 1991, 1993, 1994 14389 * Copyright (c) 1989, 1991, 1993, 1994