The sh_access was defined to two arguments
Made a workaround to not use the sh_access
that was outputting the error.
Not ideal, but it will hopefully compile on Arch Linux
Also added mksh for compatibility
Ksh is unmaintained in the Arch User Repository
Signed-off-by: Nilton Perim Neto <niltonperimneto@gmail.com>
Fix many -Wint-conversion errors such as the example below, including
an aso atomics error.
connect.c:87:12: error: incompatible pointer to integer conversion initializing 'LONG' (aka 'int') with an expression of type 'void *' [-Wint-conversion]
DB_ADDR mdba = NULL; /* db address of current member record */
^ ~~~~
This commit upgrades ksh93 to the latest version. Some minor changes
were required in the dtkcmds.c to make this work.
Most of the changes were in Makefile.am - primarily ensuring that
SHOPTS_* defines matched between dtksh and ksh93 builds, and that
ksh93 was actually told about them :)
The SHOPTS_* defines need to be assigned as the integer 1 as well, or
various preprocessor checks in ksh93 would fail.
Also:
- got rid of SUIDEXECDEFINES - this is a holdover from the Imake days
and was never defined anyway.
- removed some SHOPT_* defines that no longer existed.
- do not pass CFLAGS to the ksh build at all - no need to complicate
things.
For the BSD's we do not want to pass CFLAGS since it includes a
-I/usr/local/incude directive.
This breaks ksh's iconv detection due to the weird way in which iconv
seems to be handled on the BSD's - both a libc impl (preferred), and a
possibly external GNU iconv impl installed in /usr/local.
/usr/local/include is added to CFLAGS by the X11/Motif detection logic
- since that is where all of the needed headers are on the BSDs.
One of the patches from Martijn Decker added CFLAGS to the ksh93 build
CCFLAGS which made this problem show up.
So until/unless that is fixed in ksh93, we will avoid sending
anything to the ksh build system except for SUIDEXECDEFINES
Patch from current ksh93 maintainer <https://github.com/ksh93/ksh>.
cde/programs/dtksh/ksh93/**:
- Upgraded. A load of bugs fixed, some minor features added.
See NEWS from 2021-02-01 upwards.
cde/programs/dtksh/Makefile.am:
- Don't cd into ksh93 any more to invoke the package or shtests
scripts; they now automatically find their directories.
- Pass $(CFLAGS) to build ksh with optimisation.
- Remove -D_std_malloc flag as vmalloc is now deprecated and disabled
by default.
- Add a 'make check' target to Makefile.am that runs the ksh93
regression tests on dtksh to make sure the additions don't interfere
with anything. It skips running the tests with shcomp because CDE
doesn't use that. The tests all pass here on Slackware 14.2. :-)
cde/programs/dtksh/init.patch:
- Removed; I've upstreamed it. It was the only one that wasn't upstreamed
yet, and more code cleanups are coming, breaking downstream patches. If
something needs updating, just email me a diff.
cde/programs/dtksh/dtkcmds.h:
- Update the ADDBUILTIN macro to remove the __PROTO__ macro use. The
proto(1) tool, responsible for all such pre-C89 K&R C compatibility
voodoo, has been removed, so that macro is no longer defined.
cde/programs/dtksh/setup.sh:
- Workaround script removed. I rewrote 'bin/package flat make' in a way
that works correctly and changed Makefile.am to use that instead.
Hope this helps. Happy new year.
Shell isn't portable, so upstream ksh93 has a "flat" function that we can use
to put binaries in a static place that doesn't require a shell command. We still
do need an intermediate setup.sh shell script due to a bug in ksh that object
files aren't being put in lib, and FEATURE not in include. We also cut out some
unused symbols, and a hpux specific implementation of dynlib (new hpux should
conform to the posix implementation anyhow.)
We can reduce our differences from upstream ksh by simply using their
ERROR_translate() function instead of our janky and obsolete msg_translate,
we also move DtGetMessage() to msgs.c and lockedfiledescriptors and,
unlockfiledescriptors to extra.c to lessen modifications to init.c, which
all changes will hopefully be moved elsewhere in the future