compatibility: stick “set ±o arc4random” around for a bit longer,

until R40 is definitively out (so there MAY still be an R39d)

this commit can easily be reverted in its entirety later, when
Build.sh’s compatibility for “-combine” &c. is removed too
This commit is contained in:
tg 2010-07-13 13:07:58 +00:00
parent 0a5d6bc71b
commit ad98b9fc4a
3 changed files with 18 additions and 4 deletions

8
misc.c
View File

@ -29,7 +29,7 @@
#include <grp.h>
#endif
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.139 2010/07/04 17:33:55 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.140 2010/07/13 13:07:56 tg Exp $");
unsigned char chtypes[UCHAR_MAX + 1]; /* type bits for unsigned char */
@ -329,6 +329,12 @@ parse_args(const char **argv,
break;
}
i = option(go.optarg);
if ((enum sh_flag)i == FARC4RANDOM) {
warningf(true, "Do not use set ±o arc4random,"
" it will be removed in the next version"
" of mksh!");
return (0);
}
if ((i != (size_t)-1) && set == Flag(i))
/* Don't check the context if the flag
* isn't changing - makes "set -o interactive"

9
mksh.1
View File

@ -1,4 +1,4 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.228 2010/07/11 11:17:31 tg Exp $
.\" $MirOS: src/bin/mksh/mksh.1,v 1.229 2010/07/13 13:07:56 tg Exp $
.\" $OpenBSD: ksh.1,v 1.134 2010/05/10 21:04:54 jmc Exp $
.\"-
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
@ -71,7 +71,7 @@
.\" with -mandoc, it might implement .Mx itself, but we want to
.\" use our own definition. And .Dd must come *first*, always.
.\"
.Dd $Mdocdate: July 11 2010 $
.Dd $Mdocdate: July 13 2010 $
.\"
.\" Check which macro package we use
.\"
@ -3852,6 +3852,11 @@ during file name generation.
Print commands and parameter assignments when they are executed, preceded by
the value of
.Ev PS4 .
.It Ic arc4random
Deprecated, will be removed in
.Nm
R40.
Do not use, emits a warning to stderr.
.It Ic bgnice
Background jobs are run with lower priority.
.It Ic braceexpand

View File

@ -1,5 +1,5 @@
#if defined(SHFLAGS_DEFNS)
__RCSID("$MirOS: src/bin/mksh/sh_flags.h,v 1.6 2010/07/04 17:33:58 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh_flags.h,v 1.7 2010/07/13 13:07:58 tg Exp $");
#define FN(sname,cname,ochar,flags) /* nothing */
#elif defined(SHFLAGS_ENUMS)
#define FN(sname,cname,ochar,flags) cname,
@ -21,6 +21,9 @@ __RCSID("$MirOS: src/bin/mksh/sh_flags.h,v 1.6 2010/07/04 17:33:58 tg Exp $");
/* -a all new parameters are created with the export attribute */
F0("allexport", FEXPORT, 'a', OF_ANY)
/* ./. backwards compat: dummy, emits a warning */
FN("arc4random", FARC4RANDOM, 0, OF_ANY)
#if HAVE_NICE
/* ./. bgnice */
FN("bgnice", FBGNICE, 0, OF_ANY)