1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-13 19:52:20 +00:00
Commit graph

365 commits

Author SHA1 Message Date
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
Peter Howkins
0b623d4b63 lib/DtHelp: Include <stdio.h> to prevent warnings about implicit declartion of free() 2012-08-22 12:10:10 +01:00
Peter Howkins
f6f54a4037 libcsa: Warning prevention
Remove 'implicit declaration' warnings by included correct ANSI C headers.
Correct some format strings for long ints.
2012-08-22 11:53:08 +01:00
Peter Howkins
20c107bce2 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.
2012-08-22 11:28:36 +01:00
Peter Howkins
7d50721685 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.
2012-08-22 10:44:33 +01:00
David Cantrell
f98d6f41d3 Simple compiler warning fixes in programs/dthelp. 2012-08-21 21:53:33 -04:00
David Cantrell
16c57ad669 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.
2012-08-21 21:51:56 -04:00
David Cantrell
6d46aca1b1 Fix basic compiler warnings in ccimake.c
main() always returns an int.
2012-08-21 21:51:06 -04:00
David Cantrell
8d32067a4a 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.
2012-08-21 10:08:16 -04:00
David Cantrell
929a5f7327 Include stdlib.h in cde/config/imake/ccimake.c
stdlib.h defines exit(3) on Linux systems.
2012-08-21 10:08:03 -04:00
Pascal Stumpf
7ee2f3e80d 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.
2012-08-20 19:56:15 -06:00
Marcin Cieslak
240c89cf6b Add mkcatdefs and book.* to .gitignore 2012-08-19 18:20:29 -06:00
Pascal Stumpf
3629a61f7c Build dtksh on OpenBSD.
This needs ksh93 to bootstrap, available in the openbsd-wip for now as a port,
due to be committed some time soon ...
2012-08-19 18:14:37 -06:00
Pascal Stumpf
b578dca486 OpenBSD still uses GNU iconv, so the second argument to iconv(3) is not const. 2012-08-19 18:13:35 -06:00
Ulrich Wilkens
232a93319b Fix dttypes for BSD systems 2012-08-19 18:12:28 -06:00
Ulrich Wilkens
3bbcda35b9 Find correct system includes and libs on FreeBSD. 2012-08-19 18:08:31 -06:00
Jon Trulson
006a00ed4a Add mkcatdefs program and make the imake changes so it can be used. 2012-08-17 20:11:11 -06:00
Marcin Cieslak
3e2f89956f Build missing Xm.cat Mrm.cat Uil.cat for LANG=C
We need to use mkcatdefs to build those.

mkcatdefs needs to be built from the open motif
source tree (localized/util/mkcatdefs.c)
and installed as:

cde/imports/motif/localized/util/mkcatdefs
2012-08-17 19:50:44 -06:00
Frederic Koehler
f5ac4cf8f9 dtcreate: Replace broken GetBaseName with basename
GetBaseName causes segfaults, because when the pathname
ends in a "/" it returns NULL. This happens when trying
to give a valid filename to dtcreate for an icon.
2012-08-17 19:04:13 -06:00
Frederic Koehler
7d2fee2769 dtcreate: Fix some memory management issues
ProcessExecString thought it was returning an array of size 3; however
in C arrays are second-class and there is no direct way to return an
array like this; GCC warning triggered because it was actually
just returning a pointer to local storage. Fixed using malloc.

Also fix some obviously wrong usages of sizeof, although they were
relatively harmless. A little other warning quieting using 0 instead of
NULL.
2012-08-17 19:03:01 -06:00
Frederic Koehler
c8a5b9671f dtcreate: Fix another buffer overflow issue 2012-08-17 19:02:55 -06:00
Jon Trulson
e7ec2a4bdd Merge branch 'EnvControl-fixes' 2012-08-17 06:01:19 -06:00
Peter Howkins
90376fc6d8 Merge branch 'master' of https://git.code.sf.net/p/cdesktopenv/code 2012-08-17 10:26:09 +01:00
Frederic Koehler
466191d669 dtcreate: Fix major buffer overflow
This code always buffer overflowed, because exactly 2 bytes
less than were used were allocated. This led to dtcreate
crashing when hitting "Find Set..."
2012-08-16 19:25:22 -06:00
Jon Trulson
27d5cc033d DtSvc:EnvControl: Use more modern and less dangerous methods of manipulating the env.
This should work for both linux and the BSD's... It should hopefully
solve the corrupted environment errors Marcin sees on fbsd 9 amd64.
2012-08-16 18:26:50 -06:00