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
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