Commit Graph

389 Commits

Author SHA1 Message Date
Peter Howkins 53e7adfc5f build: linux.cf, remove the space in the -isystem include of the X11 headers
this was causing build failures on the make depend step.
2012-08-31 19:07:47 +01:00
Peter Howkins 1c7c33aa71 build: on linux include the X11 and Xm headers with -isystem rather than -I,
this means the compiler treats them as system headers and does not give you
excessive warnings from them. This is used because X11 does not like the
-ansi and -pedantic warnings that CDE is compiled with.
2012-08-31 18:35:20 +01:00
Jon Trulson 274bea6c1a include: remove includes:: XmPrivate.h from includes Imakefile
Having this dependancy in here is a problem.  Depending on how the src
is packaged, or, unpacked, an attempt could be made to regenerate this
file, which cannot succeed unless imports/motif is setup to point to a
compiled motif tree.

This file can be manually regenerated by removing XmPrivate.h, and then
doing a 'make XmPrivate.h' in the include/Xm dir.
2012-08-30 20:23:33 -06:00
Jon Trulson 6dd2d8a325 dthelp: fix build failure introduced by commit 71f8af6943
Tsk Tsk Peter :)
2012-08-30 20:22:04 -06:00
Jon Trulson 4620bdb0db dtcm: fix typo introduced by commit ca9da25d44 2012-08-30 20:19:23 -06:00
Marcin Cieslak ceb49b9130 DtWidget: Improve portability of Motif interface
- Add missing includes and prototypes
- Improve type compatibility
- Use <Xm/XmPrivate.h> for unofficial libXm headers

With this patch, dtpad no longer crashes on startup
on FreeBSD/amd64 because of a truncated 64-bit pointer.
2012-08-30 19:43:56 -06:00
Marcin Cieslak 6e37640f11 Fix warnings in dtwm
- Improve pointer/int compatibility
- Include unpublished Dt headers in Dt
- Use <Xm/XmPrivate.h> for unpublished Motif functions

There are still warnings left generated because
ElementValue.parsed_value should really be a union.

There are also some warnings left because of XtPointer
casting and some unused variables and functions.
2012-08-30 19:43:47 -06:00
Marcin Cieslak 8a57173ec2 Introduce <Xm/XmPrivate.h>
We need ANSI C prototypes of certain Motif
functions that are not published in the official
header files.

<Xm/XmPrivate.h> header file contains
the prototypes extracted from the Motif source.

To re-create <Xm/XmPrivate.h>:

1) Make sure you have sources of libXm
(lib/Xm directory of the Motif distribution)
accessible via imports/motif/lib/Xm

2) rm include/Xm/XmPrivate.h

