sprinkle mksh_ari_t to limit arithmetics to 32 bit even

on Debian Lenny/amd64 (XXX need more verification; this
can be used for 64 bit arithmetics later too)

PPID, PGRP, RANDOM, USER_ID are now unsigned by default
This commit is contained in:
tg
2009-03-14 18:12:55 +00:00
parent 1552bf1576
commit 32bc1dc40e
10 changed files with 102 additions and 65 deletions

4
eval.c
View File

@ -2,7 +2,7 @@
#include "sh.h"
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.51 2008/12/13 17:02:13 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/eval.c,v 1.52 2009/03/14 18:12:51 tg Exp $");
#ifdef MKSH_SMALL
#define MKSH_NOPWNAM
@ -314,7 +314,7 @@ expand(const char *cp, /* input word */
switch (stype & 0x7f) {
case '0': {
char *beg, *mid, *end, *stg;
long from = 0, num = -1, flen;
mksh_ari_t from = 0, num = -1, flen;
/* ! DOBLANK,DOBRACE_,DOTILDE */
f = DOPAT | (f&DONTRUNCOMMAND) |