1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-02-15 04:32:24 +00:00
Commit graph

600 commits

Author SHA1 Message Date
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
Jon Trulson
a128f8e4e4 new dtlogin rc script for linux from David McBrayer <d9j0m.dev@gmail.com> 2012-08-16 17:05:38 -06:00
William Schaub
727b47894c dtdocbook: on some systems SIGLOST = SIGPWR and they should not be in the same case statement. 2012-08-16 16:19:40 -06:00
William Schaub
2532f4a5ba Add support for building 32bit SPARC binaries under Linux. 2012-08-16 16:18:12 -06:00
Marcin Cieslak
0fccc33b17 Provide basic font aliases for FreeBSD
The following font families
(or their aliases) will be used:

-adobe-courier-bold-o-normal--*-
-adobe-courier-bold-r-normal--*-
-adobe-courier-medium-o-normal--*-
-adobe-courier-medium-r-normal--*-
-adobe-helvetica-bold-o-normal--*-
-adobe-helvetica-bold-r-normal--*-
-adobe-helvetica-medium-o-normal--*-
-adobe-helvetica-medium-r-normal--*-
-adobe-symbol-medium-r-normal--*-
-adobe-times-bold-i-normal--*-
-adobe-times-bold-r-normal--*-
-adobe-times-medium-i-normal--*-
-adobe-times-medium-r-normal--*-
-b&h-lucidasans-medium-r-normal-sans-*-
-b&h-lucidatypewriter-bold-r-normal-sans-*-
-b&h-lucidatypewriter-medium-r-normal-sans-*-

The files will be installed in

/usr/dt/config/xfonts/C

This directory should be added to the
X server font path:

   xset fp+ /usr/dt/config/xfonts/C

and/or via

   FontPath         "/usr/dt/config/xfonts/C"

in the "Files" section of the xorg.conf file.
2012-08-16 16:15:52 -06:00
Marcin Cieslak
d8db13985c Fix compiler warnings in dtsession 2012-08-16 16:15:49 -06:00
Peter Howkins
0cbd88018a Merge branch 'master' of https://git.code.sf.net/p/cdesktopenv/code 2012-08-16 15:41:15 +01:00
Marcin Cieslak
ce4004f86b Modern BSDs don't need union wait
We have

pid_t
wait3(int *status, int options, struct rusage *rusage);

on FreeBSD and we don't need (union wait) handling.

Another good candidate for one #ifdef from imake templates.
We have already OPT_BSD_WAIT in ToolTalk's tt_options.h
2012-08-15 15:58:48 -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
Ulrich Wilkens
7bdb847210 Process sgml and man files in doc directory for FreeBSD. 2012-08-15 15:56:03 -06:00
Marcin Cieslak
71ddf025fa FreeBSD updates for dtspcd, dtfile and others
* Add libraries where necesary
* Point to Freetype2 includes for dtfile
* Define default manpath
2012-08-15 12:41:31 -06:00
Peter Howkins
91b33b7158 Merge branch 'master' of https://git.code.sf.net/p/cdesktopenv/code 2012-08-15 17:07:35 +01:00
Frederic Koehler
66e428596b mp_session: Always use global displayname
This code tried to automatically generate the X DISPLAY
from the combination of the hostname and display number;
however 127.0.0.1:0 is normally rejected by X11, so this
technique is no good. Fixes dticon hang on startup, caused by
XOpenDisplay failure leading to this message from tttrace:
tt_default_session_set(0x0x875190=="X 127.0.0.1 0") = 1032 (TT_ERR_ACCESS)
2012-08-14 20:37:59 -06:00
Marcin Cieslak
e8ff159737 const char maze: unbreak ToolTalk build
Follow up to de82eebdd5
2012-08-14 20:37:23 -06:00
Marcin Cieslak
65218337ef Use $(KORNSHELL) for dtksh as well
This commit updates master at de82eebdd5
to include bits from

   Message-Id: <1344951117-33716-3-git-send-email-saper@saper.info>
   http://thread.gmane.org/gmane.comp.desktop.cde.devel/283/focus=301

not included in the

   Message-Id: <1344951117-33716-1-git-send-email-saper@saper.info>
   http://thread.gmane.org/gmane.comp.desktop.cde.devel/283/focus=299

that was commited as d3206f4514

Also remove two generated files from the repository:
	programs/dtksh/ksh93/man/man1/sh.1
	programs/dtksh/ksh93/man/man3/nval.3

Conflicts:

	cde/programs/dtksh/ksh93/Imakefile
2012-08-14 20:37:07 -06:00
Marcin Cieslak
2562c2cbeb Deal with *.tmp.msg after mkcatdefs failure
BSD make interrupts shell pipeline after
if it cannot run the command:

rm -f Mrm.msg
ln -s ../../../../imports/motif/localized/de_DE.ISO8859-1/msg/Mrm.msg Mrm.msg
Running mkcatdefs for Mrm.cat with LANG set to de_DE.ISO8859-1
(  rm -f Mrm.cat Mrm.tmp.msg;  LANG=de_DE.ISO8859-1;  export LANG;  ../../../../imports/motif/localized/util/mkcatdefs Mrm Mrm.msg -h > Mrm.tmp.msg;  gencat  Mrm.cat Mrm.tmp.msg;  rm -f Mrm.tmp.msg  )
../../../../imports/motif/localized/util/mkcatdefs: not found
*** Error code 127

