introduce MKSH_DISABLE_EXPERIMENTAL and wrap the new feature introduced
in cid 1005084678C510CF7E4 in it
This commit is contained in:
parent
c7419d9e6a
commit
574c024635
5
Build.sh
5
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.587 2012/10/21 17:38:21 tg Exp $'
|
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.588 2012/10/22 16:53:20 tg Exp $'
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
# 2011, 2012
|
# 2011, 2012
|
||||||
@ -1492,7 +1492,7 @@ else
|
|||||||
#define EXTERN
|
#define EXTERN
|
||||||
#define MKSH_INCLUDES_ONLY
|
#define MKSH_INCLUDES_ONLY
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.587 2012/10/21 17:38:21 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.588 2012/10/22 16:53:20 tg Exp $");
|
||||||
int main(void) { printf("Hello, World!\n"); return (0); }
|
int main(void) { printf("Hello, World!\n"); return (0); }
|
||||||
EOF
|
EOF
|
||||||
case $cm in
|
case $cm in
|
||||||
@ -2300,6 +2300,7 @@ MKSH_DEFAULT_EXECSHELL "/bin/sh" (do not change)
|
|||||||
MKSH_DEFAULT_PROFILEDIR "/etc" (do not change)
|
MKSH_DEFAULT_PROFILEDIR "/etc" (do not change)
|
||||||
MKSH_DEFAULT_TMPDIR "/tmp" (do not change)
|
MKSH_DEFAULT_TMPDIR "/tmp" (do not change)
|
||||||
MKSH_DISABLE_DEPRECATED disable code paths scheduled for later removal
|
MKSH_DISABLE_DEPRECATED disable code paths scheduled for later removal
|
||||||
|
MKSH_DISABLE_EXPERIMENTAL disable code not yet comfy for (LTS) snapshots
|
||||||
MKSH_DISABLE_TTY_WARNING shut up warning about ctty if OS cant be fixed
|
MKSH_DISABLE_TTY_WARNING shut up warning about ctty if OS cant be fixed
|
||||||
MKSH_DONT_EMIT_IDSTRING omit RCS IDs from binary
|
MKSH_DONT_EMIT_IDSTRING omit RCS IDs from binary
|
||||||
MKSH_MIDNIGHTBSD01ASH_COMPAT set -o sh: additional compatibility quirk
|
MKSH_MIDNIGHTBSD01ASH_COMPAT set -o sh: additional compatibility quirk
|
||||||
|
6
exec.c
6
exec.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.103 2012/10/21 21:39:01 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.104 2012/10/22 16:53:21 tg Exp $");
|
||||||
|
|
||||||
#ifndef MKSH_DEFAULT_EXECSHELL
|
#ifndef MKSH_DEFAULT_EXECSHELL
|
||||||
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
||||||
@ -605,7 +605,7 @@ comexec(struct op *t, struct tbl * volatile tp, const char **ap,
|
|||||||
/* go on, use the builtin */
|
/* go on, use the builtin */
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
#ifndef MKSH_SMALL
|
#if !defined(MKSH_SMALL) && !defined(MKSH_DISABLE_EXPERIMENTAL)
|
||||||
} else if (tp->val.f == c_trap) {
|
} else if (tp->val.f == c_trap) {
|
||||||
t->u.evalflags &= ~DOTCOMEXEC;
|
t->u.evalflags &= ~DOTCOMEXEC;
|
||||||
break;
|
break;
|
||||||
@ -614,7 +614,7 @@ comexec(struct op *t, struct tbl * volatile tp, const char **ap,
|
|||||||
break;
|
break;
|
||||||
tp = findcom(ap[0], fcflags & (FC_BI|FC_FUNC));
|
tp = findcom(ap[0], fcflags & (FC_BI|FC_FUNC));
|
||||||
}
|
}
|
||||||
#ifndef MKSH_SMALL
|
#if !defined(MKSH_SMALL) && !defined(MKSH_DISABLE_EXPERIMENTAL)
|
||||||
if (t->u.evalflags & DOTCOMEXEC)
|
if (t->u.evalflags & DOTCOMEXEC)
|
||||||
flags |= XEXEC;
|
flags |= XEXEC;
|
||||||
#endif
|
#endif
|
||||||
|
6
main.c
6
main.c
@ -34,7 +34,7 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.231 2012/10/21 21:39:04 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.232 2012/10/22 16:53:22 tg Exp $");
|
||||||
|
|
||||||
extern char **environ;
|
extern char **environ;
|
||||||
|
|
||||||
@ -464,7 +464,7 @@ main_init(int argc, const char *argv[], Source **sp, struct block **lp)
|
|||||||
s = pushs(SSTRINGCMDLINE, ATEMP);
|
s = pushs(SSTRINGCMDLINE, ATEMP);
|
||||||
if (!(s->start = s->str = argv[argi++]))
|
if (!(s->start = s->str = argv[argi++]))
|
||||||
errorf("%s %s", "-c", "requires an argument");
|
errorf("%s %s", "-c", "requires an argument");
|
||||||
#ifndef MKSH_SMALL
|
#if !defined(MKSH_SMALL) && !defined(MKSH_DISABLE_EXPERIMENTAL)
|
||||||
while (*s->str) {
|
while (*s->str) {
|
||||||
if (*s->str != ' ' && ctype(*s->str, C_QUOTE))
|
if (*s->str != ' ' && ctype(*s->str, C_QUOTE))
|
||||||
break;
|
break;
|
||||||
@ -850,7 +850,7 @@ shell(Source * volatile s, volatile bool toplevel)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef MKSH_SMALL
|
#if !defined(MKSH_SMALL) && !defined(MKSH_DISABLE_EXPERIMENTAL)
|
||||||
else if ((s->flags & SF_MAYEXEC) && t->type == TCOM)
|
else if ((s->flags & SF_MAYEXEC) && t->type == TCOM)
|
||||||
t->u.evalflags |= DOTCOMEXEC;
|
t->u.evalflags |= DOTCOMEXEC;
|
||||||
#endif
|
#endif
|
||||||
|
6
sh.h
6
sh.h
@ -157,7 +157,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.595 2012/10/21 21:55:05 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.596 2012/10/22 16:53:22 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R40 2012/10/21"
|
#define MKSH_VERSION "R40 2012/10/21"
|
||||||
|
|
||||||
@ -1345,7 +1345,7 @@ struct ioword {
|
|||||||
#define DOTEMP BIT(8) /* dito: in word part of ${..[%#=?]..} */
|
#define DOTEMP BIT(8) /* dito: in word part of ${..[%#=?]..} */
|
||||||
#define DOVACHECK BIT(9) /* var assign check (for typeset, set, etc) */
|
#define DOVACHECK BIT(9) /* var assign check (for typeset, set, etc) */
|
||||||
#define DOMARKDIRS BIT(10) /* force markdirs behaviour */
|
#define DOMARKDIRS BIT(10) /* force markdirs behaviour */
|
||||||
#ifndef MKSH_SMALL
|
#if !defined(MKSH_SMALL) && !defined(MKSH_DISABLE_EXPERIMENTAL)
|
||||||
#define DOTCOMEXEC BIT(11) /* not an eval flag, used by sh -c hack */
|
#define DOTCOMEXEC BIT(11) /* not an eval flag, used by sh -c hack */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1491,7 +1491,7 @@ struct source {
|
|||||||
#define SF_ALIASEND BIT(2) /* faking space at end of alias */
|
#define SF_ALIASEND BIT(2) /* faking space at end of alias */
|
||||||
#define SF_TTY BIT(3) /* type == SSTDIN & it is a tty */
|
#define SF_TTY BIT(3) /* type == SSTDIN & it is a tty */
|
||||||
#define SF_HASALIAS BIT(4) /* u.tblp valid (SALIAS, SEOF) */
|
#define SF_HASALIAS BIT(4) /* u.tblp valid (SALIAS, SEOF) */
|
||||||
#ifndef MKSH_SMALL
|
#if !defined(MKSH_SMALL) && !defined(MKSH_DISABLE_EXPERIMENTAL)
|
||||||
#define SF_MAYEXEC BIT(5) /* special sh -c optimisation hack */
|
#define SF_MAYEXEC BIT(5) /* special sh -c optimisation hack */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user