diff --git a/Build.sh b/Build.sh index 10fd940..1443cb1 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.361 2008/10/25 12:58:41 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.362 2008/10/26 21:51:25 ahoka Exp $' #- # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI @@ -1037,6 +1037,11 @@ ac_test mkstemp <<-'EOF' int main(void) { char tmpl[] = "X"; return (mkstemp(tmpl)); } EOF +ac_test nice <<-'EOF' + #include + int main(void) { return (nice(4)); } +EOF + ac_test setlocale_ctype '' 'setlocale(LC_CTYPE, "")' <<-'EOF' #include #include diff --git a/jobs.c b/jobs.c index c781684..6c5c80f 100644 --- a/jobs.c +++ b/jobs.c @@ -2,7 +2,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.37 2008/10/13 23:06:03 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/jobs.c,v 1.38 2008/10/26 21:51:26 ahoka Exp $"); /* Order important! */ #define PRUNNING 0 @@ -402,8 +402,10 @@ exchild(struct op *t, int flags, /* used if XPCLOSE or XCCLOSE */ int close_fd) setsig(&sigtraps[tt_sigs[i]], SIG_DFL, SS_RESTORE_DFL|SS_FORCE); } +#if HAVE_NICE if (Flag(FBGNICE) && (flags & XBGND)) (void)nice(4); +#endif if ((flags & XBGND) && !Flag(FMONITOR)) { setsig(&sigtraps[SIGINT], SIG_IGN, SS_RESTORE_IGN|SS_FORCE); diff --git a/misc.c b/misc.c index 8d2ae23..fc184fc 100644 --- a/misc.c +++ b/misc.c @@ -6,7 +6,7 @@ #include #endif -__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.86 2008/10/13 23:06:03 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.87 2008/10/26 21:51:26 ahoka Exp $"); #undef USE_CHVT #if defined(TIOCSCTTY) && !defined(MKSH_SMALL) @@ -113,7 +113,9 @@ const struct shoption options[] = { { "arc4random", 0, OF_ANY }, #endif { "braceexpand", 0, OF_ANY }, /* non-standard */ +#if HAVE_NICE { "bgnice", 0, OF_ANY }, +#endif { NULL, 'c', OF_CMDLINE }, { "emacs", 0, OF_ANY }, { "errexit", 'e', OF_ANY }, diff --git a/sh.h b/sh.h index 0d6ed95..2bc1c65 100644 --- a/sh.h +++ b/sh.h @@ -100,7 +100,7 @@ #define __SCCSID(x) __IDSTRING(sccsid,x) #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.246 2008/10/26 20:59:40 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.247 2008/10/26 21:51:27 ahoka Exp $"); #endif #define MKSH_VERSION "R36 2008/10/26" @@ -434,7 +434,9 @@ enum sh_flag { FARC4RANDOM, /* use 0:rand(3) 1:arc4random(3) 2:switch on write */ #endif FBRACEEXPAND, /* enable {} globbing */ +#if HAVE_NICE FBGNICE, /* bgnice */ +#endif FCOMMAND, /* -c: (invocation) execute specified command */ FEMACS, /* emacs command editing */ FERREXIT, /* -e: quit on error */