After this, an empty Mrm.tmp.msg is left.
2012-08-14 20:37:03 -06:00
Chris Wareham
de82eebdd5 Have to pass a const char * to function expecting char * here, otherwise it fails to link thanks to the declaration of a stub wth non-const param. 2012-08-14 12:44:20 -06:00
Chris Wareham
e738704385 Fix most of the following classes of warnings in the ToolTalk libraries:
- Const strings referenced by non-const variables.
- Incorrect format specifers for printing addresses
- Unused variables
- Signed comparison to unsigned

Also fix an incorrect enumeration value in a switch statement.
2012-08-14 12:43:44 -06:00
Marcin Cieslak
d6b6353f95 Use $(SHELL) and $(KORNSHELL) for shell scripts
Introduce KORNSHELL make variable to point
to the implementation of the Korn Shell.

Use $(SHELL) or $(KORNSHELL) explicitly for
make programs that do not automatically call
shell scripts from the current directory.
2012-08-14 12:34:41 -06:00
Marcin Cieslak
d3206f4514 Compile dtksh on FreeBSD
dtksh can be now compiled on FreeBSD. Work in progress.

Needs a real Korn shell to bootstrap as $(KSHELL).
KSHELL is set by default to /usr/local/bin/ksh93
(generic POSIX shell may not work)

Tested on:

  FreeBSD 9.0-BETA1 #0 r224912M amd64

Known issues:

xvmstat:
* sleep does not work well (SIGSTOP is delivered)
xpong:
* xpong: line 220:  ball1x = max_x * 2.2 / 3 : arithmetic syntax error
* dtksh is rebuilt uncondtionally every time make is invoked
2012-08-14 12:18:38 -06:00
ibid_ag@lavabit.com
441a25b361 configRun.src: remove -s from inetd cmd, only run inetd if it exists. 2012-08-13 21:14:09 -06:00
Marcin Cieslak
31aaa48344 FreeBSD port: dtsearch, dtterm, dtwidget, dthelp
FreeBSD portability of dtsearch, dtterm, dtwidget, dthelp

Work in progress for dtlogin and dtmail
2012-08-13 19:53:10 -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
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
Jon Trulson
b9ae3ae76e OpenBSD.cf, from Pascal Stumpf 2012-08-10 05:37:12 -06:00
Pascal Stumpf
6fc45220c4 Provide support for installation under OpenBSD. Don't override PATH in the install script, it may hide needed tools, and the location of these binaries is highly OS-dependent anyway.
Also, allow overriding some variables in the install script.
2012-08-09 14:26:45 -06:00
Pascal Stumpf
f9c844aada recognise OpenBSD version 2012-08-09 14:15:42 -06:00
Pascal Stumpf
18dd384068 Rename getline() to not conflict with the standard POSIX interface of the same name. 2012-08-09 14:15:25 -06:00
James Woodcock
d1848610a7 Remove ambiguity in string compare. 2012-08-09 13:55:54 -06:00
James Woodcock
f646b8b1a1 Remove unnecessary extern modifier on struct declarations. 2012-08-09 13:55:54 -06:00
James Woodcock
3f11777812 "ISO C++ forbids declaration of [X] with no type" warning fixes. 2012-08-09 13:55:54 -06:00
Jon Trulson
f8e046ee33 Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2012-08-09 12:56:25 -06:00
Jon Trulson
1f332de27b Use socklen_t where available.
Patch from <Pascal.Stumpf@cubes.de>

This should use socklen_t where available, really ...
2012-08-09 12:27:58 -06:00
Jon Trulson
686bcfadc7 Use SIGCHLD rather than SIGCLD.
Patch from Pascal Stumpf <Pascal.Stumpf@cubes.de>

The official POSIX name for this signal is SIGCHLD.  Linux probably
has SIGCLD only for SysV compatibility, but BSD does not.
2012-08-09 12:24:56 -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
491ff2228f Deal with the fact that modern compilers assume different scoping rules
Patch from Pascal Stumpf <Pascal.Stumpf@cubes.de>:

So here are all the patches that deal with the fact that modern
compilers assume different scoping rules for variables declared in for
loops.  On Linux, -fpermissive has been added as a compiler flag to
compensate for this old C code, but I think it is the wrong approach.

Sorry, couldn't help sneaking in a || defined(CSRG_BASED) and some casts
needed for other reasons ...
2012-08-09 12:18:30 -06:00
Jon Trulson
1bb40f1f0b This adds the basic config bits needed for OpenBSD.
Patch from Pascal Stumpf <Pascal.Stumpf@cubes.de>

Most is just copied from the existing imake installation in
/usr/X11R6.  Additionally:

* Allow overriding CDESharedRev, X11ProjectRoot and ProjectRoot
* Add a new define to be able to override MINCLUDESRC too

(this allows me to build CDE without symlinking any include directories)
2012-08-09 12:11:13 -06:00
Marc Balmer
1d935059fb Fix more sprintf calls. 2012-08-09 11:57:34 -06:00
Marc Balmer
24c0f2010c Build with debug symbols enabled. 2012-08-09 11:54:51 -06:00
Marc Balmer
bb21797684 Use a more robust idiom When converting sprintf() to snprintf()
don't use the idiom

char foo[BUFSIZ];
snprintf(foo, BUFSIZ, ....);

but

char foo[BUFSIZ];
snprintf(foo, sizeo foo, ....);

because this will automatically catch situations where the size of foo
is later changed, e.g. like  foo[BUFSIZ + 8];

