port to FreeMiNT: add OS uname and flags; 2>&- is evil™; $UNIXMODE must be preserved; unlink(2) is weird
This commit is contained in:
parent
816bf86710
commit
e0c4ad7fa9
9
Build.sh
9
Build.sh
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.471 2011/02/11 00:49:03 tg Exp $'
|
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.472 2011/02/27 19:29:18 tg Exp $'
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011
|
||||||
# Thorsten Glaser <tg@mirbsd.org>
|
# Thorsten Glaser <tg@mirbsd.org>
|
||||||
@ -419,6 +419,11 @@ DragonFly)
|
|||||||
;;
|
;;
|
||||||
FreeBSD)
|
FreeBSD)
|
||||||
;;
|
;;
|
||||||
|
FreeMiNT)
|
||||||
|
oswarn="; it has minor issues"
|
||||||
|
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
|
||||||
|
: ${HAVE_SETLOCALE_CTYPE=0}
|
||||||
|
;;
|
||||||
GNU)
|
GNU)
|
||||||
# define NO_PATH_MAX to use Hurd-only functions
|
# define NO_PATH_MAX to use Hurd-only functions
|
||||||
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -DNO_PATH_MAX"
|
CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -DNO_PATH_MAX"
|
||||||
@ -1480,7 +1485,7 @@ cat >>test.sh <<-EOF
|
|||||||
cstr="\$cstr"'print \$os . ", Perl version " . \$];'
|
cstr="\$cstr"'print \$os . ", Perl version " . \$];'
|
||||||
for perli in \$PERL perl5 perl no; do
|
for perli in \$PERL perl5 perl no; do
|
||||||
[[ \$perli = no ]] && exit 1
|
[[ \$perli = no ]] && exit 1
|
||||||
perlos=\$(\$perli -e "\$cstr") 2>&- || continue
|
perlos=\$(\$perli -e "\$cstr") 2>/dev/null || continue
|
||||||
print "Perl interpreter '\$perli' running on '\$perlos'"
|
print "Perl interpreter '\$perli' running on '\$perlos'"
|
||||||
[[ -n \$perlos ]] && break
|
[[ -n \$perlos ]] && break
|
||||||
done
|
done
|
||||||
|
9
check.pl
9
check.pl
@ -1,7 +1,7 @@
|
|||||||
# $MirOS: src/bin/mksh/check.pl,v 1.23 2009/06/10 18:12:43 tg Rel $
|
# $MirOS: src/bin/mksh/check.pl,v 1.24 2011/02/27 19:29:19 tg Exp $
|
||||||
# $OpenBSD: th,v 1.13 2006/05/18 21:27:23 miod Exp $
|
# $OpenBSD: th,v 1.13 2006/05/18 21:27:23 miod Exp $
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011
|
||||||
# Thorsten Glaser <tg@mirbsd.org>
|
# Thorsten Glaser <tg@mirbsd.org>
|
||||||
#
|
#
|
||||||
# Provided that these terms and disclaimer and all copyright notices
|
# Provided that these terms and disclaimer and all copyright notices
|
||||||
@ -71,7 +71,8 @@
|
|||||||
# environment. Programs are run with
|
# environment. Programs are run with
|
||||||
# the following minimal environment:
|
# the following minimal environment:
|
||||||
# HOME, LD_LIBRARY_PATH, LOCPATH,
|
# HOME, LD_LIBRARY_PATH, LOCPATH,
|
||||||
# LOGNAME, PATH, SHELL, USER
|
# LOGNAME, PATH, SHELL, UNIXMODE,
|
||||||
|
# USER
|
||||||
# (values taken from the environment of
|
# (values taken from the environment of
|
||||||
# the test harness).
|
# the test harness).
|
||||||
# ENV is set to /nonexistant.
|
# ENV is set to /nonexistant.
|
||||||
@ -253,7 +254,7 @@ $all_tests = @ARGV == 0;
|
|||||||
# Set up a very minimal environment
|
# Set up a very minimal environment
|
||||||
%new_env = ();
|
%new_env = ();
|
||||||
foreach $env (('HOME', 'LD_LIBRARY_PATH', 'LOCPATH', 'LOGNAME',
|
foreach $env (('HOME', 'LD_LIBRARY_PATH', 'LOCPATH', 'LOGNAME',
|
||||||
'PATH', 'SHELL', 'USER')) {
|
'PATH', 'SHELL', 'UNIXMODE', 'USER')) {
|
||||||
$new_env{$env} = $ENV{$env} if defined $ENV{$env};
|
$new_env{$env} = $ENV{$env} if defined $ENV{$env};
|
||||||
}
|
}
|
||||||
$new_env{'ENV'} = '/nonexistant';
|
$new_env{'ENV'} = '/nonexistant';
|
||||||
|
4
check.t
4
check.t
@ -1,4 +1,4 @@
|
|||||||
# $MirOS: src/bin/mksh/check.t,v 1.410 2011/02/19 21:39:14 tg Exp $
|
# $MirOS: src/bin/mksh/check.t,v 1.411 2011/02/27 19:29:20 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 $
|
||||||
@ -1752,6 +1752,8 @@ expected-stdout:
|
|||||||
name: glob-bad-2
|
name: glob-bad-2
|
||||||
description:
|
description:
|
||||||
Check that symbolic links aren't stat()'d
|
Check that symbolic links aren't stat()'d
|
||||||
|
# breaks on FreeMiNT (cannot unlink dangling symlinks)
|
||||||
|
category: !os:mint
|
||||||
file-setup: dir 755 "dir"
|
file-setup: dir 755 "dir"
|
||||||
file-setup: symlink 644 "dir/abc"
|
file-setup: symlink 644 "dir/abc"
|
||||||
non-existent-file
|
non-existent-file
|
||||||
|
Loading…
x
Reference in New Issue
Block a user