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:
8
Build.sh
8
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/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,
|
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
|
||||||
# 2011, 2012
|
# 2011, 2012
|
||||||
@ -1527,7 +1527,7 @@ else
|
|||||||
#define EXTERN
|
#define EXTERN
|
||||||
#define MKSH_INCLUDES_ONLY
|
#define MKSH_INCLUDES_ONLY
|
||||||
#include "sh.h"
|
#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); }
|
int main(void) { printf("Hello, World!\n"); return (0); }
|
||||||
EOF
|
EOF
|
||||||
case $cm in
|
case $cm in
|
||||||
@ -1644,12 +1644,14 @@ ac_test killpg <<-'EOF'
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
ac_test memmove <<-'EOF'
|
ac_test memmove <<-'EOF'
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <stddef.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if HAVE_STRINGS_H
|
#if HAVE_STRINGS_H
|
||||||
#include <strings.h>
|
#include <strings.h>
|
||||||
#endif
|
#endif
|
||||||
int main(int ac, char *av[]) {
|
int main(int ac, char *av[]) {
|
||||||
return ((int)memmove(av[0], av[1], ac));
|
return (*(int *)(void *)memmove(av[0], av[1], ac));
|
||||||
}
|
}
|
||||||
EOF
|
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: 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 $
|
||||||
@ -29,7 +29,7 @@
|
|||||||
# http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/bin/test/regress.sh?rev=HEAD
|
# http://www.freebsd.org/cgi/cvsweb.cgi/src/tools/regression/bin/test/regress.sh?rev=HEAD
|
||||||
|
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)MIRBSD KSH R41 2012/12/17
|
@(#)MIRBSD KSH R41 2012/12/21
|
||||||
description:
|
description:
|
||||||
Check version of shell.
|
Check version of shell.
|
||||||
stdin:
|
stdin:
|
||||||
@ -38,7 +38,7 @@ name: KSH_VERSION
|
|||||||
category: shell:legacy-no
|
category: shell:legacy-no
|
||||||
---
|
---
|
||||||
expected-stdout:
|
expected-stdout:
|
||||||
@(#)LEGACY KSH R41 2012/12/17
|
@(#)LEGACY KSH R41 2012/12/21
|
||||||
description:
|
description:
|
||||||
Check version of legacy shell.
|
Check version of legacy shell.
|
||||||
stdin:
|
stdin:
|
||||||
|
9
exec.c
9
exec.c
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "sh.h"
|
#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
|
#ifndef MKSH_DEFAULT_EXECSHELL
|
||||||
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
#define MKSH_DEFAULT_EXECSHELL "/bin/sh"
|
||||||
@ -1427,7 +1427,7 @@ iosetup(struct ioword *iop, struct tbl *tp)
|
|||||||
static int
|
static int
|
||||||
hereinval(const char *content, int sub, char **resbuf, struct shf *shf)
|
hereinval(const char *content, int sub, char **resbuf, struct shf *shf)
|
||||||
{
|
{
|
||||||
const char *ccp;
|
const char * volatile ccp = content;
|
||||||
struct source *s, *osource;
|
struct source *s, *osource;
|
||||||
|
|
||||||
osource = source;
|
osource = source;
|
||||||
@ -1441,14 +1441,13 @@ hereinval(const char *content, int sub, char **resbuf, struct shf *shf)
|
|||||||
if (sub) {
|
if (sub) {
|
||||||
/* do substitutions on the content of heredoc */
|
/* do substitutions on the content of heredoc */
|
||||||
s = pushs(SSTRING, ATEMP);
|
s = pushs(SSTRING, ATEMP);
|
||||||
s->start = s->str = content;
|
s->start = s->str = ccp;
|
||||||
source = s;
|
source = s;
|
||||||
if (yylex(ONEWORD|HEREDOC) != LWORD)
|
if (yylex(ONEWORD|HEREDOC) != LWORD)
|
||||||
internal_errorf("%s: %s", "herein", "yylex");
|
internal_errorf("%s: %s", "herein", "yylex");
|
||||||
source = osource;
|
source = osource;
|
||||||
ccp = evalstr(yylval.cp, 0);
|
ccp = evalstr(yylval.cp, 0);
|
||||||
} else
|
}
|
||||||
ccp = content;
|
|
||||||
|
|
||||||
if (resbuf == NULL)
|
if (resbuf == NULL)
|
||||||
shf_puts(ccp, shf);
|
shf_puts(ccp, shf);
|
||||||
|
4
sh.h
4
sh.h
@ -164,9 +164,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef EXTERN
|
#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
|
#endif
|
||||||
#define MKSH_VERSION "R41 2012/12/17"
|
#define MKSH_VERSION "R41 2012/12/21"
|
||||||
|
|
||||||
/* arithmetic types: C implementation */
|
/* arithmetic types: C implementation */
|
||||||
#if !HAVE_CAN_INTTYPES
|
#if !HAVE_CAN_INTTYPES
|
||||||
|
Reference in New Issue
Block a user