tmpnam() usage replaced with mkstemp(). Find a suitable tmp directory
checking the TMPDIR environment variable first, then the P_tmpdir
macro and finally /tmp directly.
On 64-bit Linux platforms, check to see if libc.so exists in /usr/lib64.
If found, use it over /usr/lib/libc.so.
The libc.so file is not always in /usr/lib. On multilib systems, the
file we care about could be in /usr/lib64. Likewise, common Linux
conventions call for 64-bit libraries to go in lib64 directories, so
check there first when on a Linux 64-bit system.
Use the same set of langs as on Linux and FreeBSD (no Japanese), don't
redefine a needed macro as no-op, and unset LC_CTYPE in the environment
when building cat files.
We need to use mkcatdefs to build those.
mkcatdefs needs to be built from the open motif
source tree (localized/util/mkcatdefs.c)
and installed as:
cde/imports/motif/localized/util/mkcatdefs
GetBaseName causes segfaults, because when the pathname
ends in a "/" it returns NULL. This happens when trying
to give a valid filename to dtcreate for an icon.
ProcessExecString thought it was returning an array of size 3; however
in C arrays are second-class and there is no direct way to return an
array like this; GCC warning triggered because it was actually
just returning a pointer to local storage. Fixed using malloc.
Also fix some obviously wrong usages of sizeof, although they were
relatively harmless. A little other warning quieting using 0 instead of
NULL.
This code always buffer overflowed, because exactly 2 bytes
less than were used were allocated. This led to dtcreate
crashing when hitting "Find Set..."
The following font families
(or their aliases) will be used:
-adobe-courier-bold-o-normal--*-
-adobe-courier-bold-r-normal--*-
-adobe-courier-medium-o-normal--*-
-adobe-courier-medium-r-normal--*-
-adobe-helvetica-bold-o-normal--*-
-adobe-helvetica-bold-r-normal--*-
-adobe-helvetica-medium-o-normal--*-
-adobe-helvetica-medium-r-normal--*-
-adobe-symbol-medium-r-normal--*-
-adobe-times-bold-i-normal--*-
-adobe-times-bold-r-normal--*-
-adobe-times-medium-i-normal--*-
-adobe-times-medium-r-normal--*-
-b&h-lucidasans-medium-r-normal-sans-*-
-b&h-lucidatypewriter-bold-r-normal-sans-*-
-b&h-lucidatypewriter-medium-r-normal-sans-*-
The files will be installed in
/usr/dt/config/xfonts/C
This directory should be added to the
X server font path:
xset fp+ /usr/dt/config/xfonts/C
and/or via
FontPath "/usr/dt/config/xfonts/C"
in the "Files" section of the xorg.conf file.
We have
pid_t
wait3(int *status, int options, struct rusage *rusage);
on FreeBSD and we don't need (union wait) handling.
Another good candidate for one #ifdef from imake templates.
We have already OPT_BSD_WAIT in ToolTalk's tt_options.h
Add preprocessor directives not to try
to redefine sys_errlist[] or sys_nerr
There are already definitions:
extern __const char *__const sys_errlist[];
extern __const int sys_nerr;
in <stdio.h>
Actually we should have something like
NeedSysErrlist in imake definitions
to get rid of those #ifdefs.
This code tried to automatically generate the X DISPLAY
from the combination of the hostname and display number;
however 127.0.0.1:0 is normally rejected by X11, so this
technique is no good. Fixes dticon hang on startup, caused by
XOpenDisplay failure leading to this message from tttrace:
tt_default_session_set(0x0x875190=="X 127.0.0.1 0") = 1032 (TT_ERR_ACCESS)
BSD make interrupts shell pipeline after
if it cannot run the command:
rm -f Mrm.msg
ln -s ../../../../imports/motif/localized/de_DE.ISO8859-1/msg/Mrm.msg Mrm.msg
Running mkcatdefs for Mrm.cat with LANG set to de_DE.ISO8859-1
( rm -f Mrm.cat Mrm.tmp.msg; LANG=de_DE.ISO8859-1; export LANG; ../../../../imports/motif/localized/util/mkcatdefs Mrm Mrm.msg -h > Mrm.tmp.msg; gencat Mrm.cat Mrm.tmp.msg; rm -f Mrm.tmp.msg )
../../../../imports/motif/localized/util/mkcatdefs: not found
*** Error code 127
After this, an empty Mrm.tmp.msg is left.
- Const strings referenced by non-const variables.
- Incorrect format specifers for printing addresses
- Unused variables
- Signed comparison to unsigned
Also fix an incorrect enumeration value in a switch statement.
Introduce KORNSHELL make variable to point
to the implementation of the Korn Shell.
Use $(SHELL) or $(KORNSHELL) explicitly for
make programs that do not automatically call
shell scripts from the current directory.
dtksh can be now compiled on FreeBSD. Work in progress.
Needs a real Korn shell to bootstrap as $(KSHELL).
KSHELL is set by default to /usr/local/bin/ksh93
(generic POSIX shell may not work)
Tested on:
FreeBSD 9.0-BETA1 #0 r224912M amd64
Known issues:
xvmstat:
* sleep does not work well (SIGSTOP is delivered)
xpong:
* xpong: line 220: ball1x = max_x * 2.2 / 3 : arithmetic syntax error
* dtksh is rebuilt uncondtionally every time make is invoked
Fixes many, though not all 64bit-warnings. In lots of places, pointers are
cast to ints to be then used as array subscripts. The only way to deal with
this is to change them to long. Additionally, use calloc() to allocate the
int_array in istr.c and drop the (wrong) macro patch to istr.h. Should make
dtbuilder work on 32bit again.
Fixes:
agent.c: In function '_DtCm_init_agent':
agent.c:160: warning: passing argument 5 of 'registerrpc' from incompatible pointer type
agent.c:160: warning: passing argument 6 of 'registerrpc' from incompatible pointer type
agent.c:167: warning: passing argument 5 of 'registerrpc' from incompatible pointer type
agent.c:167: warning: passing argument 6 of 'registerrpc' from incompatible pointer type
This reverts commit 0d2f7866ac.
This causes great mayhem in building/generating dtbuilder .msg files
(corrupting them, and inserting '(nil)' all over the place).
These would cause dtbuilder, and any other program built by dtcodegen
to have screwed up colors, missing callbacks and other mayhem.
This was confirmed by others on the list - reverting this made those
issues go away.
It may be that the int -> long is correct, but the NULL check
certainly does not seem to do what was intended. I'll leave it up to
Pascal to investigate :)