Commit Graph

33 Commits

Author SHA1 Message Date
Jon Trulson 2e7ab68300 dtappbuilder: Coverity (memory corruption) 2014-12-26 14:14:32 -07:00
Ulrich Wilkens 01d6c363fa OpenIndiana and Solaris port 2014-10-28 13:40:11 -06:00
Ulrich Wilkens 42e891d9e7 Resolve many build warnings
This patch fixes many warnings from the beginning of the build up to
and including the depend stage. Nearly all warnings should be gone
even with -Wall.
2014-09-23 17:57:50 -06:00
Jon Trulson 2bf29e5d63 dtappbuilder: abmf.c: more warnings killed 2014-09-20 20:10:01 -06:00
Jon Trulson bf399748ad dtappbuilder/dtcodegen: Fix up some warnings, remove use of sys_errlist[].
Removed all the cases of sys_errlist[], no one should be using that
today.  Also, correct code generation so that declarations like
'Widget w = NULL; Pixmap p = NULL;' etc, aren't produced, which is
wrong.  Use '0', not NULL for these.

This should also correct the 2 mis-definitions of Pixmap that commit
6a9327f2ab attempted to fix in ttsnoop.

dtappbuilder still needs a lot of work.
2014-09-20 16:47:11 -06:00
Jon Trulson 1e2bdf93a8 dtappbuilder: bil_store.c: don't return local variables 2014-04-06 16:59:56 -06:00
Peter Tribble 468d576030 initial illumos port 2014-03-22 16:33:11 -06:00
Ulrich Wilkens d24fd29b52 Fix dtfile and dtterm on NetBSD 2014-03-11 13:06:55 -06:00
Ulrich Wilkens 2712d5f787 NetBSD port 2014-02-22 19:12:19 -07:00
Ulrich Wilkens 8fd8a8a4db Fix dtappbuilder on Linux 2012-10-16 21:04:57 -06:00
Jelle Hermsen b8862cab32 Changed a couple of ifdefs for __FreeBSD__ to CSRG_BASED. These are all clearcut cases. I left the ones I had doubts about, or where I wasn't sure about the OpenBSD side of things to look at later. 2012-10-03 17:06:57 -06:00
James Woodcock 407bb371f2 Remove unnecessary extern modifier from struct declaration. 2012-09-27 18:01:09 -06:00
Ulrich Wilkens 9a34624e25 Fix for __va_copy on FreeBSD i386. 2012-09-05 19:28:31 -06:00
Marcin Cieslak a35975a334 FreeBSD does not need extern char *sys_errlist[]
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.
2012-08-15 15:58:46 -06:00
Jon Trulson ee03634a10 dtbuilder: manually fix up istr.h (from Pascal) since the broken patch had already been reverted. 2012-08-13 19:48:57 -06:00
Pascal Stumpf 1177e21080 WIP to make dtbuilder work on 64bit.
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.
2012-08-13 19:42:44 -06:00
Jon Trulson 3b06b6a6b7 Revert "At least on OpenBSD/amd64, this macro returns a bogus value if its argument is NULL."
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 :)
2012-08-13 18:18:52 -06:00
Pascal Stumpf 0bbd4ff9aa Get rid of malloc.h.
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.
2012-08-12 14:20:58 -06:00
Pascal Stumpf 3718075b7c OpenBSD fixes for DtWidget, dtaction, dtappbuilder. 2012-08-10 14:10:52 -06:00
Jon Trulson 0d2f7866ac At least on OpenBSD/amd64, this macro returns a bogus value if its argument is NULL.
Patch from Pascal Stumpf <Pascal.Stumpf@cubes.de>

So check for this first like the other macros in this file do, and
don't cast an istring to int.
2012-08-09 12:21:43 -06:00
Jon Trulson cf410afbdb dtbuilder: fixup TOG copyrights issue in generated files.
The TOG copyrights were being removed after a rebuild, leaving behind
the scary "RESTRICTED" copyright text that was originally there.

The issue was that the TOG copyrights were not properly embedded
within a 'DTB_USER_CODE_START' code block.

dtcodegen does not preserve any code outside DT_USER_CODE START and
END blocks.

Additionally, these objects are built with -merge by dtcodgen, so the
existing 'RESTRICTED' header within the codeblocks was being retained.
2012-08-03 15:06:56 -06:00
Jon Trulson cdf8003f7c Remove hardcoded CCLINK's in Imakefiles when linking with C++ built libs (DtSvc).
Added proper SharedDtSvcReqs in lnxLib.tmpl and CplusplusLibC in
linux.cf.  This allows the libstdc++ dependancy to be properly
declared for libDtSvc so that it is not neccessary to hardcode 'CCLINK
= g++' in the Imakefiles of programs linking angainst libDtSvc.
2012-06-19 16:27:20 -06:00
Peter Howkins a34f78b798 convert all Imakefile LinuxDistribution to LinuxArchitecture.
(programs part 2)
2012-05-31 13:47:41 +01:00
Peter Howkins 0859109ba0 Linux compilation of dtbuilder (Matthew Howkins) 2012-04-12 17:36:54 +01:00
Peter Howkins ca8ede6c1f Use C++ linker 2012-03-12 16:27:41 +00:00
Peter Howkins fb174a8ec3 Undo previous method and use __va_copy instead. 2012-03-12 16:27:08 +00:00
Peter Howkins 0456158e41 On linux use the va_copy() func for variable arugment copying 2012-03-12 16:24:24 +00:00
Peter Howkins 63f6536c72 Initialise varargs list in the same way as OSF 2012-03-12 16:19:32 +00:00
Peter Howkins 71e364de5c Do not bother trying to redefine the putenv() function 2012-03-12 16:16:16 +00:00
Peter Howkins 53f42b5113 CLK_TCK is considered obsolete in GCC, use CLOCKS_PER_SEC instead 2012-03-12 16:05:21 +00:00
Peter Howkins 5949e1c410 Do not redefine strdup() on Linux 2012-03-12 16:03:06 +00:00
Peter Howkins c884521619 Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Peter Howkins 83b6996daa Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00