From e0c4ad7fa96659e339492beaa99faf2658de4dc9 Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 27 Feb 2011 19:29:20 +0000 Subject: [PATCH] =?UTF-8?q?port=20to=20FreeMiNT:=20add=20OS=20uname=20and?= =?UTF-8?q?=20flags;=202>&-=20is=20evil=E2=84=A2;=20$UNIXMODE=20must=20be?= =?UTF-8?q?=20preserved;=20unlink(2)=20is=20weird?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Build.sh | 9 +++++++-- check.pl | 9 +++++---- check.t | 4 +++- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/Build.sh b/Build.sh index b51329a..7e251de 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/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 # Thorsten Glaser @@ -419,6 +419,11 @@ DragonFly) ;; FreeBSD) ;; +FreeMiNT) + oswarn="; it has minor issues" + CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" + : ${HAVE_SETLOCALE_CTYPE=0} + ;; GNU) # define NO_PATH_MAX to use Hurd-only functions CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE -DNO_PATH_MAX" @@ -1480,7 +1485,7 @@ cat >>test.sh <<-EOF cstr="\$cstr"'print \$os . ", Perl version " . \$];' for perli in \$PERL perl5 perl no; do [[ \$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'" [[ -n \$perlos ]] && break done diff --git a/check.pl b/check.pl index e793e95..64adc4a 100644 --- a/check.pl +++ b/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 $ #- -# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009 +# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2011 # Thorsten Glaser # # Provided that these terms and disclaimer and all copyright notices @@ -71,7 +71,8 @@ # environment. Programs are run with # the following minimal environment: # HOME, LD_LIBRARY_PATH, LOCPATH, -# LOGNAME, PATH, SHELL, USER +# LOGNAME, PATH, SHELL, UNIXMODE, +# USER # (values taken from the environment of # the test harness). # ENV is set to /nonexistant. @@ -253,7 +254,7 @@ $all_tests = @ARGV == 0; # Set up a very minimal environment %new_env = (); 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'} = '/nonexistant'; diff --git a/check.t b/check.t index f126a1f..46c746d 100644 --- a/check.t +++ b/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: 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 $ @@ -1752,6 +1752,8 @@ expected-stdout: name: glob-bad-2 description: 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: symlink 644 "dir/abc" non-existent-file