decouple conservative file descriptor use from MKSH_SMALL, with the
new MKSH_CONSERVATIVE_FDS præprocessor flag, because Minix 3, for example, needs it (otherwise “mksh Build.sh” fails)
This commit is contained in:
parent
b6dcee70fd
commit
e88736b5ef
13
Build.sh
13
Build.sh
@ -1,9 +1,10 @@
|
||||
#!/bin/sh
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.387 2009/04/06 08:29:21 tg Exp $'
|
||||
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.388 2009/04/06 08:33:36 tg Exp $'
|
||||
#-
|
||||
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
|
||||
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
|
||||
# MKSH_CLS_STRING MKSH_BINSHREDUCED MKSH_UNEMPLOYED
|
||||
# MKSH_CONSERVATIVE_FDS
|
||||
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
@ -322,8 +323,8 @@ Linux)
|
||||
MidnightBSD)
|
||||
;;
|
||||
Minix)
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_POSIX_1_SOURCE=2"
|
||||
CPPFLAGS="$CPPFLAGS -DMKSH_UNEMPLOYED -D_MINIX"
|
||||
CPPFLAGS="$CPPFLAGS -DMKSH_UNEMPLOYED -DMKSH_CONSERVATIVE_FDS"
|
||||
CPPFLAGS="$CPPFLAGS -D_POSIX_SOURCE -D_POSIX_1_SOURCE=2 -D_MINIX"
|
||||
warn=" but will probably work with GCC"
|
||||
warn="$warn${nl}but not with ACK - /usr/bin/cc - yet)"
|
||||
oldish_ed=no-stderr-ed # /usr/bin/ed(!) is broken
|
||||
@ -388,6 +389,11 @@ case " $CPPFLAGS " in
|
||||
: ${HAVE_SETLOCALE_CTYPE=0}
|
||||
;;
|
||||
esac
|
||||
case " $CPPFLAGS " in
|
||||
*\ -DMKSH_CONSERVATIVE_FDS\ *|*\ -DMKSH_CONSERVATIVE_FDS=*)
|
||||
check_categories=$check_categories,convfds
|
||||
;;
|
||||
esac
|
||||
|
||||
if test -n "$warn"; then
|
||||
echo "Warning: mksh has not yet been ported to or tested on your" >&2
|
||||
@ -887,6 +893,7 @@ if test 0 = $HAVE_MKSH_FULL; then
|
||||
|
||||
: ${HAVE_MKNOD=0}
|
||||
check_categories=$check_categories,smksh
|
||||
check_categories=$check_categories,convfds
|
||||
fi
|
||||
if test 1 = $HAVE_MKSH_REDUCED; then
|
||||
check_categories=$check_categories,binsh
|
||||
|
6
check.t
6
check.t
@ -1,4 +1,4 @@
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.268 2009/04/05 12:35:29 tg Exp $
|
||||
# $MirOS: src/bin/mksh/check.t,v 1.269 2009/04/06 08:33:36 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 $
|
||||
@ -5420,7 +5420,7 @@ expected-stdout:
|
||||
name: mkshiop-1
|
||||
description:
|
||||
Check for support of more than 9 file descriptors
|
||||
category: !smksh
|
||||
category: !convfds
|
||||
stdin:
|
||||
read -u10 foo 10<<< bar
|
||||
print x$foo
|
||||
@ -5430,7 +5430,7 @@ expected-stdout:
|
||||
name: mkshiop-2
|
||||
description:
|
||||
Check for support of more than 9 file descriptors
|
||||
category: !smksh
|
||||
category: !convfds
|
||||
stdin:
|
||||
exec 12>foo
|
||||
print -u12 bar
|
||||
|
4
sh.h
4
sh.h
@ -102,7 +102,7 @@
|
||||
#define __SCCSID(x) __IDSTRING(sccsid,x)
|
||||
|
||||
#ifdef EXTERN
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.288 2009/04/05 12:35:32 tg Exp $");
|
||||
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.289 2009/04/06 08:33:37 tg Exp $");
|
||||
#endif
|
||||
#define MKSH_VERSION "R37 2009/04/05"
|
||||
|
||||
@ -285,7 +285,7 @@ typedef int32_t mksh_ari_t;
|
||||
typedef uint32_t mksh_uari_t;
|
||||
|
||||
/* these shall be smaller than 100 */
|
||||
#ifdef MKSH_SMALL
|
||||
#if defined(MKSH_SMALL) || defined(MKSH_CONSERVATIVE_FDS)
|
||||
#define NUFILE 32 /* Number of user-accessible files */
|
||||
#define FDBASE 10 /* First file usable by Shell */
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user