make MKSH_DEFAULT_EXECSHELL (/bin/sh) configurable, for Android
This commit is contained in:
parent
c00f87bdb3
commit
52e9469a82
4
Build.sh
4
Build.sh
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.446 2010/03/14 11:58:29 tg Exp $'
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.447 2010/03/27 15:28:59 tg Exp $'
|
||||
#-
|
||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
# Thorsten Glaser <tg@mirbsd.org>
|
||||
@ -28,7 +28,7 @@ srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.446 2010/03/14 11:58:29 tg Exp $'
|
||||
# CPPFLAGS recognised: MKSH_ASSUME_UTF8 MKSH_BINSHREDUCED MKSH_CLS_STRING
|
||||
# MKSH_CONSERVATIVE_FDS MKSH_MIDNIGHTBSD01ASH_COMPAT
|
||||
# MKSH_NOPWNAM MKSH_NO_LIMITS MKSH_SMALL MKSH_S_NOVI
|
||||
# MKSH_UNEMPLOYED
|
||||
# MKSH_UNEMPLOYED MKSH_DEFAULT_EXECSHELL
|
||||
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
|
10
exec.c
10
exec.c
@ -1,7 +1,7 @@
|
||||
/* $OpenBSD: exec.c,v 1.49 2009/01/29 23:27:26 jaredy Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
* Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
* Thorsten Glaser <tg@mirbsd.org>
|
||||
*
|
||||
* Provided that these terms and disclaimer and all copyright notices
|
||||
@ -22,7 +22,11 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.72 2009/12/12 22:27:06 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.73 2010/03/27 15:29:00 tg Exp $");
|
||||
|
||||
#ifndef MKSH_DEFAULT_EXECSHELL
|
||||
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
||||
#endif
|
||||
|
||||
static int comexec(struct op *, struct tbl *volatile, const char **,
|
||||
int volatile, volatile int *);
|
||||
@ -711,7 +715,7 @@ scriptexec(struct op *tp, const char **ap)
|
||||
if (sh && *sh)
|
||||
sh = search(sh, path, X_OK, NULL);
|
||||
if (!sh || !*sh)
|
||||
sh = "/bin/sh";
|
||||
sh = MKSH_DEFAULT_EXECSHELL;
|
||||
|
||||
*tp->args-- = tp->str;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user