* move <sys/param.h> include to sh.h
* fix compilation and invocation of test suite with whitespace in the pathnames for real, this time * clean up (especially whitespace)
This commit is contained in:
parent
3506838417
commit
ee7992988b
5
Build.sh
5
Build.sh
@ -1,5 +1,5 @@
|
||||
#!/bin/sh
|
||||
# $MirOS: src/bin/mksh/Build.sh,v 1.15 2005/06/08 23:02:08 tg Exp $
|
||||
# $MirOS: src/bin/mksh/Build.sh,v 1.16 2005/07/07 23:27:52 tg Exp $
|
||||
#-
|
||||
# Recognised environment variables and their defaults:
|
||||
# CC gcc
|
||||
@ -7,9 +7,8 @@
|
||||
# CPPFLAGS (empty)
|
||||
# LDFLAGS -static
|
||||
# LIBS (empty)
|
||||
# srcdir (path of script)
|
||||
# NROFF nroff # (ignored if -r option given)
|
||||
# GNU/Linux, Mac, Solaris: add -d, maybe -r, CPPFLAGS='-D_FILE_OFFSET_BITS=64'
|
||||
# GNU/Linux, Mac, Solaris: add -d, CPPFLAGS='-D_FILE_OFFSET_BITS=64'
|
||||
|
||||
SHELL="${SHELL:-/bin/sh}"
|
||||
CC="${CC:-gcc}"
|
||||
|
7
check.pl
7
check.pl
@ -1,5 +1,5 @@
|
||||
#!/usr/bin/perl
|
||||
# $MirOS: src/bin/mksh/check.pl,v 1.6 2005/06/08 21:39:59 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.pl,v 1.7 2005/07/07 23:27:52 tg Exp $
|
||||
# $OpenBSD: th,v 1.12 2005/05/28 04:53:47 millert Exp $
|
||||
#-
|
||||
# Example test:
|
||||
@ -17,7 +17,7 @@
|
||||
# + false
|
||||
# expected-exit: 1
|
||||
# ---
|
||||
# This runs the test-program (eg, pdksh) with the arguments -x and -f,
|
||||
# This runs the test-program (eg, mksh) with the arguments -x and -f,
|
||||
# standard input is a file containing "echo hi*\nfalse\n". The program
|
||||
# is expected to produce "hi*" (no trailing newline) on standard output,
|
||||
# "+ echo hi*\n+false\n" on standard error, and an exit code of 1.
|
||||
@ -484,7 +484,6 @@ run_test
|
||||
if ($program_kludge) {
|
||||
@argv = split(' ', $test_prog);
|
||||
} else {
|
||||
$test_prog =~ s/ /\\ /g;
|
||||
@argv = ($test_prog);
|
||||
}
|
||||
if (defined $test{'arguments'}) {
|
||||
@ -493,7 +492,7 @@ run_test
|
||||
substr($test{'arguments'}, 1)));
|
||||
}
|
||||
push(@argv, $temps) if defined $test{'script'};
|
||||
exec(@argv);
|
||||
exec { $argv[0] } @argv;
|
||||
print STDERR "$prog: couldn't execute $test_prog - $!\n";
|
||||
kill('TERM', $$);
|
||||
exit(95);
|
||||
|
6
check.t
6
check.t
@ -1,4 +1,4 @@
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.25 2005/07/07 22:00:45 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.26 2005/07/07 23:27:52 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 $
|
||||
@ -3066,7 +3066,7 @@ description:
|
||||
Check that (here doc) temp files are not left behind after an exec.
|
||||
stdin:
|
||||
mkdir foo || exit 1
|
||||
TMPDIR=$PWD/foo $0 <<- 'EOF'
|
||||
TMPDIR=$PWD/foo "$0" <<- 'EOF'
|
||||
x() {
|
||||
sed 's/^/X /' << E_O_F
|
||||
hi
|
||||
@ -3079,7 +3079,7 @@ stdin:
|
||||
exec $echo subtest-1 hi
|
||||
EOF
|
||||
echo subtest-1 foo/*
|
||||
TMPDIR=$PWD/foo $0 <<- 'EOF'
|
||||
TMPDIR=$PWD/foo "$0" <<- 'EOF'
|
||||
echo=echo; [ -x /bin/echo ] && echo=/bin/echo
|
||||
sed 's/^/X /' << E_O_F; exec $echo subtest-2 hi
|
||||
a
|
||||
|
@ -1,14 +1,13 @@
|
||||
/** $MirOS: src/bin/mksh/histrap.c,v 1.9 2005/06/24 15:36:57 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/histrap.c,v 1.10 2005/07/07 23:27:52 tg Exp $ */
|
||||
/* $OpenBSD: history.c,v 1.30 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: trap.c,v 1.22 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
|
||||
#include "sh.h"
|
||||
#include <sys/param.h> /* for BSD */
|
||||
#include <sys/file.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.9 2005/06/24 15:36:57 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/histrap.c,v 1.10 2005/07/07 23:27:52 tg Exp $");
|
||||
|
||||
static int histfd;
|
||||
static int hsize;
|
||||
|
5
misc.c
5
misc.c
@ -1,13 +1,12 @@
|
||||
/** $MirOS: src/bin/mksh/misc.c,v 1.6 2005/07/04 12:34:23 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/misc.c,v 1.7 2005/07/07 23:27:52 tg Exp $ */
|
||||
/* $OpenBSD: misc.c,v 1.28 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: path.c,v 1.12 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
|
||||
#include "sh.h"
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/param.h> /* for MAXPATHLEN */
|
||||
#include <sys/stat.h>
|
||||
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.6 2005/07/04 12:34:23 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/misc.c,v 1.7 2005/07/07 23:27:52 tg Exp $");
|
||||
|
||||
short chtypes[UCHAR_MAX+1]; /* type bits for unsigned char */
|
||||
|
||||
|
4
sh.h
4
sh.h
@ -1,4 +1,4 @@
|
||||
/** $MirOS: src/bin/mksh/sh.h,v 1.15 2005/07/05 22:00:20 tg Exp $ */
|
||||
/** $MirOS: src/bin/mksh/sh.h,v 1.16 2005/07/07 23:27:52 tg Exp $ */
|
||||
/* $OpenBSD: sh.h,v 1.27 2005/03/28 21:33:04 deraadt Exp $ */
|
||||
/* $OpenBSD: shf.h,v 1.5 2005/03/30 17:16:37 deraadt Exp $ */
|
||||
/* $OpenBSD: table.h,v 1.6 2004/12/18 20:55:52 millert Exp $ */
|
||||
@ -13,7 +13,7 @@
|
||||
#define _ALL_SOURCE
|
||||
#endif
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
|
||||
#if defined(__gnu_linux__) && !defined(_POSIX_SOURCE)
|
||||
#define _POSIX_SOURCE
|
||||
|
Loading…
Reference in New Issue
Block a user