1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 19:52:20 +00:00
cde/lib/package/ast-ksh.pkg
Johnothan King a065558291
Fix more compiler warnings, typos and other minor issues (#260)
Many of these changes are minor typo fixes. The other changes
(which are mostly compiler warning fixes) are:

NEWS:
- The --globcasedetect shell option works on older Linux kernels
  when used with FAT32/VFAT file systems, so remove the note about
  it only working with 5.2+ kernels.

src/cmd/ksh93/COMPATIBILITY:
- Update the documentation on function scoping with an addition
  from ksh93v- (this does apply to ksh93u+).

src/cmd/ksh93/edit/emacs.c:
- Check for '_AST_ksh_release', not 'AST_ksh_release'.

src/cmd/INIT/mamake.c,
src/cmd/INIT/ratz.c,
src/cmd/INIT/release.c,
src/cmd/builtin/pty.c:
- Add more uses of UNREACHABLE() and noreturn, this time for the
  build system and pty.

src/cmd/builtin/pty.c,
src/cmd/builtin/array.c,
src/cmd/ksh93/sh/name.c,
src/cmd/ksh93/sh/nvtype.c,
src/cmd/ksh93/sh/suid_exec.c:
- Fix six -Wunused-variable warnings (the name.c nv_arrayptr()
  fixes are also in ksh93v-).
- Remove the unused 'tableval' function to fix a -Wunused-function
  warning.

src/cmd/ksh93/sh/lex.c:
- Remove unused 'SHOPT_DOS' code, which isn't enabled anywhere.
  https://github.com/att/ast/issues/272#issuecomment-354363112

src/cmd/ksh93/bltins/misc.c,
src/cmd/ksh93/bltins/trap.c,
src/cmd/ksh93/bltins/typeset.c:
- Add dictionary generator function declarations for former
  aliases that are now builtins (re: 1fbbeaa1, ef1621c1, 3ba4900e).
- For consistency with the rest of the codebase, use '(void)'
  instead of '()' for print_cpu_times.

src/cmd/ksh93/sh/init.c,
src/lib/libast/path/pathshell.c:
- Move the otherwise unused EXE macro to pathshell() and only
  search for 'sh.exe' on Windows.

src/cmd/ksh93/sh/xec.c,
src/lib/libast/include/ast.h:
- Add an empty definition for inline when compiling with C89.
  This allows the timeval_to_double() function to be inlined.

src/cmd/ksh93/include/shlex.h:
- Remove the unused 'PIPESYM2' macro.

src/cmd/ksh93/tests/pty.sh:
- Add '# err_exit #' to count the regression test added in
  commit 113a9392.

src/lib/libast/disc/sfdcdio.c:
- Move diordwr, dioread, diowrite and dioexcept behind
  '#ifdef F_DIOINFO' to fix one -Wunused-variable warning and
  multiple -Wunused-function warnings (sfdcdio() only uses these
  functions when F_DIOINFO is defined).

src/lib/libast/string/fmtdev.c:
- Fix two -Wimplicit-function-declaration warnings on Linux by
  including sys/sysmacros.h in fmtdev().
2021-04-08 19:58:07 +01:00

89 lines
3.4 KiB
Text

ast-ksh :PACKAGE: ksh93 libast libcmd libcoshell libsum libdll
:COVERS: ksh
:LICENSE: *.open
:CATEGORY: shells
:INDEX: ksh and support libraries
:DESCRIPTION:
The AT&T Software Technology ast-ksh package from AT&T Research
contains ksh and support libraries. This is the minimal set of
components needed to build ksh.
:DETAILS: cyg
:README:
This package installs a standalone ksh93 executable ksh93.exe
and its man page ksh93.1. If /bin/ksh.exe does not exist then
these symlinks
/bin/ksh.exe => ksh93.exe
/usr/share/man/man1/ksh93.1 => ksh.1
are created. This allows alternative ksh implementations,
e.g., /bin/pdksh.exe, to be selected by changing the ksh.exe
and ksh.1 symbolic links. In addition, ksh and ksh93 paths are
added to /etc/shells if not already present.
$()
Each builtin or special command accepts the --man and --html
options to show the man page on the standard error. The --???
option describes the self documenting options available to all
builtin and special commands.
$()
The standlone ksh is statically linked with the ast libcmd
library which provides several builtin versions of /bin
commands. "builtin | grep /opt/ast/bin" lists the libcmd
builtins on the standard output. /opt/ast/bin/FOO accesses
the FOO builtin, whether the /opt/ast/bin directory exists
or not. "builtin FOO" allows /opt/ast/bin/FOO to be accessed
as FOO, bypassing the $PATH setting. To enable all libcmd
builtins do one of the following:
(a) create the directory /opt/ast/bin and the file
/opt/ast/bin/.paths with this line
BUILTIN_LIB=.
and place /opt/ast/bin before /bin and /usr/bin in $PATH
(this will affect all ksh subshells and scripts)
(b) run "builtin $( builtin | sed -e '/\//!d' -e 's,.*/,,' )"
(this will affect only the current shell)
Some scripts may run significantly faster with libcmd builtins
enabled.
$()
The ast library checks the DOSPATHVARS environment variable
for variable path values to convert to and from native windows
format when cross-executing between cygwin and non-cygwin
programs. The value is a space separated list of environment
variables to convert. PATH is handled by cygwin so it is not
converted by the ast library.
$()
The ast-ksh cygwin source package provides a bootstrap build
environment that is not suited for an edit/build/debug cycle.
If you want to explore and modify the source then you should
install the (non-cygwinized) ast-base package which includes
AT&T nmake. With ast-base you will also be able to regenerate
the ast-ksh cygwin source and binary packages.
$()
For more information on ksh and other AT&T ast tools see
http://www.research.att.com/sw/download/
:EXPORT:
SHOPT_CMDLIB_DIR=1
bin/ksh93.exe :INSTALL: bin/ksh.exe
share/man/man1/ksh93.1 :INSTALL: man/man1/sh.1
:POSTINSTALL:
if [ ! -e /bin/ksh.exe ]
then ln -fs ksh93.exe /bin/ksh.exe
ln -fs ksh93.1 /usr/share/man/man1/ksh.1
else echo "/bin/ksh.exe already exists"
fi
if [ -f /etc/shells ]
then for i in /bin/ksh93 /bin/ksh /usr/bin/ksh93 /usr/bin/ksh
do if grep $i /etc/shells >/dev/null 2>&1
then echo "$i already in /etc/shells"
else echo $i >> /etc/shells
echo "$i added to /etc/shells"
fi
done
else echo "no /etc/shells file"
fi
exit 0
:TEST: bin/ksh
KSH=$<; cd src/cmd/ksh93/tests; CYGWIN="$$CYGWIN ntsec binmode" SHELL=$$KSH $$KSH shtests