simplify MKSH_SMALL => MKSH_CONSERVATIVE_FDS handling

This commit is contained in:
tg 2009-07-25 20:18:13 +00:00
parent 48c84b6c62
commit 5e3aba8b00
2 changed files with 9 additions and 13 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.409 2009/07/25 20:04:09 tg Exp $' srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.410 2009/07/25 20:18:13 tg Exp $'
#- #-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009 # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Thorsten Glaser <tg@mirbsd.org> # Thorsten Glaser <tg@mirbsd.org>
@ -757,15 +757,6 @@ fi
test $ct = icc && DOWARN="$DOWARN -wd1419" test $ct = icc && DOWARN="$DOWARN -wd1419"
NOWARN=$save_NOWARN NOWARN=$save_NOWARN
#
# CPPFLAGS: which ones are (pre-)set?
#
ac_ifcpp 'ifdef MKSH_ASSUME_UTF8' isset_MKSH_ASSUME_UTF8 '' \
'if MKSH_ASSUME_UTF8 is set' && : ${HAVE_SETLOCALE_CTYPE=0}
ac_ifcpp 'ifdef MKSH_CONSERVATIVE_FDS' isset_MKSH_CONSERVATIVE_FDS '' \
'if MKSH_CONSERVATIVE_FDS is set' && \
check_categories=$check_categories,convfds
# #
# Compiler: extra flags (-O2 -f* -W* etc.) # Compiler: extra flags (-O2 -f* -W* etc.)
# #
@ -919,11 +910,16 @@ if ac_ifcpp 'ifdef MKSH_SMALL' isset_MKSH_SMALL '' \
: ${HAVE_REVOKE=0} : ${HAVE_REVOKE=0}
: ${HAVE_PERSISTENT_HISTORY=0} : ${HAVE_PERSISTENT_HISTORY=0}
check_categories=$check_categories,smksh check_categories=$check_categories,smksh
check_categories=$check_categories,convfds CPPFLAGS="$CPPFLAGS -DMKSH_CONSERVATIVE_FDS"
fi fi
ac_ifcpp 'ifdef MKSH_BINSHREDUCED' isset_MKSH_BINSHREDUCED '' \ ac_ifcpp 'ifdef MKSH_BINSHREDUCED' isset_MKSH_BINSHREDUCED '' \
"if a reduced-feature sh is requested" && \ "if a reduced-feature sh is requested" && \
check_categories=$check_categories,binsh check_categories=$check_categories,binsh
ac_ifcpp 'ifdef MKSH_ASSUME_UTF8' isset_MKSH_ASSUME_UTF8 '' \
'if the default UTF-8 mode is specified' && : ${HAVE_SETLOCALE_CTYPE=0}
ac_ifcpp 'ifdef MKSH_CONSERVATIVE_FDS' isset_MKSH_CONSERVATIVE_FDS '' \
'if traditional/conservative fd use is requested' && \
check_categories=$check_categories,convfds
# #
# Environment: headers # Environment: headers

4
sh.h
View File

@ -122,7 +122,7 @@
#define __SCCSID(x) __IDSTRING(sccsid,x) #define __SCCSID(x) __IDSTRING(sccsid,x)
#ifdef EXTERN #ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.313 2009/07/16 15:06:45 tg Exp $"); __RCSID("$MirOS: src/bin/mksh/sh.h,v 1.314 2009/07/25 20:18:13 tg Exp $");
#endif #endif
#define MKSH_VERSION "R39 2009/07/16" #define MKSH_VERSION "R39 2009/07/16"
@ -312,7 +312,7 @@ typedef int32_t mksh_ari_t;
typedef uint32_t mksh_uari_t; typedef uint32_t mksh_uari_t;
/* these shall be smaller than 100 */ /* these shall be smaller than 100 */
#if defined(MKSH_SMALL) || defined(MKSH_CONSERVATIVE_FDS) #ifdef MKSH_CONSERVATIVE_FDS)
#define NUFILE 32 /* Number of user-accessible files */ #define NUFILE 32 /* Number of user-accessible files */
#define FDBASE 10 /* First file usable by Shell */ #define FDBASE 10 /* First file usable by Shell */
#else #else