mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
src/cmd/ksh93/{COMPATIBILITY,README}: updates in prep for release
This commit is contained in:
parent
33b6718bf2
commit
ccd98fe754
2 changed files with 112 additions and 74 deletions
|
@ -1,9 +1,82 @@
|
||||||
|
ksh 93u+m vs. ksh 93u+
|
||||||
|
|
||||||
|
The following is a list of changes between ksh 93u+ 2012-08-01 and the new
|
||||||
|
ksh 93u+m reboot that could cause incompatibilities in rare corner cases.
|
||||||
|
Fixes of clear bugs in ksh 93u+ are not included here, even though any bugfix
|
||||||
|
could potentially cause an incompatibility in a script that relies on the bug.
|
||||||
|
For more details, see the NEWS file and for complete details, see the git log.
|
||||||
|
|
||||||
|
0. A new '-o posix' shell option has been added to ksh 93u+m that makes
|
||||||
|
the ksh language more compatible with other shells by following the
|
||||||
|
POSIX standard more closely. See the manual page for details. It is
|
||||||
|
enabled by default if ksh is invoked as sh.
|
||||||
|
|
||||||
|
1. File name generation (a.k.a. pathname expansion, a.k.a. globbing) now
|
||||||
|
never matches the special navigational names '.' (current directory)
|
||||||
|
and '..' (parent directory). This change makes a pattern like .*
|
||||||
|
useful; it now matches all hidden 'dotfiles' in the current directory.
|
||||||
|
|
||||||
|
2. The bash-style &>foo redirection operator (shorthand for >foo 2>&1) can
|
||||||
|
now always be used if -o posix is off, and not only in profile scripts.
|
||||||
|
|
||||||
|
3. Most predefined aliases have been converted to regular built-in
|
||||||
|
commands that work the same way. 'unalias' no longer removes these.
|
||||||
|
To remove a built-in command, use 'builtin -d'. The 'history' and 'r'
|
||||||
|
predefined aliases remain, but are now only set on interactive shells.
|
||||||
|
There are some minor changes in behaviour in some former aliases:
|
||||||
|
- 'redirect' now checks if all arguments are valid redirections
|
||||||
|
before performing them. If an error occurs, it issues an error
|
||||||
|
message instead of terminating the shell.
|
||||||
|
- 'suspend' now refuses to suspend a login shell, as there is probably
|
||||||
|
no parent shell to return to and the login session would freeze.
|
||||||
|
- 'times' now gives high precision output in a POSIX compliant format.
|
||||||
|
|
||||||
|
4. 'command' no longer expands aliases in its first argument, as this is
|
||||||
|
no longer required after change 3 above. In the unlikely event that you
|
||||||
|
still need this behavior, you can set:
|
||||||
|
alias command='command '
|
||||||
|
|
||||||
|
5. The undocumented 'login' and 'newgrp' builtin commands have been
|
||||||
|
removed. These replaced your shell session with the external commands
|
||||||
|
by the same name, as in 'exec'. If an error occurred (e.g. due to a
|
||||||
|
typo), you would end up immediately logged out. If you do want this
|
||||||
|
behavior, you can restore it by setting:
|
||||||
|
alias login='exec login'
|
||||||
|
alias newgrp='exec newgrp'
|
||||||
|
|
||||||
|
6. 'case' no longer retries to match patterns as literal strings if they
|
||||||
|
fail to match as patterns. This undocumented behaviour broke validation
|
||||||
|
use cases that are expected to work. For example:
|
||||||
|
n='[0-9]'
|
||||||
|
case $n in
|
||||||
|
[0-9]) echo "$n is a number" ;;
|
||||||
|
esac
|
||||||
|
would output "[0-9] is a number". In the unlikely event that a script
|
||||||
|
does rely on this behavior, it can be fixed like this:
|
||||||
|
case $n in
|
||||||
|
[0-9] | "[0-9]")
|
||||||
|
echo "$n is a number or the number pattern" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
7. If 'set -u'/'set -o nounset' is active, then the shell now errors out
|
||||||
|
if a nonexistent positional parameter such as $1, $2, ... is accessed.
|
||||||
|
(This does *not* apply to "$@" and "$*".)
|
||||||
|
|
||||||
|
8. If 'set -u'/'set -o nounset' is active, then the shell now errors out
|
||||||
|
if $! is accessed before the shell has launched any background process.
|
||||||
|
|
||||||
|
9. The 'print', 'printf' and 'echo' builtin commands now return a nonzero
|
||||||
|
exit status if an input/output error occurs.
|
||||||
|
|
||||||
|
10. The 'unalias' builtin will now return a non-zero status if it tries to
|
||||||
|
remove a previously set alias that is not currently set.
|
||||||
|
|
||||||
|
____________________________________________________________________________
|
||||||
|
|
||||||
KSH-93 VS. KSH-88
|
KSH-93 VS. KSH-88
|
||||||
|
|
||||||
|
|
||||||
The following is a list of known incompatibilities between ksh-93 and ksh-88.
|
The following is a list of known incompatibilities between ksh-93 and ksh-88.
|
||||||
I have not include cases that are clearly bugs in ksh-88. I also have
|
I have not included cases that are clearly bugs in ksh-88. I also have
|
||||||
omitted features that are completely upward compatible.
|
omitted features that are completely upward compatible.
|
||||||
|
|
||||||
1. Functions, defined with name() with ksh-93 are compatible with
|
1. Functions, defined with name() with ksh-93 are compatible with
|
||||||
|
|
|
@ -6,16 +6,13 @@ ksh-93 has been compiled and run on several machines with several
|
||||||
operating systems. The end of this file contains a partial list of
|
operating systems. The end of this file contains a partial list of
|
||||||
operating systems and machines that ksh-93 has been known to run on.
|
operating systems and machines that ksh-93 has been known to run on.
|
||||||
|
|
||||||
The layout of files for ksh-93 has changed somewhat since ksh-88,
|
Most of the source code for ksh is in the src/cmd/ksh93/sh
|
||||||
the last major release. Most of the source code for ksh remains in
|
directory. For information on what's where, see the file DESIGN.
|
||||||
the sh directory. However, the shell editing and history routines
|
|
||||||
are in the edit sub-directory. The code for shell built-ins is
|
A new '-o posix' shell option has been added to ksh 93u+m that makes the
|
||||||
in the bltins directory. The data directory contains read-only
|
ksh language more compatible with other shells by following the POSIX
|
||||||
data tables and messages that are used by the shell. The include
|
standard more closely. See the manual page for details. It is enabled by
|
||||||
files remain in the include directory and the shlib directory
|
default if ksh is invoked as sh, otherwise it is disabled by default.
|
||||||
is gone. The features directory replaces the older install
|
|
||||||
directory. The method for generating systems specific feature
|
|
||||||
information has changed substantially.
|
|
||||||
|
|
||||||
The Makefile file contains several compilation options that can be set
|
The Makefile file contains several compilation options that can be set
|
||||||
before compiling ksh. Options are of the form SHOPT_option and become
|
before compiling ksh. Options are of the form SHOPT_option and become
|
||||||
|
@ -82,7 +79,6 @@ The following compile options are set automatically by the feature testing:
|
||||||
DEVFD Set when /dev/fd is a directory that names open files.
|
DEVFD Set when /dev/fd is a directory that names open files.
|
||||||
SHELLMAGIC
|
SHELLMAGIC
|
||||||
Set on systems that recognize script beginning with #! specially.
|
Set on systems that recognize script beginning with #! specially.
|
||||||
VPIX Set on systems the have /usr/bin/vpix program for running MS-DOS.
|
|
||||||
|
|
||||||
|
|
||||||
In most instances, you will generate ksh from a higher level directory
|
In most instances, you will generate ksh from a higher level directory
|
||||||
|
@ -107,9 +103,6 @@ a script. ksh93 is able to recognize files in this format and process
|
||||||
them as scripts. You can use shcomp to send out scripts when you
|
them as scripts. You can use shcomp to send out scripts when you
|
||||||
don't want to give away the original script source.
|
don't want to give away the original script source.
|
||||||
|
|
||||||
It is advisable that you put the line PWD=$HOME;export PWD into the
|
|
||||||
/etc/profile file to reduce initialization time for ksh.
|
|
||||||
|
|
||||||
To be able to run setuid/setgid shell scripts, or scripts without read
|
To be able to run setuid/setgid shell scripts, or scripts without read
|
||||||
permission, the SUID_EXEC compile option must be on, and ksh must be installed
|
permission, the SUID_EXEC compile option must be on, and ksh must be installed
|
||||||
in the /bin directory, the /usr/bin directory, the /usr/lbin directory,
|
in the /bin directory, the /usr/bin directory, the /usr/lbin directory,
|
||||||
|
@ -125,10 +118,10 @@ or $ENV file when it the real and effective user/group id's are not
|
||||||
equal.
|
equal.
|
||||||
|
|
||||||
The tests sub-directory contains a number of regression tests for ksh.
|
The tests sub-directory contains a number of regression tests for ksh.
|
||||||
To run all these tests with the shell you just built, go to the tests
|
To run all these tests with the shell you just built, run the command
|
||||||
directory and run the command
|
bin/shtests
|
||||||
SHELL=$dir/ksh $dir/ksh shtests
|
For help and more options, type
|
||||||
where dir is the directory of the ksh you want to test.
|
bin/shtests --man
|
||||||
|
|
||||||
The file PROMO.mm is an advertisement that extolls the virtues of ksh.
|
The file PROMO.mm is an advertisement that extolls the virtues of ksh.
|
||||||
The file sh.1 contains the troff (man) description of this Shell.
|
The file sh.1 contains the troff (man) description of this Shell.
|
||||||
|
@ -165,66 +158,38 @@ this translate() function send mail to the address below.
|
||||||
|
|
||||||
Please report any problems or suggestions to:
|
Please report any problems or suggestions to:
|
||||||
|
|
||||||
dgk@research.att.com
|
https://github.com/ksh93/ksh
|
||||||
|
|
||||||
|
|
||||||
ksh93 has been compiled and alpha tested on the following. An asterisk
|
ksh 93u+m 1.0.0 has been compiled and alpha tested on the following.
|
||||||
signifies that ksh has been installed as /bin/sh on this machine.
|
An asterisk signifies minor regression test failures (one or two minor
|
||||||
|
things amiss), two asterisks signify moderate regression test failures
|
||||||
|
(some functionality does not work), and three asterisks signify serious
|
||||||
|
failures (crashes, and/or essential functionality does not work).
|
||||||
|
|
||||||
* Sun OS 4.1.[123] on sparc.
|
* DragonFly BSD on x86_64
|
||||||
Sun OS 4.1.1 on sun.
|
FreeBSD on x86_64
|
||||||
Solaris 2.[1-9] on sparc.
|
GNU/Linux: CentOS on x86_64
|
||||||
Solaris 2.[4-8] on X86.
|
GNU/Linux: Debian on x86_64
|
||||||
HP/UX 8 on HP-9000/730.
|
GNU/Linux: Gentoo on i386
|
||||||
HP/UX 9 on HP-9000/730.
|
GNU/Linux: NixOS on x86_64
|
||||||
HP/UX 10 on HP-9000/857.
|
GNU/Linux: Slackware on x86_64
|
||||||
HP/UX 11 on pa-risc.
|
GNU/Linux: Ubuntu on x86_64
|
||||||
System V Release 3 on Counterpoint C19
|
*** HP-UX 11 on pa-risc
|
||||||
System V Release 4 on AT&T Intel 486.
|
* illumos: OmniOS 2020-08-19 (gcc) on x86_64
|
||||||
System V Release 4 on NCR 4850 Intel 486.
|
macOS 10.14.6 (Mojave) on x86_64
|
||||||
IRIX Release 4.0.? System V on SGI-MIPS.
|
*** NetBSD on x86_64
|
||||||
IRIX Release 5.1 System V on SGI-MIPS.
|
** OpenBSD on x86_64
|
||||||
IRIX Release 6.[1-5] System V on SGI-MIPS.
|
* Solaris 11.4 (gcc) on x86_64
|
||||||
System V Release 3.2 on 3B2.
|
Solaris 11.4 (Solaris Studio 12.5 cc) on x86_64
|
||||||
UTS 5.2.6 on Amdahl 3090,5990,580.
|
*** Windows 7 using Cygwin on x86
|
||||||
System V Release 3.2 on i386.
|
|
||||||
SMP_DC.OSx olivetti dcosx MIServer-S 2/128.
|
|
||||||
SMP_DC.OSx Pyramid dcosx MIServer-S 2/160 r3000.
|
|
||||||
4.3BSD on Vax 8650.
|
|
||||||
AIX release 2 on RS6000.
|
|
||||||
AIX 3.2 on RS6000.
|
|
||||||
Linux 1.X on Intel
|
|
||||||
Linux 2.X on Intel
|
|
||||||
Linux 2.X on Alpha
|
|
||||||
Linux 2.X on Alpha
|
|
||||||
Linux 2.X on OS/390
|
|
||||||
Linux 2.X on sparc
|
|
||||||
Linux 2.4 on intel itanium 64
|
|
||||||
Linux Slackware on sparc64
|
|
||||||
* Linux ARM on i-PAQ
|
|
||||||
OSF1 on DEC alpha.
|
|
||||||
OSF4 on DEC alpha.
|
|
||||||
UMIPS 4.52 on mips.
|
|
||||||
BSD-i [2-4] on X86.
|
|
||||||
OpenBSD on X86
|
|
||||||
NetBSD on X86
|
|
||||||
FreeBSD on X86
|
|
||||||
NeXT on Intel X86.
|
|
||||||
NeXT on HP.
|
|
||||||
* Windows NT using UWIN on X86
|
|
||||||
* Windows NT using UWIN on alpha
|
|
||||||
Windows NT using Cygwin on X86
|
|
||||||
Windows NT with NutCracker libraries.
|
|
||||||
Windows NT with Portage libraries.
|
|
||||||
Windows 3.1 using custom C library.
|
|
||||||
OpenEdition on MVS
|
|
||||||
Darwin OS X on PPC
|
|
||||||
MVS on OS 390
|
|
||||||
SCO Openserver 3.2 on X86
|
|
||||||
Unixware 7 on X86
|
|
||||||
|
|
||||||
Good luck!!
|
Good luck!!
|
||||||
|
|
||||||
|
The ksh 93u+m contributors
|
||||||
|
https://github.com/ksh93/ksh
|
||||||
|
|
||||||
|
Originally written by:
|
||||||
David Korn
|
David Korn
|
||||||
dgk@research.att.com
|
dgk@research.att.com
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue