as long as we're using arc4random(3) to generate $RANDOM,
let it be an uint32_t, like nbsh(1)
This commit is contained in:
parent
11282be59d
commit
b131ca909d
4
check.t
4
check.t
@ -1,4 +1,4 @@
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.56 2006/08/14 20:41:21 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.57 2006/08/18 13:40:15 tg Exp $
|
||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $
|
||||
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
||||
@ -3855,5 +3855,5 @@ category: pdksh
|
||||
stdin:
|
||||
echo $KSH_VERSION
|
||||
expected-stdout:
|
||||
@(#)MIRBSD KSH R28 2006/08/09
|
||||
@(#)MIRBSD KSH R28 2006/08/18
|
||||
---
|
||||
|
4
main.c
4
main.c
@ -6,7 +6,7 @@
|
||||
#define EXTERN /* define EXTERNs in sh.h */
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.44 2006/08/01 13:43:27 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/main.c,v 1.45 2006/08/18 13:40:15 tg Exp $");
|
||||
|
||||
extern char **environ;
|
||||
|
||||
@ -21,7 +21,7 @@ static const char *initcoms[] = {
|
||||
"typeset", "-r", "KSH_VERSION", NULL,
|
||||
"typeset", "-x", "SHELL", "PATH", "HOME", NULL,
|
||||
"typeset", "-i", "PPID", "OPTIND=1", NULL,
|
||||
"eval", "typeset -i RANDOM SECONDS=\"${SECONDS-0}\" TMOUT=\"${TMOUT-0}\"", NULL,
|
||||
"eval", "typeset -Ui RANDOM SECONDS=\"${SECONDS-0}\" TMOUT=\"${TMOUT-0}\"", NULL,
|
||||
"alias",
|
||||
/* Standard ksh aliases */
|
||||
"hash=alias -t", /* not "alias -t --": hash -r needs to work */
|
||||
|
4
var.c
4
var.c
@ -2,7 +2,7 @@
|
||||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.21 2006/07/11 14:51:01 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/var.c,v 1.22 2006/08/18 13:40:16 tg Exp $");
|
||||
|
||||
/*
|
||||
* Variables
|
||||
@ -920,7 +920,7 @@ getspec(struct tbl *vp)
|
||||
setint(vp, (long) (rand() & 0x7fff));
|
||||
#if HAVE_ARC4RANDOM
|
||||
else
|
||||
setint(vp, (long) (arc4random() & 0x7fff));
|
||||
setint(vp, arc4random());
|
||||
#endif
|
||||
vp->flag |= SPECIAL;
|
||||
break;
|
||||
|
@ -1,3 +1,3 @@
|
||||
/* $MirOS: src/bin/mksh/version.h,v 1.6 2006/08/09 20:44:16 tg Exp $ */
|
||||
/* $MirOS: src/bin/mksh/version.h,v 1.7 2006/08/18 13:40:16 tg Exp $ */
|
||||
|
||||
EXTERN const char MKSH_VERSION[] I__("@(#)MIRBSD KSH R28 2006/08/09");
|
||||
EXTERN const char MKSH_VERSION[] I__("@(#)MIRBSD KSH R28 2006/08/18");
|
||||
|
Loading…
Reference in New Issue
Block a user