1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 11:42:21 +00:00
Commit graph

2544 commits

Author SHA1 Message Date
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
Marcin Cieslak
50e6c86bf4 lib/csa: Use ANSI C prototypes
Improve type compatibility and enable
ANSI C prototypes.
2012-08-13 19:24:23 -06:00
Marcin Cieslak
aa12f819dd Cast registerrpc args to xdrproc_t explicitly
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
2012-08-13 19:23:37 -06:00
Marcin Cieslak
706fccb50e NULL is a pointer, not string terminator
Replace some instances of NULL to '\0', when
referring to string terminator.
2012-08-13 19:23:34 -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
Peter Howkins
0ecef859cf Merge branch 'master' of https://git.code.sf.net/p/cdesktopenv/code 2012-08-13 10:31:07 +01:00
Marcin Cieslak
bf8c5e674f Compile ToolTalk on FreeBSD
Fix const correctness problems with OPT_CONST_CORRECT:

tt_xdr_utils.C: In constructor '_Tt_xdr_size_stream::_Tt_xdr_size_stream()':
tt_xdr_utils.C:150: error: invalid conversion from 'bool_t (*)(__rpc_xdr*, long int*)' to 'bool_t (*)(__rpc_xdr*, const long int*)'
tt_xdr_utils.C:151: error: invalid conversion from 'bool_t (*)(__rpc_xdr*, char*, unsigned int)' to 'bool_t (*)(__rpc_xdr*, const char*, u_int)'
tt_xdr_utils.C:159: error: invalid conversion from 'bool_t (*)(__rpc_xdr*, char*, unsigned int)' to 'bool_t (*)(__rpc_xdr*, const char*, u_int)'

tt_entry_pt.C: In function '_Tt_string _tt_entrypt_to_string(_Tt_entry_pt)':
tt_entry_pt.C:455: error: conversion from 'long int' to '_Tt_string' is ambiguous
../../lib/util/tt_string.h:104: note: candidates are: _Tt_string::_Tt_string(int)
../../lib/util/tt_string.h:102: note:                 _Tt_string::_Tt_string(const char*)
2012-08-12 20:57:49 -06:00
Marcin Cieslak
8e80886661 Skip building m-guides and dtksh for FreeBSD 2012-08-12 20:57:48 -06:00
Marcin Cieslak
e1aa4d28cb Improve creation of shared libraries for FreeBSD 2012-08-12 20:57:48 -06:00
Marcin Cieslak
851330b5f5 Adjust cpp location for FreeBSD
cpp was removed from /usr/libexec with FreeBSD 5.0-RELEASE.
Use __FreeBSD_version to tell imake if it's still there.

While here, X.Y.Z versioning ended with FreeBSD 3.0, so
we must be dealing with 2.Y.Z when checking for -lgnumalloc.
2012-08-12 20:57:48 -06:00
Jon Trulson
fa3ad160e4 Fix broken linux builds caused by recent DtHelp/Imakefile jpeg change
A patch from Pascal Stumpf using external jpeg broke linux builds,
since libjpeg needs to be linked in when using a remote jpeg lib.