3) make includes
2012-08-30 19:43:11 -06:00
Peter Howkins 237fa4a599 dtpad: Resolve 6 compiler warnings. 2012-08-30 22:40:55 +01:00
Peter Howkins 2a9b4ec67c dtlogin: Resolve 7 compiler warnings. 2012-08-30 22:30:36 +01:00
Peter Howkins 89e76b2e9b dtlogin: Resolve all -Wformat-security warnings 2012-08-30 22:19:49 +01:00
Peter Howkins 97a9c8cbd1 dtimsstart: Resolve 3 compiler warnings. 2012-08-30 22:15:13 +01:00
Peter Howkins b14833740b Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2012-08-30 21:38:11 +01:00
Peter Howkins 71f8af6943 dthelp: Resolve 106 compiler warnings. 2012-08-30 21:37:25 +01:00
Marcin Cieslak ee7caf532b Define AMD64Architecture for FreeBSD 2012-08-30 14:30:49 -06:00
Marcin Cieslak 3ef58433e6 Rudimentary LSBBitOrder for FreeBSD 2012-08-30 14:05:22 -06:00
Jon Trulson a06126dd4c Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2012-08-30 13:53:37 -06:00
Peter Howkins f6bfbcb521 dthello: Resolve 5 compiler warnings. 2012-08-30 19:57:56 +01:00
Peter Howkins 764a0c7e72 dtfile: Remove 97 compiler warnings 2012-08-30 19:54:01 +01:00
Jon Trulson d0b5ebebd9 dthelp/text.c: use snprintf 2012-08-30 12:44:50 -06:00
Peter Howkins ef67cebea5 dtfile: Resolve implicit imcompatible declaration warnings. 2012-08-30 18:25:49 +01:00
Peter Howkins 7546d1a71a dtexec: On Linux use the variation of signal handlers that takes an int arg
Warning Prevention.
2012-08-30 18:18:20 +01:00
Peter Howkins 6315770583 dtdspmsg: Warning prevention 2012-08-30 18:14:15 +01:00
Peter Howkins ce7f5d0862 dtcreate: warning prevention. 2012-08-30 18:07:16 +01:00
Peter Howkins 231b359685 dsdm: Include ansi C headers to prevent implicit incompatible declaration warnings. 2012-08-30 17:59:34 +01:00
Peter Howkins e091b824c1 dtaction: main() returns an int and -Wformat-security fixes 2012-08-30 17:55:43 +01:00
Peter Howkins 55539b71c1 dticon: Fix some warnings related to mixing NULL, 0 and '\0' randomly. 2012-08-30 17:48:26 +01:00
Peter Howkins f737b30289 dtcalc: Fix some warnings related to mixing NULL, 0 and '\0' randomly. 2012-08-30 16:45:52 +01:00
Ulrich Wilkens 5c68d52ce4 Two fixes for dtmail 2012-08-29 20:40:23 -06:00
Ulrich Wilkens 3a28782409 Correction of paths for BSDs 2012-08-29 20:39:02 -06:00
Peter Howkins ca9da25d44 dtcm: Resolve all -Wformat-security warnings. 2012-08-29 20:16:01 +01:00
Peter Howkins 70552cb18d dtsr: include stdlib.h to resolve 20 incompaible implicit declaration warnings. 2012-08-29 18:25:32 +01:00
Peter Howkins fd3a620a68 dtsr: Resolve all -Wformat-security warnings. 2012-08-29 18:21:05 +01:00
Peter Howkins b14d6d0b68 util/dttypes: Resolve -Wformat-security warnings 2012-08-29 18:02:22 +01:00
Peter Howkins ba88e3abe1 dtterm: Resolve -Wformat-security warnings 2012-08-29 16:13:22 +01:00
Peter Howkins 31c2131935 libDtTerm: Resolve all -Wformat-security warnings. 2012-08-27 20:36:59 +01:00
Peter Howkins 93428391db Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2012-08-27 20:25:14 +01:00
Peter Howkins 3911acddf6 libDtSearch: resolve -Wformat-secuirty warning 2012-08-27 20:24:06 +01:00
Marcin Cieslak 64d4207135 Add pax files generated by dtksh to .gitignore
It seems that after changing -O2 to -O for FreeBSD
pax started to build successfully. Interesting.
2012-08-26 19:52:05 -06:00
Peter Howkins 8479d150e2 libtt: Resolve all remaining format-security warnings. 2012-08-26 22:19:27 +01:00
Peter Howkins 8c8a5380ca libtt: Warning prevention
One missing stdlib include and one security warning about not
using varargs func correctly.
2012-08-26 19:48:55 +01:00
David Cantrell f59da7b53e Add missing includes [for modern systems] to lndir.c 2012-08-23 20:39:46 -06:00
David Cantrell 6300831c65 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.
2012-08-23 20:39:46 -06:00
Marcin Cieslak e9a031ac7a FreeBSD: Use -O instead of -O2 2012-08-23 20:01:25 -06:00
Marcin Cieslak 17a33f0430 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.
2012-08-23 20:00:43 -06:00
Marcin Cieslak 98b17d3551 64bit: Fix crash in dtexec
No ANSI prototype for malloc() caused
the returned pointer to be truncated
to 32 bits.
2012-08-23 19:56:43 -06:00
Marcin Cieslak d31fc60fbf FreeBSD: scan /usr/local/lib/X11/fonts/ for fontpath 2012-08-23 19:56:34 -06:00
Marcin Cieslak c3cd844df6 Use FreeBSD-specific invocation of /bin/ps 2012-08-23 19:56:31 -06:00
Marcin Cieslak 724671a2ad examples/tt now runs on FreeBSD 2012-08-22 21:04:30 -06:00
Peter Howkins 8a78cc767e libtt: resolve implicit delaration of free() and exit() warnings 2012-08-22 12:39:25 +01:00