gcc-snapshot (see below) issued a clobber warning, and both it and mgcc
yowled about the memmove test until I found a compromise gcc version 4.8.0 20121120 (experimental) [trunk revision 193662] (Debian 20121120-1)
This commit is contained in:
parent
ce602be6be
commit
6d5e27a31a
8
Build.sh
8
Build.sh
|
@ -1,5 +1,5 @@
|
|||
#!/bin/sh
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.603 2012/12/17 23:31:30 tg Exp $'
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.604 2012/12/22 00:03:37 tg Exp $'
|
||||
#-
|
||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||
# 2011, 2012
|
||||
|
@ -1527,7 +1527,7 @@ else
|
|||
#define EXTERN
|
||||
#define MKSH_INCLUDES_ONLY
|
||||
#include "sh.h"
|
||||
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.603 2012/12/17 23:31:30 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/Build.sh,v 1.604 2012/12/22 00:03:37 tg Exp $");
|
||||
int main(void) { printf("Hello, World!\n"); return (0); }
|
||||
EOF
|
||||
case $cm in
|
||||
|
@ -1644,12 +1644,14 @@ ac_test killpg <<-'EOF'
|
|||
EOF
|
||||
|
||||
ac_test memmove <<-'EOF'
|
||||
#include <sys/types.h>
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#if HAVE_STRINGS_H
|
||||
#include <strings.h>
|
||||
#endif
|
||||
int main(int ac, char *av[]) {
|
||||
return ((int)memmove(av[0], av[1], ac));
|
||||
return (*(int *)(void *)memmove(av[0], av[1], ac));
|
||||
}
|
||||
EOF
|
||||
|
||||
|
|
6
check.t
6
check.t
|
@ -1,4 +1,4 @@
|
|||
# $MirOS: src/bin/mksh/check.t,v 1.574 2012/12/17 23:46:31 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.575 2012/12/22 00:03:39 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 $
|
||||
|
@ -29,7 +29,7 @@
|
|||
# http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/bin/test/regress.sh?rev=HEAD
|
||||
|
||||
expected-stdout:
|
||||
@(#)MIRBSD KSH R41 2012/12/17
|
||||
@(#)MIRBSD KSH R41 2012/12/21
|
||||
description:
|
||||
Check version of shell.
|
||||
stdin:
|
||||
|
@ -38,7 +38,7 @@ name: KSH_VERSION
|
|||
category: shell:legacy-no
|
||||
---
|
||||
expected-stdout:
|
||||
@(#)LEGACY KSH R41 2012/12/17
|
||||
@(#)LEGACY KSH R41 2012/12/21
|
||||
description:
|
||||
Check version of legacy shell.
|
||||
stdin:
|
||||
|
|
9
exec.c
9
exec.c
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "sh.h"
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.109 2012/12/17 23:18:03 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/exec.c,v 1.110 2012/12/22 00:03:41 tg Exp $");
|
||||
|
||||
#ifndef MKSH_DEFAULT_EXECSHELL
|
||||
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
||||
|
@ -1427,7 +1427,7 @@ iosetup(struct ioword *iop, struct tbl *tp)
|
|||
static int
|
||||
hereinval(const char *content, int sub, char **resbuf, struct shf *shf)
|
||||
{
|
||||
const char *ccp;
|
||||
const char * volatile ccp = content;
|
||||
struct source *s, *osource;
|
||||
|
||||
osource = source;
|
||||
|
@ -1441,14 +1441,13 @@ hereinval(const char *content, int sub, char **resbuf, struct shf *shf)
|
|||
if (sub) {
|
||||
/* do substitutions on the content of heredoc */
|
||||
s = pushs(SSTRING, ATEMP);
|
||||
s->start = s->str = content;
|
||||
s->start = s->str = ccp;
|
||||
source = s;
|
||||
if (yylex(ONEWORD|HEREDOC) != LWORD)
|
||||
internal_errorf("%s: %s", "herein", "yylex");
|
||||
source = osource;
|
||||
ccp = evalstr(yylval.cp, 0);
|
||||
} else
|
||||
ccp = content;
|
||||
}
|
||||
|
||||
if (resbuf == NULL)
|
||||
shf_puts(ccp, shf);
|
||||
|
|
4
sh.h
4
sh.h
|
@ -164,9 +164,9 @@
|
|||
#endif
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.619 2012/12/17 23:46:33 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.620 2012/12/22 00:03:42 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R41 2012/12/17"
|
||||
#define MKSH_VERSION "R41 2012/12/21"
|
||||
|
||||
/* arithmetic types: C implementation */
|
||||
#if !HAVE_CAN_INTTYPES
|
||||
|
|
Loading…
Reference in New Issue