So, in lnxLib.tmpl, define SharedDtHelpReqs so -ljpeg is used.  Also,
in DtHelp/Imakefile, use proper Arch defines so external jpeg libs are
only used on linux, fbsd, and obsd systems.
2012-08-12 17:31:28 -06:00
Douglas Mencken
2b8bd0743b some tweaks for configRun: add -h/--usage option, use portable print instead of echo \c, etc. 2012-08-12 15:13:36 -06:00
William Schaub
7153a0e3e2 dtcreate: check for TT_ERR_PTYPE the correct way 2012-08-12 14:34:49 -06:00
Pascal Stumpf
3c6a0584dd Use cpp -traditional.
StandardCppOptions do not get respected here, so change the default CppCmd
to cpp -traditional like for FreeBSD.  Helps kill a few warnings.
2012-08-12 14:20:58 -06:00
Pascal Stumpf
72c954e5b3 sym2num: add path to cpp on OpenBSD. 2012-08-12 14:20:58 -06:00
Pascal Stumpf
a1cbcd24db Low-hanging fruit: Fix most warnings in lib/DtSearch.
Most of these are related to missing includes and prototypes as well as
parens/braces.  A few are also potential 64bit issues.
2012-08-12 14:20:58 -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
18a5139d7a Do not use the PID as a way of generating a "random" filename.
This script did not even check for the file's existence prior to cat'ing
random stuff into it.  Ouch.
2012-08-12 14:20:57 -06:00
Pascal Stumpf
aa9ea72bfb Do not use internal libjpeg.
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.
2012-08-12 14:20:57 -06:00
Pascal Stumpf
5a8d2bb16f dtmail actually does work now on OpenBSD due to other changes. 2012-08-12 14:20:36 -06:00
Frederic Koehler
b33cf9fb60 tooltalk: Fix bad assumptions about sizeof(uid_t)
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.
2012-08-12 13:50:34 -06:00
Frederic Koehler
19c7c80aa3 tt (tooltalk): Kill some warnings
Includes some potentially bad pointer/int conversions
2012-08-11 20:13:46 -06:00
Frederic Koehler
5ad7a83985 tttrace: Fix bad usage of va_arg with enums
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.
2012-08-11 20:13:46 -06:00
Pascal Stumpf
71f3ed16f8 Patches for dtscreen, dtsearchpath, dtsession on OBSD.
Do not redefine round(3), and provide a manpath for OpenBSD.
(this is one of the few things that need to be adjusted for other BSDs)
2012-08-11 20:06:44 -06:00
Pascal Stumpf
43bae997c8 OpenBSD patches for ttsnoop.
Mostly adding std:: for strstream interfaces.
2012-08-11 20:06:44 -06:00
Pascal Stumpf
76984653b4 OpenBSD patches for dtpdmd and dtprintinfo.
Casts, #ifdefs, SIGCLD ...
2012-08-11 20:06:44 -06:00
Pascal Stumpf
d418376944 OpenBSD #ifdefs for imake templates for localisations. 2012-08-11 20:06:44 -06:00
Pascal Stumpf
205e26b3ef Make nsgmls compile on OpenBSD.
As far as I can tell, the duplicate instantiations from entmgr_inst.m4 are
unnecessary and only cause compile failures without -fpermissive.
2012-08-11 20:06:43 -06:00
Pascal Stumpf
e3ad7e24e3 Current state of my dtmail work.
Mostly #ifdefs and casts; also, do not redefine strcasestr().  This will
probably be needed for Linux too when compiling without -fpermissive.
2012-08-11 19:53:02 -06:00
Pascal Stumpf
7c3a972d32 Make dtlogin compile on OpenBSD.
Most importantly, we *cannot* do the utmp stuff this code is attempting.
It is SysV-specific.
2012-08-11 19:51:35 -06:00
Pascal Stumpf
a8d5c1f0ba Make dtinfo work on OpenBSD.
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.
2012-08-11 19:48:18 -06:00
Pascal Stumpf
3e4517dc2a OpenBSD patches for dtcalc, dtdocbook, dthelp and dtimsstart. 2012-08-11 19:43:41 -06:00
William Schaub
b17e52a269 dtcreate: Fix double free inside ProcessExecString() 2012-08-11 19:33:22 -06:00
William Schaub
562da5af1b dtcreate: fix exit with TT_ERR_PTYPE and fix several sprintf related segfaults. 2012-08-11 19:32:48 -06:00
Jon Trulson
fdcbdbe0d0 re-enable building of dtmail, except on OpenBSD 2012-08-11 19:26:04 -06:00
Pascal Stumpf
131c7a9e04 Imakefile diffs for OpenBSD. 2012-08-11 19:23:43 -06:00
Chris Wareham
045c80dd78 imake: Convert function prototypes and signatures to ANSI format. 2012-08-10 15:05:06 -06:00
Pascal Stumpf
eaec696ad6 Fixes for dtfile on OpenBSD, plus missing prototypes. Use statfs() on BSD to find out if a file system is NFS. 2012-08-10 14:13:45 -06:00
Pascal Stumpf
57463ec10e OpenBSD fixes for dtcm. There are no global "timezone" and "tzname" symbols on BSD. Apart from that, mainly #ifdefs. 2012-08-10 14:11:54 -06:00
Pascal Stumpf
3718075b7c OpenBSD fixes for DtWidget, dtaction, dtappbuilder. 2012-08-10 14:10:52 -06:00
Pascal Stumpf
8bbf5a7a1b Allow dtterm to at least allocate a pty on OpenBSD. Display is still mangled, however, and it frequently crashes (64bit issue). 2012-08-10 14:08:48 -06:00
Pascal Stumpf
19647809e4 OpenBSD fixes for lib/DtTerm: values.h, #ifdef's and some constants that are not defined on BSD. Also, leave out utmp stuff that does not work on BSD. Note that this terminal allocation does not work properly yet, but this will be fixed later. 2012-08-10 14:07:36 -06:00
Jon Trulson
f5a8836bff historical: mv some old files that we want to preserve out of the top level
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.
2012-08-10 07:17:27 -06:00
Pascal Stumpf
3b77d7c065 Tooltalk fixes for OpenBSD. This consists mainly of #ifdefs, casts and some small type nits. 2012-08-10 06:24:29 -06:00
Pascal Stumpf
3d5a492038 OpenBSD fixes for DtPrint and csa. 2012-08-10 06:18:28 -06:00
Jon Trulson
8b67d1ccba New top level README from Christopher Turkel <turkelchris@aol.com> 2012-08-10 06:09:53 -06:00
Frederic Koehler
44dfebe9d2 dtwm: Cleanup some implicit definitions
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.
2012-08-10 05:54:52 -06:00
Pascal Stumpf
185ec24999 OpenBSD fixed for lib/DtSvc. 2012-08-10 05:51:37 -06:00
Pascal Stumpf
78053ff2a4 SIGPWR is not present everywhere. 2012-08-10 05:44:49 -06:00