The man page dtksh.1 only refers to the dt extensions. For options,
operands, input files, etc, such man page points to the (k)sh.1 man
page. Since the version of ksh installed with the OS is different from
the one used to build dtksh, the correct documantation of dtksh can be
found only in cde's ksh man page. To avoid any conflict or confusion,
my patch renames cde's ksh.1 as ksh-cde.1
This makes certain changes if you are bold enough to use a different
installation prefix than /usr/dt:
- fix MANDIR output from dtsearchpath
- missing dtopn_* links
- /usr/dt/bin is always needed
- fix DTKORNSHELL output for dtlp
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.
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
All of the dtstyle session save routines used sprintf/snprintf whereby
the destination buffer was also a source buffer, like so:
snprintf(bufr, sizeof(style.tmpBigStr), "%s*Fonts.x: %d\n", bufr, x);
^^^^ ^^ ^^^^
That results in undefined behavior, which mainly meant missing or
currupted XRM resources being saved in the session file for dtstyle.
For reasons I have been unable to determine, running:
dtaction Dthelpview
or Selecting 'Help Manager' from the front panel fails trying to run
the appropriate EXEC_STRING. It get's corrupted in some fashion and
you will usually see an error in ~/.dt/errorlog of the form:
/usr/dt/bin/t/bin/dthelpview: No such file or directory
or more commonly:
/bin/sh: /us: No such file or directory
It is not clear where this corruption is taking place, but it shows up
in 'dttypes' output as well.
This hack simply removes 10 spaces between the two commands that are
run:
EXEC_STRING /bin/sh -c '/usr/dt/bin/dthelpgen -dir $HOME/.dt/help/$DTUSERSESSION; \
/usr/dt/bin/dthelpview -helpVolume browser
'
Which seems to solve (hide) the problem. Finding the real cause of
this will be saved for a later date when more is known and in
particular whether this happens with other ACTIONS.
Ticket #120
Change libtool's shared library version info to 3:0:1 to preserve the
previous library version of 2.1.0.
See https://autotools.io/libtool/version.html for the details on how
libtool handles this versioning info.
See https://verbump.de/ for a handy 'version calculator' using
libtools rules.
These are just minor tweaks to make sure the 'make install' part does
what it is supposed to do. I also removed some commented code in the
dtmail Makefile related to SunOS, as that is not currently suppoerted
anyway.
Hardcoding a -lstdc++ is wrong, since not all OSs are likely to handle
C++ in the same way.
The issue is that libtt needs to be built as a C++ library, so we use
a fake dummy.cxx file to convince libtool to do so instead, rather
than trying to force the issue by linking a (possibly missing)
libstdc++.
Previously in the imake world, changing the CDE version required hand
editing a handful of files.
This commit makes these files into ".in" files. configure.ac now
holds CDE version information -- both in the AC_INIT() call and in the
CDE_VERSION_* variables a few lines down.
Changing the CDE version now involves editing those two locations in
configure.ac only.
Thereafter, a configure run will replace version information in the
following files with the current CDE version:
copyright
doc/common/help/HELPEnt.sgm
include/Dt/Dt.h
lib/tt/bin/ttauth/ttauth.man
This also causes a catch-22 problem with ToolTalk. So the
tooltalk.inc file is gone and the relevant TT Makefiles have been
modified to set and define the TT version in those Makefiles that
actually use it.
The arg that should be on the rhs seems to be commented out for some
reason, and assigning a variable to itself is pointless, so just
comment it out with a comment explaining why.
Many of these were real bugs, like:
if (cond);
do_something
etc...
Others were just cosmetic - like placing the ';' on a separate line to
make the intention clear.
Specifically:
- use libtool so that the top level library contains the actual
objects, and not just the sub-archives, which the linker will just
ignore.
- create the source files via symlinks rather than referencing them
with relative paths. Doing it that way causes a 'make clean' to
delete objects in DtMmdb/ which is wrong.
- fix up utility/ - it seemed to be building more source files than
the original Imakefile listed. Other changes may need to be done
here if similar mistakes were made in other subdirs.
Also, rework the way we build convenience libs for the classes to use
libtool. This fixes some potential linking issues and dependency
checking.
Next up will be to see if we can link and install it, along with it's
message catalogs, resources, etc.