Fix another use of sprintf.
2012-08-09 11:52:17 -06:00
Adam Robinson
117258766b Fix for dtmail execution group error 2012-08-09 11:47:11 -06:00
Robert Tomsick
5787b85d52 dtscreen: include stdlib to avoid exit redeclaration
Signed-off-by: Robert Tomsick <robert@tomsick.net>
2012-08-09 11:33:25 -06:00
Robert Tomsick
ab926254fd dtscreen: include stdlib where appropriate
Signed-off-by: Robert Tomsick <robert@tomsick.net>
2012-08-09 11:33:25 -06:00
Robert Tomsick
c12927e208 dthelpview: Util.c include stdlib to avoid redeclaring exit()
Signed-off-by: Robert Tomsick <robert@tomsick.net>
2012-08-09 11:33:25 -06:00
Robert Tomsick
974053aab1 dthelpview: Main.c - Cleanup variable init
Signed-off-by: Robert Tomsick <robert@tomsick.net>
2012-08-09 11:33:25 -06:00
Peter Howkins
1dd2eaf854 Update the sub parts of the main dt/cde version number to 2.2.0, missed from previous version increment patch. 2012-08-09 15:20:53 +01:00
Peter Howkins
d2e1f3158b dtcalc: warning prevention, add <stdlib.h> include for prototype of free() 2012-08-09 12:08:46 +01:00
Peter Howkins
697c1522fb dtcalc: warning prevention, do not use NULL when you mean 0. 2012-08-09 12:07:53 +01:00
Jon Trulson
70e1c5a55a dtaction: Fix unsafe use of sprintf
Patch from Robert Tomsick <robert+cde@tomsick.net>:

I believe this fixes vulnerability #3 from CERT CA-1999-11.[1]  The other
uses of sprintf in DtAction seem to be safe.

[1] https://www.cert.org/advisories/CA-1999-11.html
2012-08-08 20:17:17 -06:00
Jon Trulson
4ac42dd84f dtterm - minor warning fixes
Patch by Robert Tomsick <robert+cde@tomsick.net>
2012-08-08 20:09:40 -06:00
Jon Trulson
facb50dfde DtSvc: Fixes a segfault on Debian squeeze 64 bit and most probably other systems, too.
Patch from Marc Balmer <marc@msys.ch>:

Use strlen, not sizeof, here.  Fixes a segfault on Debian squeeze 64 bit
and most probably other systems, too.
2012-08-08 12:45:40 -06:00
Jon Trulson
0f313d1cb8 libtt: "%wc" is Microsoft extension, not supported in every Std C Library.
Patch from Douglas Mencken <dougmencken@gmail.com>:

"%wc" is Microsoft extension, not supported in every Std C Library. So
if we don't want to print "%wc%wc%wc%wc%..." instead of real chars, we
shall not use it.

Before:

%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wcession[28326]:
_Tt_s_session::s_init(): 1051 (TT_ERR_INTERNAL)!
%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wcession[28326]: waitpid():
No child processes
%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wc%wcession[28326]: child
ttsession exited with status 1

After:

/usr/dt/bin/ttsession[12397]: _Tt_s_session::s_init(): 1051 (TT_ERR_INTERNAL)!
/usr/dt/bin/ttsession[12397]: waitpid(): No child processes
/usr/dt/bin/ttsession[12397]: child ttsession exited with status 1
2012-08-08 12:35:49 -06:00
Jon Trulson
f9c2b3184e DtSvc/dtwm: Fix some implicit declarations of functions by adding appropriate
Patch from Frederic Koehler <f.koehler427@gmail.com>:

These implicit definitions cause segfaults on x64 because
the implicit return type is a 32-bit signed int, rather than a pointer
type.
2012-08-08 11:47:18 -06:00
Jon Trulson
a26b73a1a6 dtwm: Define a final fallback for loading default window manager font
Patch from Frederic Koehler <f.koehler427@gmail.com>:

Define a final fallback for loading default window manager font;
before exiting, forcefully try to load "fixed" font. This is sufficient
to allow systems where fontList is set to an empty list to startup dtwm,
for now.
2012-08-08 11:39:29 -06:00
Jon Trulson
b49872206b libtt: Avoid an infinite loop in ttsession (tooltalk daemon) when /etc/mtab is a symlink, using lstat instead of stat.
Patch from Frederic Koehler <f.koehler427@gmail.com>
2012-08-08 11:36:03 -06:00
Jon Trulson
a7562a8009 dtlogin: don't try to use /dev/mem to get random data on linux/bsd
dtlogin's genauth routines were trying to open and read /dev/mem on
linux and (presumably) bsd systems in order to obtain random data used
in creating an auth key.

This is bad for a variety of reasons.  Newer linux kernels (at least
on 3.2) issue the following warning to the kernel logs:

"Program dtlogin tried to access /dev/mem between 100000->102000."

Now on linux we will use /dev/urandom, and on CSRG_BASED (bsd) systems
we will use /dev/random to obtain some entropy.
2012-08-07 23:22:44 -06:00
Jon Trulson
91011085a4 dtdbcache: remove incorrect comment block and tmpnam_buf var (not used)
With Aaron's fixes to dtdbcache fixing a potential coredump, the
comment block in the write_db() function regarding tmpnam() no longer
applies, and the tmpnam_buf variable is no longer used.

So, remove them :)
2012-08-07 17:43:32 -06:00
Jon Trulson
80f456e3b5 dtdbcache: Remove old code in comments
Patch from Aaron W. Hsu <arcfide@sacrideo.us>
2012-08-07 16:56:11 -06:00
Jon Trulson
04b366b09c dtdbcache: Use mkstemp() instead of tmpnam() to avoid bad interactions
Patch from Aaron W. Hsu <arcfide@sacrideo.us>
2012-08-07 16:52:26 -06:00
Jon Trulson
f42fa885be Fix SIGSEGV while compiling dthelp on 64 bit systems.
Patch from Ulrich Wilkens <mail@uwilkens.de>

