This is a non-POSIX/ISO-C header. It is ok to include this on Linux, but it
is obsolete on BSD; FreeBSD even throws an error if you include it with
__STDC__ defined. Every system should nowadays have malloc() defined in
stdlib.h.
Diff is largely mechanical, replacing malloc.h with stdlib.h where it is not
yet included anyway.
Nowadays, OpenMotif is itself linked to libjpeg, so pulling in another
version of it causes symbol size mismatches, not to mention the maintenance
burden and security implications arising from keeping our own copy of libjpeg.
We still need some of the header files provided here because they are internal
to libjpeg and not installed on most distributions.
In part of the tooltalk rpc code (mp_message.c), it was assumed that on
the majority of platforms, sizeof(uid_t)=sizeof(gid_t)=sizeof(long). On
Linux-x64, uid_t is an unsigned int, which makes the code fail: all
tooltalk messages fail to send with an RPC_CANTENCODEARGS at the
rpc-level, and TT_INTERNAL_ERR for the actual program. We instead
change the code to explicitly examine sizeof(uid_t) to see whether it is
int or long sized. This allows tooltalk-dependent functinoality
like logout and multiple calls to dtfile to work.
Enums may be represented with a smaller type than int; however, they are
automatically promoted to int when passed in va_arg lists, just as
short, char, etc. are. GCC thus "knows" that you never want to call
va_arg with an enum type, and instead inserts an abort.
strstream.h is now called "strstream" and is obsolete, but use it anyway until
all code is converted over. This also needs std:: added, at least for GCC
4.2.1. Lastly, when hardcoding the path to perl, /usr/bin/perl should be used
rather than anything else.
Some of these older files just clutter up things and do not contribute
much information that is not historical in nature, so preserve them
in an out of the way location.
Mostly this is adding appropriate #includes and declarations,
but for WmImage.c we also change from using the proper name
for XmeGetMask, rather than the identical but renamed
version _DtGetMask which is not exported in any header.
Patch from Pascal Stumpf <Pascal.Stumpf@cubes.de>
The official POSIX name for this signal is SIGCHLD. Linux probably
has SIGCLD only for SysV compatibility, but BSD does not.
Patch from Pascal Stumpf <Pascal.Stumpf@cubes.de>:
So here are all the patches that deal with the fact that modern
compilers assume different scoping rules for variables declared in for
loops. On Linux, -fpermissive has been added as a compiler flag to
compensate for this old C code, but I think it is the wrong approach.
Sorry, couldn't help sneaking in a || defined(CSRG_BASED) and some casts
needed for other reasons ...
Patch from Pascal Stumpf <Pascal.Stumpf@cubes.de>
Most is just copied from the existing imake installation in
/usr/X11R6. Additionally:
* Allow overriding CDESharedRev, X11ProjectRoot and ProjectRoot
* Add a new define to be able to override MINCLUDESRC too
(this allows me to build CDE without symlinking any include directories)