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.
This has meant very little for a long time as configure.ac just
hardcoded these values depending on the current OS versions at the
time.
The only place where this is really 'needed' is XlationSvc.c in DtSvc
so that differences between locale specifications on various versions
of an OS can be accounted for. So for now, we just define those when
building DtSvc.
We could probably safely remove them as well with an update to the
Xlate locale DB to remove ancient cruft we don't care about anymore.
For various other modules, like dtlogin, dtsession, etc we just use
the code that was already being used due to the hardcoded values we've
had for the last 10-ish years.
OS_VERSION was used with a '#if defined(sun)', but since it was never
set anywhere it just omitted that block. If the block turns up to be
broken on sun systems, then someone will fix it properly.
In previous versions of CDE (<2.5.0), these were directories with
en_US symlinked to them. Attempting to do a 'make install' with 2.5.0
would yield errors since only a non-recursive 'rm' was being done.
On 2.5.0+, these are symlinks to the en_US versions now.
Previously we would fail in some parts of the code if we did not have a
premade configuration, now we use any code that was marked as Linux, BSD and
Solaris as our basis in order to support building unknown Unix systems.
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.