I have a little patch for a problem that I found when I tried to
compile dthelp on 64bit FreeBSD. It could also be a problem on other
64bit systems.  The problem is that the program context compiles but
fails running with segmentation fault.

context uses the function m_malloc() which is missing a correct
prototype sometimes. Then it's treated to return int instead of void *
. On 64bit systems this cuts off the higher 32 bits because void * is
64bit whereas int is only 32bit.
2012-08-06 22:42:34 -06:00
Jon Trulson
e47bffb106 Imake.cf/linux.cf: Add arm support.
Patch from IRC user wschaub.
2012-08-06 22:38:54 -06:00
Jon Trulson
606df517f0 dtprintinfo: Fix SIGSEGV in dtprintinfo (passing NULL as first argument to catgets).
Patch from Douglas Mencken <dougmencken@gmail.com>:

The issue is that MESSAGE tries to invoke catgets with NULL first
parameter, which is dereferenced inside catgets (Std C Library
function) without checking, from catgets.c source:

if (catalog->name_ptr[idx + 0] == (u_int32_t) set
          && catalog->name_ptr[idx + 1] == (u_int32_t) message)

On the other hand, there's a special value: -1 (cast to nl_catd),
which must be used instead of 0 (NULL) in the case when we are unable
to provide real catalog_desc, from catgets.c source:

  /* Be generous if catalog which failed to be open is used.  */
  if (catalog_desc == (nl_catd) -1 || ++set <= 0 || message < 0)
    return (char *) string;
2012-08-06 17:12:38 -06:00
Jon Trulson
1a03c25947 Enable PowerPC to be recognized by build.
Patch from Douglas Mencken.
2012-08-06 17:09:01 -06:00
Peter Howkins
0abce74629 Add Matthew Howkins (dtappbuilder, nsgmls, dtcm Linux compilation)
Also note that other contributors are listed in copyright and copyright.old
2012-08-04 23:16:08 +01:00
Jon Trulson
4c82b51daf programs/Imakefile: don't try to build dtksh or dtinfo under linux. 2012-08-03 23:10:12 -06:00
Jon Trulson
4553d912b0 dtlogin: Fix up Options->Language menu
In dtlogin, you can select the language to switch to by selecting it
via Options->Language.  Unfortunately this was also including '.' and
'..', since this list is built dynamically by scanning a directory.

Now we screen out '.' and '..'.
2012-08-03 17:38:06 -06:00
Jon Trulson
94c826e1f4 gitignore: add rest of generated files. git status is much cleaner now :) 2012-08-03 15:57:06 -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
Peter Howkins
2c1daeb413 Merge branch 'master' of https://git.code.sf.net/p/cdesktopenv/code 2012-08-03 17:11:07 +01:00
Peter Howkins
47637b0c37 Re-enable dtappbuilder on linux builds. 2012-08-03 17:10:36 +01:00
Jon Trulson
6e4c5a5cde lnxLib.tmpl: remove bogus '#define NoMessageCatalog'
It is amazing what mayhem can be caused by a bad define :)

The reason most of the CDE programs were not actually using their
localized catalogs was because their use was being disabled by this
line.

Certain programs like dtwm and dthelp/libDtHelp did their own
localization handling and did not use the results of this define.
This is why they worked properly, and most everything else did not :)
2012-08-02 19:16:04 -06:00
Jon Trulson
344998b405 linux.cf: do not bother using X_LOCALE at all. We do not need it on linux. 2012-08-02 19:15:20 -06:00
Jon Trulson
5e6b400c3c libtt: client init(): use fcntl F_SETFD correctly. 2012-07-27 19:17:14 -06:00
Peter Howkins
2968429c0b Merge branch 'master' of https://git.code.sf.net/p/cdesktopenv/code 2012-07-27 14:43:33 +01:00
Peter Howkins
be57b53232 Allow installing the terminfo file for dtterm to also work with path as
/usr/share/terminfo as well as /usr/share/lib/terminfo

This allows fully functioning dtterm on Ubuntu 12.04 on which the terminfo file
failed to install.
2012-07-27 14:39:08 +01:00
Jon Trulson
80559fcfdd dtwm: add missing workspace 'Occupy" commands to the C, de, es, fr, and it locales.
The dtwm DefaultWindowMenu did not list any of the workspace enabled
Occupy commands, which makes it a bit difficult to move windows into a
workspace, or to occupy multiple workspaces.

