From 50f081c369ed28f637b6ba1246cce63305181ba5 Mon Sep 17 00:00:00 2001 From: tg Date: Sun, 14 Mar 2010 11:58:33 +0000 Subject: [PATCH] even better on Haiku: * let ulimits work * add a Haiku-specific ulimit * always use UTF-8, they have no locales but a UTF-8 terminal --- Build.sh | 7 +++++-- check.t | 9 +++++---- funcs.c | 5 ++++- sh.h | 4 ++-- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Build.sh b/Build.sh index bfa6a00..3771509 100644 --- a/Build.sh +++ b/Build.sh @@ -1,5 +1,5 @@ #!/bin/sh -srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.445 2010/03/14 11:56:07 tg Exp $' +srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.446 2010/03/14 11:58:29 tg Exp $' #- # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Thorsten Glaser @@ -361,7 +361,7 @@ AIX) CPPFLAGS="$CPPFLAGS -D_ALL_SOURCE" : ${HAVE_SETLOCALE_CTYPE=0} ;; -BeOS|Haiku) +BeOS) oswarn=' and will currently not work' ;; BSD/OS) @@ -383,6 +383,9 @@ GNU) GNU/kFreeBSD) CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE" ;; +Haiku) + CPPFLAGS="$CPPFLAGS -DMKSH_ASSUME_UTF8" + ;; HP-UX) ;; Interix) diff --git a/check.t b/check.t index eb7e0aa..5654e3a 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.366 2010/03/01 17:28:05 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.367 2010/03/14 11:58:30 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 $ @@ -25,7 +25,7 @@ # http://www.research.att.com/~gsf/public/ifs.sh expected-stdout: - @(#)MIRBSD KSH R39 2010/02/25 + @(#)MIRBSD KSH R39 2010/03/14 description: Check version of shell. stdin: @@ -6342,8 +6342,9 @@ name: ulimit-1 description: Check if we can use a specific syntax idiom for ulimit stdin: - if ! x=$(ulimit -d); then - echo expected to fail on this OS + if ! x=$(ulimit -d) || [[ $x = unknown ]]; then + #echo expected to fail on this OS + echo okay else ulimit -dS $x && echo okay fi diff --git a/funcs.c b/funcs.c index 4d99c4b..6bef544 100644 --- a/funcs.c +++ b/funcs.c @@ -25,7 +25,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.151 2010/02/23 18:13:03 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.152 2010/03/14 11:58:32 tg Exp $"); #if HAVE_KILLPG /* @@ -3161,6 +3161,9 @@ c_ulimit(const char **wp) #endif #ifdef RLIMIT_TIME { "humantime(seconds)", RLIMIT_TIME, 1, 'T' }, +#endif +#ifdef RLIMIT_NOVMON + { "vnodemonitors", RLIMIT_NOVMON, 1, 'V' }, #endif { NULL, 0, 0, 0 } }; diff --git a/sh.h b/sh.h index 33ec69f..5f5198b 100644 --- a/sh.h +++ b/sh.h @@ -150,9 +150,9 @@ #endif #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.383 2010/02/25 20:18:17 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.384 2010/03/14 11:58:33 tg Exp $"); #endif -#define MKSH_VERSION "R39 2010/02/25" +#define MKSH_VERSION "R39 2010/03/14" #ifndef MKSH_INCLUDES_ONLY