config/cf/bsdLib.rules: Switch -fpic to -fPIC
lib/DtXinerama/Imakefile: Use $(PICFLAGS) instead of -fpic
Several tickets have been opened by users encountering the low 8KiB
GOT limit on SPARC systems running BSD. This change makes CDE builds
on BSD more consistent with those on Linux, where -fPIC has been the
default without any reported issues.
CDE has relied upon catgets() implementations following a relaxed
interpretation of the XPG internationalization standard that ignored
-1, the standard error value returned by catopen, as the catalog
argument. However, this same behavior causes segmentation faults with
the musl C library.
This patch:
- Centralizes (with the exception of ToolTalk) all calls to catopen(),
catgets(), and catclose() through MsgCat within the DtSvc library.
- Prevents calls to catgets() and catclose() that rely upon
undefined behavior.
- Eliminates a number of bespoke catgets() wrappers, including multiple
redundant caching implementations designed to work around a design
peculiarity in HP/UX.
- Eases building CDE without XPG internationalization support by providing
the appropriate macros.
Summary:
cde/config/cf/DtInfo.tmpl - add RISCVArchitecture as little endian
cde/config/cf/Imake.cf - add AArch64Architecture for NetBSD
cde/config/cf/Imake.cf - add RISCVArchitecture for Linux
cde/config/cf/linux.cf - add RISCVArchitecture bit order
cde/lib/DtHelp/Imakefile - add -ljpeg for OpenBSD
These system can support PAM, but it requires a port of the NetBSD
module to do so. As a result, this support is disabled by default.
See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253073 for a
patch to add this support to the OS. Then you can set HasPamLibrary
to YES in the respective .cf files, rebuild CDE, and try it out.
The return value from CanvasRenderer::_dofont is a pointer. It will be passed
to the free function. Ensure that pointer always points to a dynamically
allocated memory to avoid segmentation faults.
To check the log function, add -DLOG_USAGE to the Imakefile then build the
dtterm. There are a logger in the util directory, run it to receive log
messages.
Marco Ivaldi pointed me to some unsafe code in ParseJob.c. I do not
have a sun machine (well, not currently operational anyway), so the
code is not tested. But seriously, this is some horrible code. This
local parser for sun needs to be rewritten!