deprecate *not* using MKSH_CONSERVATIVE_FDS; named fds coming soon

partially reverts commitid 10048752E6271CABA24 (the manpage, mostly)
and adds a deprecation warning at build time; suggested by izabera
This commit is contained in:
tg
2016-06-25 23:49:13 +00:00
parent f555d1d524
commit b5127b03be
2 changed files with 18 additions and 12 deletions

View File

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.697 2016/03/04 18:28:39 tg Exp $' srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.698 2016/06/25 23:49:12 tg Exp $'
#- #-
# Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # Copyright (c) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012, 2013, 2014, 2015, 2016 # 2011, 2012, 2013, 2014, 2015, 2016
@ -1646,9 +1646,12 @@ ac_ifcpp 'ifdef MKSH_NOPROSPECTOFWORK' isset_MKSH_NOPROSPECTOFWORK '' \
check_categories="$check_categories arge nojsig" check_categories="$check_categories arge nojsig"
ac_ifcpp 'ifdef MKSH_ASSUME_UTF8' isset_MKSH_ASSUME_UTF8 '' \ ac_ifcpp 'ifdef MKSH_ASSUME_UTF8' isset_MKSH_ASSUME_UTF8 '' \
'if the default UTF-8 mode is specified' && : "${HAVE_SETLOCALE_CTYPE=0}" 'if the default UTF-8 mode is specified' && : "${HAVE_SETLOCALE_CTYPE=0}"
ac_ifcpp 'ifdef MKSH_CONSERVATIVE_FDS' isset_MKSH_CONSERVATIVE_FDS '' \ if ac_ifcpp 'ifdef MKSH_CONSERVATIVE_FDS' isset_MKSH_CONSERVATIVE_FDS '' \
'if traditional/conservative fd use is requested' && \ 'if traditional/conservative fd use is requested'; then
check_categories="$check_categories convfds" check_categories="$check_categories convfds"
else
echo >&2 "WARNING: not building with -DMKSH_CONSERVATIVE_FDS is deprecated"
fi
#ac_ifcpp 'ifdef MKSH_DISABLE_DEPRECATED' isset_MKSH_DISABLE_DEPRECATED '' \ #ac_ifcpp 'ifdef MKSH_DISABLE_DEPRECATED' isset_MKSH_DISABLE_DEPRECATED '' \
# "if deprecated features are to be omitted" && \ # "if deprecated features are to be omitted" && \
# check_categories="$check_categories nodeprecated" # check_categories="$check_categories nodeprecated"
@ -2653,7 +2656,7 @@ MKSH_BINSHPOSIX if */sh or */-sh, enable set -o posix
MKSH_BINSHREDUCED if */sh or */-sh, enable set -o sh MKSH_BINSHREDUCED if */sh or */-sh, enable set -o sh
MKSH_CLRTOEOL_STRING "\033[K" MKSH_CLRTOEOL_STRING "\033[K"
MKSH_CLS_STRING "\033[;H\033[J" MKSH_CLS_STRING "\033[;H\033[J"
MKSH_CONSERVATIVE_FDS fd 0-9 for scripts, shell only up to 31 MKSH_CONSERVATIVE_FDS fd 0-9 for scripts, shell only up to 31 (soon default)
MKSH_DEFAULT_EXECSHELL "/bin/sh" (do not change) MKSH_DEFAULT_EXECSHELL "/bin/sh" (do not change)
MKSH_DEFAULT_PROFILEDIR "/etc" (do not change) MKSH_DEFAULT_PROFILEDIR "/etc" (do not change)
MKSH_DEFAULT_TMPDIR "/tmp" (do not change) MKSH_DEFAULT_TMPDIR "/tmp" (do not change)

17
mksh.1
View File

@ -1,4 +1,4 @@
.\" $MirOS: src/bin/mksh/mksh.1,v 1.396 2016/06/25 23:48:10 tg Exp $ .\" $MirOS: src/bin/mksh/mksh.1,v 1.397 2016/06/25 23:49:13 tg Exp $
.\" $OpenBSD: ksh.1,v 1.160 2015/07/04 13:27:04 feinerer Exp $ .\" $OpenBSD: ksh.1,v 1.160 2015/07/04 13:27:04 feinerer Exp $
.\"- .\"-
.\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, .\" Copyright © 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
@ -2456,16 +2456,19 @@ This is called a here string.
Standard input is duplicated from file descriptor Standard input is duplicated from file descriptor
.Ar fd . .Ar fd .
.Ar fd .Ar fd
can be a number, indicating the number of an existing file descriptor; can be a single digit, indicating the number of an existing file descriptor;
the letter the letter
.Ql p , .Ql p ,
indicating the file descriptor associated with the output of the current indicating the file descriptor associated with the output of the current
co-process; or the character co-process; or the character
.Ql \- , .Ql \- ,
indicating standard input is to be closed. indicating standard input is to be closed.
Note that .Pp
.Ar fd Note that the current version of
is limited to a single digit in most shell implementations. .Nm
supports some two-digit fd numbers in some environments;
this feature is deprecated and will be removed from a subsequent release
in favour of a ksh93-/perl-style "named file descriptors" feature.
.It \*(Gt& Ns Ar fd .It \*(Gt& Ns Ar fd
Same as Same as
.Ic \*(Lt& , .Ic \*(Lt& ,
@ -2477,7 +2480,7 @@ This is a deprecated (legacy) GNU
.Nm bash .Nm bash
extension supported by extension supported by
.Nm .Nm
which also supports the preceding explicit fd number, for example, which also supports the preceding explicit fd digit, for example,
.Ic 3&\*(Gt Ns Ar file .Ic 3&\*(Gt Ns Ar file
is the same as is the same as
.Ic 3\*(Gt Ns Ar file 2\*(Gt&3 .Ic 3\*(Gt Ns Ar file 2\*(Gt&3
@ -2506,7 +2509,7 @@ extensions.
In any of the above redirections, the file descriptor that is redirected In any of the above redirections, the file descriptor that is redirected
(i.e. standard input or standard output) (i.e. standard input or standard output)
can be explicitly given by preceding the can be explicitly given by preceding the
redirection with a number (portably, only a single digit). redirection with a single digit.
Parameter, command, and arithmetic Parameter, command, and arithmetic
substitutions, tilde substitutions, and (if the shell is interactive) substitutions, tilde substitutions, and (if the shell is interactive)
file name generation are all performed on the file name generation are all performed on the