This was rectified by copying the relevant lines from the
SampleWindowMenu sections containing them that already existed in the
localized files.  Tested on C and DE (German).
2012-07-24 21:21:27 -06:00
Jon Trulson
f3be236767 Dtwm.defs.src: set proper mail file path for linux 2012-07-24 20:48:43 -06:00
Jon Trulson
427c1035d3 copy CONTRIBUTORS file into /usr/dt/ during install 2012-07-24 18:49:11 -06:00
Jon Trulson
e59c21b8ff Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2012-07-24 18:46:29 -06:00
Jon Trulson
56d6a7a2c9 CDE-MIN: copy the 'COPYING' file to /usr/dt/ on install 2012-07-24 18:15:09 -06:00
Jon Trulson
ff0dc919ed localized/templates: remove remaining attempts at building dtinfo related catalogs and other files
Attempts were still being made to build dtinfo.cat and other related
dtinfo files.  This could cause build failures in
programs/localized/...
2012-07-24 17:53:57 -06:00
Jon Trulson
3edce2a0c0 sys.resources.src: make HIGH_COLOR the default 2012-07-24 17:51:29 -06:00
Peter Howkins
da72e94e7f Add in a CONTRIBUTORS file for all people that have made changes post
open-source release. Also update sourceforge url to project website.
2012-07-24 15:23:16 +01:00
Jon Trulson
978aff3dc9 Commit the template changes for the locales including the missing msg files. 2012-07-16 19:52:36 -06:00
Jon Trulson
d3eba56a0c Add missing Mrm, Xm, and Uil .msg files for the various locales from the motif src.
Re-enable building them in the Imakefiles.
2012-07-16 19:49:28 -06:00
Jon Trulson
bc9c6af8c6 Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2012-07-16 14:26:53 -06:00
Peter Howkins
6eebf7d42c Increment CDE version number to 2.2.0 2012-07-16 15:23:40 +01:00
Jon Trulson
7604468ca1 instant: change warning message to fatal message, since it is. 2012-07-13 22:26:02 -06:00
Jon Trulson
a933d4b600 instant: partially revert commit bc96e6f1ff. remove 'HACK' :)
instant should fail if the locale xlation db cannot be opened.

The reason this was failing was because the locale translation DB for
linux did not exist (Linux.lcx).  I didn't add it until weeks/months
later :)

There needs to be one for each platform called "$(uname -s).lcx".
FreeBSD will need one too.
2012-07-13 22:15:58 -06:00
Jon Trulson
bf51c110e5 dtmail: IO.C: just compare against \r on all systems 2012-07-13 21:45:46 -06:00
Jon Trulson
860aa64942 Fix some minor issues and re-enable building of DE, ES, FR, and IT locale data (help and message cats)
Note, there are still some issues with certain programs appearing not
to use their localized message catalogs properly, while others work
fine.

Also, in order to build these now, you need to make sure you have
installed the DE, ES, FR, and IT locales before building or you will
get failures.  On [k]ubuntu, at least, you can install these with the
following commands:

sudo locale-gen de_DE
sudo locale-gen es_ES
sudo locale-gen fr_FR
sudo locale-gen it_IT
2012-07-13 17:42:12 -06:00
Jon Trulson
75f2f96793 libDtHelp: fix up some warnigs and potential overruns 2012-07-12 18:03:54 -06:00
Jon Trulson
aeaec445ee DtSvc/DtUtil1/Saver.c - fix the screen savers.
I have no idea how their putenv code can work.  Anyway, use code that
works on linux now. :)
2012-07-12 15:14:51 -06:00
Jon Trulson
1c733e5b16 dtsession: implement screen lock/unlock for linux
In order for this to work, dtsession must be setuid root.  If
dtsession is not setuid root, then locking will be disabled, and a
message will be written to ~/.dt/errorlog with the message: "Unable to
lock display due to security restrictions".
2012-07-12 14:22:59 -06:00
Jon Trulson
9c92d5a4ee dtsession: SmUI.c: fix ancient typo 2012-07-12 13:31:54 -06:00
Jon Trulson
f46a9c62b9 dtsession: also block HUP and PIPE when preparing to shutdown 2012-07-12 13:13:21 -06:00
Jon Trulson
dc5d68afba dtsession: don't exit while processing your own session exit event.
Setup a global that protects against accidentally exiting
while doing session exit related housekeeping.
2012-07-12 13:09:22 -06:00
Peter Howkins
23930d1b35 .gitignore attempt to trim down the number of generated files showing up
in git status, work in progress.
2012-07-05 17:18:34 +01:00
Peter Howkins
3017671740 As 'copyright' is used by dthello, make sure that it's based on the current
LGPL license, and move previous copyright file to copyright.old
2012-07-04 17:30:04 +01:00
Peter Howkins
d6c57bf330 Merge branch 'linux1' 2012-07-04 16:20:43 +01:00
Jon Trulson
669f064819 Converted postscript documentation to pdf, moved to a better place.
The new PDF's are located in doc/C/pdf, and the original postscript
files in doc/postscript have been removed.
2012-06-27 12:21:52 -06:00
Jon Trulson
8f6700b0d9 fontaliases: add more robust font.aliases file.
Note, this requires that the xfonts-100dpi and
xfonts-100dpi-transcode[d] packages be installed.  Kubuntu 11.10 calls
the transcoded package 'xfonts-100dpi-transcoded' while 12.04 calls it
'xfonts-100dpi-transcode'

