fix prodded by cnuke@ for AIX with IBM xlC 7.0:
fool the compiler into not doing static bounds checking when we do one-past-the-array-boundary pointer assignments for cases where the only accesses are like (*--pointer); bump version
This commit is contained in:
parent
94b7792718
commit
37934a07cf
4
check.t
4
check.t
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.t,v 1.228 2008/10/05 16:06:42 tg Exp $
|
# $MirOS: src/bin/mksh/check.t,v 1.229 2008/10/10 21:30:41 tg Exp $
|
||||||
# $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas 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: 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 $
|
# $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $
|
||||||
@ -7,7 +7,7 @@
|
|||||||
# http://www.research.att.com/~gsf/public/ifs.sh
|
# http://www.research.att.com/~gsf/public/ifs.sh
|
||||||
|
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)MIRBSD KSH R35 2008/10/05
|
@(#)MIRBSD KSH R35 2008/10/10
|
||||||
description:
|
description:
|
||||||
Check version of shell.
|
Check version of shell.
|
||||||
stdin:
|
stdin:
|
||||||
|
4
lex.c
4
lex.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.72 2008/09/30 19:35:10 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/lex.c,v 1.73 2008/10/10 21:30:42 tg Exp $");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* states while lexing word
|
* states while lexing word
|
||||||
@ -151,7 +151,7 @@ yylex(int cf)
|
|||||||
states[0].ls_info.base = NULL;
|
states[0].ls_info.base = NULL;
|
||||||
statep = &states[1];
|
statep = &states[1];
|
||||||
state_info.base = states;
|
state_info.base = states;
|
||||||
state_info.end = &states[STATE_BSIZE];
|
state_info.end = &state_info.base[STATE_BSIZE];
|
||||||
|
|
||||||
Xinit(ws, wp, 64, ATEMP);
|
Xinit(ws, wp, 64, ATEMP);
|
||||||
|
|
||||||
|
4
sh.h
4
sh.h
@ -100,9 +100,9 @@
|
|||||||
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
||||||
|
|
||||||
#ifdef EXTERN
|
#ifdef EXTERN
|
||||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.238 2008/10/05 16:06:43 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.239 2008/10/10 21:30:42 tg Exp $");
|
||||||
#endif
|
#endif
|
||||||
#define MKSH_VERSION "R35 2008/10/05"
|
#define MKSH_VERSION "R35 2008/10/10"
|
||||||
|
|
||||||
#ifndef MKSH_INCLUDES_ONLY
|
#ifndef MKSH_INCLUDES_ONLY
|
||||||
|
|
||||||
|
6
shf.c
6
shf.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.21 2008/05/17 18:47:02 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/shf.c,v 1.22 2008/10/10 21:30:43 tg Exp $");
|
||||||
|
|
||||||
/* flags to shf_emptybuf() */
|
/* flags to shf_emptybuf() */
|
||||||
#define EB_READSW 0x01 /* about to switch to reading */
|
#define EB_READSW 0x01 /* about to switch to reading */
|
||||||
@ -835,7 +835,7 @@ shf_vfprintf(struct shf *shf, const char *fmt, va_list args)
|
|||||||
case 'u':
|
case 'u':
|
||||||
case 'x':
|
case 'x':
|
||||||
flags |= FL_NUMBER;
|
flags |= FL_NUMBER;
|
||||||
cp = &numbuf[sizeof (numbuf)];
|
cp = numbuf + sizeof (numbuf);
|
||||||
/*-
|
/*-
|
||||||
* XXX any better way to do this?
|
* XXX any better way to do this?
|
||||||
* XXX hopefully the compiler optimises this out
|
* XXX hopefully the compiler optimises this out
|
||||||
@ -903,7 +903,7 @@ shf_vfprintf(struct shf *shf, const char *fmt, va_list args)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
len = &numbuf[sizeof (numbuf)] - (s = cp);
|
len = numbuf + sizeof (numbuf) - (s = cp);
|
||||||
if (flags & FL_DOT) {
|
if (flags & FL_DOT) {
|
||||||
if (precision > len) {
|
if (precision > len) {
|
||||||
field = precision;
|
field = precision;
|
||||||
|
4
syn.c
4
syn.c
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#include "sh.h"
|
||||||
|
|
||||||
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.26 2008/08/02 17:45:12 tg Exp $");
|
__RCSID("$MirOS: src/bin/mksh/syn.c,v 1.27 2008/10/10 21:30:43 tg Exp $");
|
||||||
|
|
||||||
struct nesting_state {
|
struct nesting_state {
|
||||||
int start_token; /* token than began nesting (eg, FOR) */
|
int start_token; /* token than began nesting (eg, FOR) */
|
||||||
@ -163,7 +163,7 @@ synio(int cf)
|
|||||||
iop->delim = yylval.cp;
|
iop->delim = yylval.cp;
|
||||||
if (*ident != 0) /* unquoted */
|
if (*ident != 0) /* unquoted */
|
||||||
iop->flag |= IOEVAL;
|
iop->flag |= IOEVAL;
|
||||||
if (herep >= &heres[HERES])
|
if (herep > &heres[HERES - 1])
|
||||||
yyerror("too many <<s\n");
|
yyerror("too many <<s\n");
|
||||||
*herep++ = iop;
|
*herep++ = iop;
|
||||||
} else
|
} else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user