Fix localized build on OpenBSD.

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.
Include stdlib.h in cde/config/imake/ccimake.c

stdlib.h defines exit(3) on Linux systems.
Account for multilib Linux installations in imake.

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.
Fix basic compiler warnings in ccimake.c

main() always returns an int.
Use mkstemp() and handle /usr/lib64 in imake.c

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.
Simple compiler warning fixes in programs/dthelp.
Merge branch 'master' of git://git.code.sf.net/p/cdesktopenv/code into lucid
dtcalc: Resolve "missing sentinel in function call [-Wformat]" warnings

Caused by XtVaGetValues() and XtVaSetValues() variable arguments lists
needing to be terminated by NULL not 0.
dtcalc: Resolve "format not a string literal and no format arguments [-Wformat-security]" warnings.

Fix warnings related to secruity concerns on varargs functions. By specifying
"%s" on single string calls to sprintf() (and related) it's not possible to
have a % in the input string causing random data to be read off the stack.
libcsa: Warning prevention

Remove 'implicit declaration' warnings by included correct ANSI C headers.
Correct some format strings for long ints.
lib/DtHelp: Include <stdio.h> to prevent warnings about implicit declartion of free()
libtt: resolve implicit delaration of free() and exit() warnings
examples/tt now runs on FreeBSD
Use FreeBSD-specific invocation of /bin/ps
FreeBSD: scan /usr/local/lib/X11/fonts/ for fontpath
64bit: Fix crash in dtexec

No ANSI prototype for malloc() caused
the returned pointer to be truncated
to 32 bits.
Use KORNSHELL variable instead of /bin/ksh

This patch removes instances of hardcoded
invocation of /bin/ksh and allows to
replace it with, for, example,
/usr/local/bin/ksh93

Also "ksh93" is accepted whenever "ksh" is.

Tested using the following /bin/ksh:

----8<----
WHAT=`ps -o command= -p $PPID`
msg="Something tried to call /bin/ksh: $PPID: $WHAT"
print -u2 "$msg"
logger user.warn "$msg"
exit 99
----8<----
(Warning: first two lines are FreeBSD specific)

Scripts from Makefiles should now be executed either
with

$(KORNSHELL) korn-shell-script

or

$(SHELL) bourne-shell-script

therefore #!/bin/ksh has not been changed everywhere.

/usr/dt/bin/ scripts have been converted (e.g. Xsession)

Whenever possible Imake and CPP facilities have been used.

For C and C++ programs KORNSHELL needs to be defined to
"/path/to/your/ksh" (with quotes) so that it can make
a valid C constant.

Therefore, when adding KORNSHELL to Imakefile for C files,
you have to add

CXXEXTRA_DEFINES = -DKORNSHELL=\"$(KORNSHELL)\"

or similar (for example, see programs/dtprintinfo)

But for simple shell script substitution we usually change

 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
                     -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP)

to:

 LOCAL_CPP_DEFINES = -DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP) \
                     -DCDE_INSTALLATION_TOP=$(CDE_INSTALLATION_TOP) \
                     -DCDE_LOGFILES_TOP=$(CDE_LOGFILES_TOP) \
                     -DKORNSHELL=$(KORNSHELL) \
                     -DXPROJECTROOT=X11ProjectRoot

since we don't want quotes for shell scripts.
FreeBSD: Use -O instead of -O2
Fix udbParseLib.awk so it doesn't generate warnings with gawk.

Tested this change with both gawk and nawk and it worked fine.  If
the extra escape character is present and gawk is used, you'll get
warnings from gawk telling you it's ignoring the escape sequence
and just treating it as the character to begin with.
Add missing includes [for modern systems] to lndir.c