You can also use the 75dpi variants if you wish, though they will look
crappy on larger monitors (>1024x768).
2012-06-21 18:30:40 -06:00
Jon Trulson
191e1849a6 dtlogin|Xsession/config: setup some env variables and fontpath for linux (and CSRG) systems.
What we really need are more fonts installed, like all of the xf 75dpi
and 100dpi fonts.  100dpi looks much better than 75/72 dpi, especially
on any display larger than 1024x768.  Of course, in the far future, we
should use the anti-aliased TT fonts everyone else uses these days
anyway.
2012-06-21 18:05:24 -06:00
Jon Trulson
4b80191943 fonts.alias: use Peters version in the CDE wiki for now. 2012-06-21 17:30:56 -06:00
Jon Trulson
ba54c6271b Add fontaliases/linux/ dir, and appropriate entries in the CDE-FONT.udb database.
Note, these still aren't quie working yet.  Notably, font.dir needs to
be generated properly and re-committed so they will be used.
mkfontdir is used to do this, but currently it fails on these
font.alias files (does not recognize them).
2012-06-21 17:07:21 -06:00
Jon Trulson
52360a2cb6 Xsession.src: setup proper cpp_* defines for linux 2012-06-21 17:05:37 -06:00
Jon Trulson
89b98f4ef6 dtfile: add freetype includes to Imakfile
While removing the CCLINK options, accidentally removed freetype
includes, causing dtfile to fail to build.
2012-06-20 14:25:41 -06:00
Jon Trulson
f8b5b2fd2a Fix dtsession_res so certain config/xrdb options will work properly. 2012-06-20 01:37:05 -06:00
Jon Trulson
1b74fb9ba7 instant: fix infinite loop seen in non-C locales 2012-06-19 20:02:56 -06:00
Jon Trulson
5f48454d8e Add older CDE documentation in .ps format until newer documentation can be generated with dtinfo. 2012-06-19 19:37:36 -06:00
Jon Trulson
f7e87eb7f3 Remove dtinfo launcher and icons from the default front panel.
Use the help system instead.  Someday, if dtinfo can be made to work,
this can be undone easily.  Note, you may have to clear out your ~/.dt
dir to see the change.
2012-06-19 19:22:08 -06:00
Jon Trulson
4f5c5a65a7 dbtoman: use ksh rather than sh. With working nsgmls, now we can build man pages.
Under ubuntu at least, /bin/sh is really /bin/dash.  For some reason,
dash cannot detect an executable (-x) file if it resides on nfs.  bash
and ksh do not have this problem.  Since ksh is already required to
build and install major portions of CDE, might as well use it here too.
2012-06-19 18:22:38 -06:00
Jon Trulson
157f2e2bf7 nsgmls: Imakefile fixes so it will build 2012-06-19 18:04:53 -06:00
Jon Trulson
84e3c43b90 agent.c: oops - include poll.h, not sys/poll.h 2012-06-19 17:31:28 -06:00
Jon Trulson
8e0523ff02 Remove OS deps from tclPosixStr.c (EOPNOTSUPP/ENOTSUP errnos) 2012-06-19 17:18:00 -06:00
Jon Trulson
d5deec6e72 csa/agent.c: use select rather than poll 2012-06-19 16:51:25 -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
Jon Trulson
fff18bf2b7 doc/help localization changes
- by default, do not build any other locale than C for now
- do not try to build the guides.  These require functioning
  dtinfo/docbook
- add a Linux.lcx locale translation db.  Not used yet.
- fix some overflows in dtdocbook/instant
2012-06-18 22:01:02 -06:00
Jon Trulson
81b0818361 imake/config changes to support more processors, including AMD64 (x86_64)
- also some rework of linux.cf
  - only allow ELF systems
  - use -pipe
  - add some more defines
  - get rid of some of the ancient (libc5/linux 1) support.  Really,
    don't expect CDE to build right on such old systems.
2012-06-18 19:50:44 -06:00
Jon Trulson
4e041a3135 .gitignore: add some more db related exclusions 2012-06-18 19:50:30 -06:00
Jon Trulson
9344e314df databases/installCDE - fixup a variety of issues.
- databases need linux specific entries for CDE-SHLIBS
- database Imakefile should undef the platform define (linux)
- installCDE fixes
  - use $LOGFILE.  There are still cases where tmp files are created
    in /tmp.
  - detect and set proper PLATFORM
  - Check to see if a db exists before trying to use it
  - don't print usage if you aren't root.
2012-06-18 18:24:07 -06:00
Jon Trulson
143576e81e linux.cf: remove ServerOSDefines and ServerExtraDefines 2012-06-18 18:23:39 -06:00
Jon Trulson
dc80c1a2ec gitignore: add some entries for admin/IntegTools and Makefiles 2012-06-18 18:22:42 -06:00
Jon Trulson
784c7dff56 Add -fpermissive to linux standard c++ option define in linux.cf
Remove from individual Imakefiles.

