Commit Graph

221 Commits

Author SHA1 Message Date
Marcin Cieslak bd70163b09 FreeBSD: Fix dtlogin failsafe session
We need to have /usr/local as the proper
X11 prefix to start mwm and xterm
2012-09-07 17:32:52 -06:00
Jon Trulson 096f96be24 dtlogin: enable building on FreeBSD 2012-09-06 12:36:14 -06:00
Marcin Cieslak 421b5061a6 Allow building on FreeBSD
- build shared libraries with major number only (libtt.so.2)
- don't build dtlogin and dtinfo

FreeBSD support for the installer:
- work around awk issue
- create post_install FreeBSD scripts
- install only cmsd on /etc/inetd.conf
  skip dtspc and ttdbserver for now

Note to users: please check
if you are affected by awk bug
in udbParseLib.awk if you can.
2012-09-06 11:17:43 -06:00
Ulrich Wilkens 9a34624e25 Fix for __va_copy on FreeBSD i386. 2012-09-05 19:28:31 -06:00
Ulrich Wilkens 33da5fa944 Fixes for dtlogin and dtcm on FreeBSD. 2012-09-05 19:27:45 -06:00
Jon Trulson a29fc20957 message catalogs: fix comment lines, also remove linux hack in merge.c
According to the spec, blank lines in message catalogs or lines
beginning with '$ ' are valid comments.

However, there were many cases where lines in the message catalogs
contained just a single '$', without the required space after it.

Under linux, this caused 126766 error lines (in my builds) of the
form:

... unknown directive `': line ignored

This also causes gencat to exit with a non-0 exit code.  Even though
gencat says it ignores the line, it really doesn't.

An early porting change to programs/localized/util/merge.c was made to
ignore this return value on linux.  This hack has now been removed.

Build logs are a lot smaller and cleaner now.
2012-09-03 15:12:57 -06:00
Peter Howkins a1bec3d0e1 dtpdmd: Resolving warnings. 2012-09-01 20:37:02 +01:00
Peter Howkins 971e3280d7 dtpdm: Resolve 4 compiler warnings 2012-08-31 21:41:32 +01: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 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
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
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
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
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
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
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