Also, remove '#if 0' block in linux.cf, and remove empty
LinuxMachineDefines. This should be working correctly.  If not, let me
know.
2012-06-18 16:27:25 -06:00
Jon Trulson
91f7988cf3 dtterm: fixes so job control will work. 2012-06-18 16:01:17 -06:00
Jon Trulson
62b669a6af dtterm: disable svr4 streams semantics on linux 2012-06-18 15:32:02 -06:00
Peter Howkins
bdd889c141 Import of the files from Motif 2.1.30 release that are needed to build CDE
man pages.
2012-06-15 15:58:42 +01:00
Peter Howkins
a34f78b798 convert all Imakefile LinuxDistribution to LinuxArchitecture.
(programs part 2)
2012-05-31 13:47:41 +01:00
Peter Howkins
1d555edb6c Convert all Imakefile LinuxDistribution switches to LinuxArchitecture.
(programs part1)
2012-05-31 13:40:38 +01:00
Peter Howkins
837972cb69 Modify all Imakefile files to use LinuxArchitecture instead of LinuxDistribution
for Linux specific changes. (lib directory)
2012-05-31 12:41:33 +01:00
Peter Howkins
095002b5d9 Addition of LGPL file at top level, deprecation of file copyright, and
modify the user facing copying help text to be LGPL.
2012-05-29 16:54:57 +01:00
Peter Howkins
18831d2cdf Revert previous erroneous change made on master that had already been
done on linux1.
2012-05-29 16:42:30 +01:00
Jon Trulson
262171d25f disable building of dtappbuilder until building right 2012-05-26 21:06:06 -06:00
Jon Trulson
9526740ddd dtsession: fix VU#497553 2012-05-26 19:29:50 -06:00
Jon Trulson
b4f3efb692 DtSvc/dtspcd: fixes for VU#172583 2012-05-26 19:09:33 -06:00
Jon Trulson
a2959aa768 dtspcd: fix symlink vulnerability, a couple warnings 2012-05-26 18:57:11 -06:00
Jon Trulson
70128313e9 tt_isam_record.C/tt_isam_record.C: fix CERT VU#387387 part 3 2012-05-26 18:39:51 -06:00
Jon Trulson
95e6fd42cc tt_isam_record.C: fix CERT VU#387387 part 2 2012-05-26 18:29:26 -06:00
Jon Trulson
e820f21540 tt_isam_record.C: fix CERT VU#387387 2012-05-26 18:28:02 -06:00
Jon Trulson
3231696f03 dm_server.C: fix CERT VU#975403/VU#299816 2012-05-26 18:24:31 -06:00
Jon Trulson
8e4e53f4b9 FileUtils.c: fix CERT VU#575804 2012-05-26 18:14:58 -06:00
Jon Trulson
c0f9270dd3 linux has supported shadow passwords forever... 2012-05-26 17:57:11 -06:00
Jon Trulson
0961da28b9 Several adjustments to installCDE.src:
Do not require the user to be root

 Use -e in echo statments so that embedded \t's etc will display.

 Do not save install log in /tmp with a known name, especially since
 it is supposed to be run as root.  This is a Bad Thing To Do (tm).
 Instead just save the log in the current dir.
2012-05-26 17:30:53 -06:00
Jon Trulson
9a74b54870 Remove dtinfo and dtksh from the build for now 2012-05-26 17:23:03 -06:00
Jon Trulson
6d78c23be9 Remove -k option from WORLDOPTS 2012-05-26 17:21:45 -06:00
Peter Howkins
de621b906b On the gneeric authenticator use shadow password API if under linux,
allows login on dtlogin.
2012-04-19 17:16:50 +01:00
Peter Howkins
bc96e6f1ff HACK, instant should not stop on non fatal fatals, this allows building
of 'C' locale help files.
2012-04-14 23:18:17 +01:00
Peter Howkins
aa605c16f3 Linux compilation of ttsnoop (Matthew Howkins)
This may contain prexisting 64-bit issues, caused by hammering pointers
into ints.
2012-04-12 19:08:52 +01:00
Peter Howkins
0859109ba0 Linux compilation of dtbuilder (Matthew Howkins) 2012-04-12 17:36:54 +01:00
Peter Howkins
1d97f19166 Linux compilation fixes for dthelp (Matthew Howkins) 2012-04-12 16:21:14 +01:00
Peter Howkins
e60d58be07 Linux compilation of nsgmls (Matthew Howkins) 2012-04-11 18:03:23 +01:00
Peter Howkins
cc1d109aa9 Linux compilation of dtcm (Calendar), (Matthew Howkins) 2012-04-11 17:33:26 +01:00
Peter Howkins
5388cb4314 When compiling libcsa make sure it's linked against Xt at library compile
time. Prevents issues when programs that link against libcsa can't find
Xt symbols even when linked with -lXt
2012-04-11 16:52:34 +01:00
Peter Howkins
09f0b16cf3 Fix segfault on file not copyright file not found. Only fclose() a file
handle that has been successfully fopen()ed.
2012-04-11 15:37:12 +01:00
Peter Howkins
7e9a7df246 Add a MainWindow.h include to prevent missing references. 2012-04-02 15:18:51 +01:00
Peter Howkins
24d74bceee Don't declare 'Chunk' as both public and private, that's just daft. 2012-04-02 15:17:50 +01:00
Peter Howkins
145ffe54dd Don't redeclare forceUpdate() with the wrong prototype. 2012-04-02 15:16:58 +01:00
Peter Howkins
7416482cc3 Add -fpermissive to allow compilation of old C++ on modern GCC 2012-04-02 15:16:05 +01:00
Peter Howkins
7795c597af Use a particulaly unpleasant cast to get a void * into an enumeration type. 2012-04-02 15:15:04 +01:00
Peter Howkins
dcbef994e0 C++ needs variables to have a type, use int as a default. 2012-04-02 15:14:09 +01:00
Peter Howkins
8f43a96122 On linux use \r instead of ^M as the character for a carridge return. 2012-04-02 15:13:13 +01:00
Peter Howkins
5c6f7d5317 -fpermissive to allow GCC to compile old C++ 2012-04-02 14:56:05 +01:00
Peter Howkins
e7de343555 C++ doesn't allow variables to be declared without a type, use 'int' as
a default.
2012-04-02 14:47:47 +01:00
Peter Howkins
830a3572db Do not specify linux architecture specific defines, most of these are defaults
now, and some cause issues on i386 for example.
2012-03-24 17:35:46 +00:00
Peter Howkins
d929f4cf5f Link with C++ linker 2012-03-23 13:49:49 +00:00
Peter Howkins
d2f85af5e5 Don't try to define abs() on linux, stdlib will handle it. 2012-03-23 13:49:24 +00:00
Peter Howkins
cc949fccd2 Exceptionally hacky linux fix. gnu gencat is returning != 0 even when it's
succeeding.
2012-03-22 17:05:45 +00:00
Peter Howkins
1e3b674118 Do not include a couple of missing files under linux. 2012-03-22 16:00:56 +00:00
Peter Howkins
1476da61f7 Change over Linux to using the System V style pty code, it seems at some
point Linuxes pty code is no longer the BSD legacy one by default anymore.
2012-03-20 20:43:06 +00:00
Peter Howkins
aff0d2ff41 Add Freetype include path to build for DtWidget 2012-03-15 11:14:34 +00:00
Peter Howkins
87eee2f1e5 Link with C++ linker 2012-03-14 13:53:28 +00:00
Peter Howkins
939fc535d1 Prototype static function setRealDelArea() before it is used. 2012-03-14 13:52:14 +00:00
Peter Howkins
32e8c91d44 On linux do not include X11/Xlocale.h but locale.h, this prevents
Xlocale.h redefining setlocate() into _Xsetlocale() that it then can't
find and link against.
2012-03-14 13:50:42 +00:00
Peter Howkins
7294970c18 Namespace ostream and endl into std::
Use <iostream> without the .h
2012-03-13 17:54:48 +00:00
Peter Howkins
167fd854e1 namespace ostream into std::ostream for modern C++ 2012-03-13 17:45:34 +00:00
Peter Howkins
4e71617973 Add in -fpermissive for compiling old C++ on gcc 2012-03-13 17:43:43 +00:00
Peter Howkins
585674c817 Include <iostream> without the .h on modern C++ 2012-03-13 17:41:48 +00:00
Peter Howkins
5d76061f5d On linux ostream and endl need prefixing into the std namespace. 2012-03-13 17:40:21 +00:00
Peter Howkins
adf14ccd77 Include <iostream> without the .h on modern C++ 2012-03-13 17:31:56 +00:00
Peter Howkins
3984d5a45b On linux use the system provided libXau rather than one from the imports
directory (that would have linked to the X11 tree).
2012-03-13 17:18:35 +00:00
Peter Howkins
063cffa81d Add a .gitignore to try to reduce the amount of files listed as not
in repository on git status.
2012-03-13 16:44:50 +00:00
Peter Howkins
d1f3e24eac Use C++ linker
Add in freetype headers

Use system provided -lXdmcp and -Xau instead of trying to compile them
from the imports directory.
2012-03-13 16:15:22 +00:00
Peter Howkins
348f3cd81c Change detector for linux platform to match other Imakefile changes 2012-03-12 21:26:30 +00:00
Peter Howkins
7d770cff75 These days include standard C++ header files without the .h on the end 2012-03-12 16:43:22 +00: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
88cc514fbd Use C++ linker 2012-03-12 15:41:09 +00:00
Peter Howkins
5a09544b16 Linux doesn't allow open() with O_CREAT without permission flags anymore. 2012-03-12 15:39:22 +00:00
Peter Howkins
baf772785b -fpermissive to allow gcc to compile old C++ 2012-03-12 15:19:36 +00:00
Peter Howkins
77ed6f7ee3 -fpermissive to allow GCC to compile old C++ 2012-03-12 15:18:09 +00:00
Peter Howkins
dd2ff6b448 Set untyped variable to int 2012-03-12 15:15:38 +00:00
Peter Howkins
e315d4ba3e Setting const variable with no type to 'int' (likely the default the
old compilers would have used)
2012-03-12 15:14:12 +00:00
Peter Howkins
cbffec168a Use C++ linker 2012-03-12 14:48:23 +00:00
Peter Howkins
a26bc89ad5 Use C++ linker 2012-03-12 14:42:58 +00:00
Peter Howkins
c03c12449d use C++ linker 2012-03-12 14:40:34 +00:00
Peter Howkins
b368679e95 Use C++ linker 2012-03-12 14:37:47 +00:00
Peter Howkins
72d9ef5875 Add linux to list of platforms that use that form of memset() 2012-03-12 14:35:03 +00:00
Peter Howkins
8631b4f7c0 Link with C++ linker 2012-03-12 12:14:03 +00:00
Peter Howkins
eeb7e285f5 On linux use __fds_bits instead of fds_bits 2012-03-12 12:12:41 +00:00
Peter Howkins
a5b6e62764 Link with C++ linker 2012-03-12 12:07:09 +00:00
Peter Howkins
fd23228803 -fpermissive to allow old C++ to compile on gcc 2012-03-12 12:04:55 +00:00
Peter Howkins
7ed2353605 On Linux no access to pre iso C varargs.h 2012-03-12 11:56:11 +00:00
Peter Howkins
ef1755be43 Link with C++ linker 2012-03-12 11:45:18 +00:00
Peter Howkins
44baf5431b Link with C++ linker 2012-03-12 11:33:49 +00:00
Peter Howkins
68027a6aa0 Link with C++ linker 2012-03-12 11:27:37 +00:00
Peter Howkins
b069127485 Linux has the same value for ENOTSUP as another var, therefore protect one
to prevent a duplicate case issue in the switch().
2012-03-12 11:26:01 +00:00
Peter Howkins
12598a4780 Link with C++ linker 2012-03-12 11:19:46 +00:00
Peter Howkins
4d9bb3d348 Link with C++ linker 2012-03-12 11:19:04 +00:00
Peter Howkins
9ad5e31edd Link with C++ linker 2012-03-12 11:17:27 +00:00
Peter Howkins
7d5fcc4400 Link with C++ linker 2012-03-12 11:16:41 +00:00
Peter Howkins
ce390d1290 Link with C++ linker 2012-03-12 11:11:10 +00:00