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
ea96eb624d dtcalc: Resolve 82 warnings causing by enabling -Wall 2012-11-20 14:49:40 +00:00
Pascal Stumpf
b64f79b1b8 On OpenBSD, use FILE_MAP_OPTIMIZED.
This has the effect of not performing a tt call each time in
ResolveLocalPathName() if we're on the local host anyway.  Drastically reduces
dtfile startup time.
2012-11-19 19:44:32 -07:00
Pascal Stumpf
5b9d3fc5ec Use /usr/sbin/sendmail as default mailer on OpenBSD. 2012-11-19 19:44:29 -07:00
Pascal Stumpf
6ecf213b63 Do not build motif manpages any more. 2012-11-19 19:44:24 -07:00
Pascal Stumpf
fad2d16d20 Remove hack adding csu objects to the linker command line on OpenBSD.
This is no longer needed now that $(CC) is used to link shared libraries.
2012-11-19 19:44:19 -07:00
Pascal Stumpf
38f3f5dcba set AvoidNullMakeCommand on OpenBSD to avoid make warnings 2012-11-19 19:44:15 -07:00
Peter Howkins
e56e3f74e6 dtcalc: Further remove K&R function prototypes and replace with ANSI. 2012-11-19 14:28:52 +00:00
Peter Howkins
f4339cd58e dtcalc: Convert functions from K&R to ansi declarations. 2012-11-16 17:03:10 +00:00
Peter Howkins
b556633eca dtscreen: Resolve (all) 11 warnigns caused by -Wall 2012-11-16 15:57:36 +00:00
Peter Howkins
a67b65198d dtscreen: Resolve a -Wformat-security warning. 2012-11-16 15:29:50 +00:00
Peter Howkins
43cfaeaa65 libDtSearch: Resolve 137 -Wunused-variable warnings. 2012-11-12 17:13:36 +00:00
Peter Howkins
9040256676 libDtSearch: Resolve 38 -Wformat warnings 2012-11-12 16:26:11 +00:00
Peter Howkins
a10520c43c libDtPrint: Resolve 9 -Wunused-variable warnings. 2012-11-12 15:03:37 +00:00
Peter Howkins
21feacd159 libdthelp: Resolve 65 -Wunused-variable warnings 2012-11-09 17:20:46 +00:00
Peter Howkins
6f2a704bbd libcsa: Resolve 96 -Wunused-variable warnings.
This is not all of them, another ~90 exist in generated code.
2012-11-06 15:07:08 +00:00
Peter Howkins
37c30d32f7 lidtwidget: Resolve 74 -Wunused-variable warnings 2012-11-06 13:56:11 +00:00
Peter Howkins
a0da2db479 dtcalc: Resolve 43 warnings that would be introduced with -Wunused-variable or -Wall
Basically 43 local variables declared in functions and then never used.
2012-11-05 16:44:29 +00:00
Marcin Cieslak
2c10f0d62b Fix location of some SGML files 2012-10-24 18:17:06 -06:00
Ulrich Wilkens
8fd8a8a4db Fix dtappbuilder on Linux 2012-10-16 21:04:57 -06:00
Ulrich Wilkens
9b4fe61ea4 dtinfo other requirements 2012-10-15 17:59:26 -06:00
Ulrich Wilkens
f17d779dab dtinfo subtree clients 2012-10-15 17:59:11 -06:00
Ulrich Wilkens
5cdb889f7b dtinfo subtree tools 2012-10-15 17:59:00 -06:00
Ulrich Wilkens
07e886ba7c dtinfo subtree dtinfogen 2012-10-15 17:58:44 -06:00
Ulrich Wilkens
51b8929ebd dtinfo subtree dtinfo 2012-10-15 17:57:49 -06:00
Ulrich Wilkens
8275485b4a dtinfo subtree mmdb 2012-10-15 17:57:35 -06:00
Ulrich Wilkens
8c8363f4a5 dtinfo subtree DtMmdb 2012-10-15 17:57:14 -06:00
Marcin Cieslak
b92cf08899 Adobe Helvetica as -dt-interface system-
Use Adobe Helvetica as the sans serif user
interface font (among others, dtlogin, front
panel buttons, menu titles) instead of Lucida.

While there, move X Consortium comment back
to the top.

This change applies only to FreeBSD.
2012-10-08 19:31:24 +01:00
Peter Howkins
cd39eabb18 libdthelp: resolve 46 compiler warnings 2012-10-08 15:34:45 +01:00
Marcin Cieslak
c3c9abd86f Set CDE_RELEASE to 2.2.0 2012-10-06 18:42:35 +01:00
Jon Trulson
1c7b2005fe Update HISTORY for 2.2.0c release 2012-10-04 18:10:33 -06:00
Jon Trulson
7c9ca091be update CONTRIBUTORS 2012-10-04 18:06:47 -06:00
Jelle Hermsen
b8862cab32 Changed a couple of ifdefs for __FreeBSD__ to CSRG_BASED. These are all clearcut cases. I left the ones I had doubts about, or where I wasn't sure about the OpenBSD side of things to look at later. 2012-10-03 17:06:57 -06:00
David J.McBrayer
8cfdf21526 -Updated README.dtlogin -Update "# Provides:" in dtlogin LSB init script 2012-10-02 18:58:42 -06:00
Marcin Cieslak
40883b0165 Remove missing xmbind and uil from UDB
Remove xmbind and uil utilities we
do not build and install from the
packing lists.
2012-10-02 18:57:14 -06:00
Marcin Cieslak
aacfe3e5de dtfile: Fix crash when trying to open filter dialog
On 64-bit machine dtfile crashes when opening
list of file types to filter in Encaps.c:

   _DtShowDialog (parent=0x805c80900, map_parent=0x0, top_rec=0x805ce3600,
     dialog_data=0x805db25e0, change_proc=0x4489f0 <FilterChange+16>,
     change_data=0x805ce3600, close_proc=0x4489c0 <FilterClose+16>,
     close_data=0x805ce3600, workspaces=0x0, iconify_state=0 '\0',
     ignoreCache=0 '\0', title=0x0, classHints=0x0) at Encaps.c:531

531	        ResetFlag(NULL,fr->close);
2012-10-02 18:57:12 -06:00
Jon Trulson
cc5544354f linux.cf: use -fno-strict-aliasing, define DefaultGcc2i386Opt, use indenting to improve readability 2012-10-01 19:27:36 -06:00
Marcin Cieslak
de61ffa637 Use -O2 -fno-strict-aliasing optimization for FreeBSD
- Switching from -O to -O2 after the dthelp problem
  has been resolved
- Introducing -fno-strict-aliasing (currently FreeBSD's
  default) to avoid silent change of behaviour of legacy code.

  http://thiemonagel.de/2010/01/no-strict-aliasing/

  http://jeffreystedfast.blogspot.de/2010/01/weird-bugs-due-to-gcc-44-and-strict.html

Analysis of C99 aliasing (we are not C99 yet):

  http://davmac.wordpress.com/2010/02/26/c99-revisited/
2012-10-01 18:59:20 -06:00
Marcin Cieslak
775fb0f0f1 Don't break help with gcc -O2
libDtHelp is unable to read SDL help files
with -ftree-store-ccp optimization which
is enabled by -O2 on gcc 4.2.1.

GifUtils.c and decompress.c didn't work
properly with -ftree-store-ccp enabled.

GifUtils.c was repaired by fixing
those warnings:

GifUtils.c: In function 'create_pixmap':
GifUtils.c:1093: warning: return makes integer from pointer without a cast
GifUtils.c:1110: warning: return makes integer from pointer without a cast
GifUtils.c:1215: warning: return makes integer from pointer without a cast
GifUtils.c: In function 'gif_to_pixmap':
GifUtils.c:1242: warning: return makes integer from pointer without a cast

decompress.c didn't generate warnings, but the
only effect of the -ftree-store-cpp was to introduce
this change:

        addq    $1, %rax
        movq    %rax, (%rbx)
 .L90:
-       cmpl    $157, %edx
+       cmpl    $-99, %edx
        jne     .L86
        movl    8(%rbx), %eax
        subl    $1, %eax

Which corresponds to this source code:

bufioI.h

     57 #define BufFileGet(f)   ((f)->left-- ? *(f)->bufp++ : (*(f)->io) (f))

     42     int     (*io)(/* BufFilePtr f */);

decompress.c
     53 #ifdef NO_UCHAR
     54  typedef char   char_type;
     55 #else
     56  typedef        unsigned char   char_type;
     57 #endif /* UCHAR */
     58
     59 static  char_type magic_header[] = { "\037\235" };      /* 1F 9D */

    131     if ((BufFileGet(f) != (magic_header[0] & 0xFF)) ||
    132         (BufFileGet(f) != (magic_header[1] & 0xFF)))
    133     {
    134         return 0;
    135     }

BufFileGet() returns (int), so the (unsigned char) constants
got promoted to (int) with sign extension; therefore constant
157 decimal (0x9D) became -99 decimal, sign extended
(0xffffff9D), and the comparison was always false.

Tested using:
$ gcc -v
Using built-in specs.
Target: amd64-undermydesk-freebsd
Configured with: FreeBSD/amd64 system compiler
Thread model: posix
gcc version 4.2.1 20070831 patched [FreeBSD]

Running on:
FreeBSD 10.0-CURRENT (r240948M)
built Wed Sep 26 23:33:08 CEST 2012
2012-10-01 18:59:14 -06:00
Marcin Cieslak
48b76f8623 dtcreate: Don't crash when clicking "Find Set..."
dtcreate crashed on 64-bit system when clicking
"Find Set.." button.

Crash happens in libXm:

    new_w=0x805db4300, args=0x7fffffffb430, num_args=0x7fffffffb3dc)
    at Form.c:1955

$1 = {att = {{type = 4 '\004', w = 0x805db3700, percent = 0, offset = 0,
      value = 0, tempValue = 0}, {type = 1 '\001', w = 0x0, percent = 0,
      offset = 10, value = 0, tempValue = 0}, {type = 3 '\003',
      w = 0x805db3700, percent = 0, offset = 0, value = 0, tempValue = 0}, {
      type = 3 '\003', w = 0x800000000, percent = 0, offset = 10, value = 0,
      tempValue = 0}}, next_sibling = 0x0, sorted = 0 '\0',
  resizable = 1 '\001', preferred_width = 0, preferred_height = 0}

(...)

    at icon_selection_dialog.c:1768
1767            /* Creation of icon_scrolled_win */
1768            icon_scrolled_win = XtVaCreateManagedWidget( "icon_scrolled_win",
1769                            xmScrolledWindowWidgetClass,
1770                            icon_selection_dialog,
1771                            XmNscrollingPolicy, XmAUTOMATIC,
1772    /*                      XmNnavigationType, XmTAB_GROUP, */
1773                            XmNx, 282,
1774                            XmNy, 84,
1775                            XmNscrollBarDisplayPolicy, XmAS_NEEDED,
1776                            XmNrightOffset, 10,
1777                            XmNrightAttachment, XmATTACH_FORM,
1778                            XmNtopOffset, 0,
1779                            XmNtopWidget, icon_container_label,
1780                            XmNtopAttachment, XmATTACH_WIDGET,
1781                            XmNleftOffset, 0,
1782                            XmNleftWidget, icon_container_label,
1783                            XmNleftAttachment, XmATTACH_OPPOSITE_WIDGET,
1784                            XmNbottomOffset, 10,
1785                            XmNbottomWidget, XmATTACH_NONE,
1786                            XmNbottomAttachment, XmATTACH_WIDGET,
1787                            NULL );

What happens here is that ConstraintInitialize receives
four constraints, the last one is this:

    { type = 3 '\003', /* XmATTACH_WIDGET */
      w = 0x800000000, /* malformed XmATTACH_NONE ???
      percent = 0,
      offset = 10, /* specified as XmNbottomOffset */
      value = 0,
      tempValue = 0}

XmATTACH_* values are defined in <Xm/Xm.h> as follows:

   505  enum{   XmATTACH_NONE,                  XmATTACH_FORM,
   506          XmATTACH_OPPOSITE_FORM,         XmATTACH_WIDGET,
   507          XmATTACH_OPPOSITE_WIDGET,       XmATTACH_POSITION,
   508          XmATTACH_SELF
   509          } ;

What is not clear to why XmATTACH_NONE - which should be (int)0 -
becomes 0x800000000 - looks like a 64 bit bug somewhere.

Providing a long value on None (0L) as in this change fixes the
problem.

I understand is that it possible to use such an "empty" widget
is to create additional space at the bottom of the newly created
"icon_scrolled_win".

What needs to be clarified - shouldn't be such an (int) value be
automatically promoted to (long) (or XtArgVal, XtPointer, ...)
and preserve the value 0? Lots of parameters seem to be
passed as ints (for example dimensions) and they do not
appear to cause any trouble.
2012-09-30 11:11:21 -06:00
Jon Trulson
f40368caa2 XmPrivate.h: never try to build this automatically.
XmPrivate must be generated manually.  For this you work, you must
have a freshly compiled openmotif tree, and MLIBSRC must be pointing
to it.

Otherwise, it's possible during the includes phase for an attempt to
be made to regenerate this file, which will fail on the vast majority
of systems out there.

So, to regenerate,

cd include/Xm
rm XmPrivate.h
make XmPrivate.h
2012-09-29 20:46:27 -06:00
Marcin Cieslak
27bc7d6bec dtcreate: Add missing prototypes and more (64-bit)
- Fix missing prototypes
- Fix some 64-bit related problems (XtVaGetValues)
- Fix crash on dtcreate startup in create_applicationShell1()
- Add XmeFlushIconFileCache() prototype from <Xm/IconFileP.h>
2012-09-29 20:28:45 -06:00
Marcin Cieslak
3eaeffaf7e XmPrivate.h: Avoid whitespace problems (IMPROVED)
When applying a patch, "git am" strips
trailing whitespace, although they are
present in the git formatted-patch.

This way the committed file will be
slightly different than the file re-generated
by extractprototype.h

It shouldn't hurt, but next run of
extractprototype.h will add trailing spaces
again and the resulting diff on XmPrivate.h
will include more changes than actually
needed.

This may break some viscious circle after
applying the patch, so enabling regeneration
on LinuxArchitecture again.

This patch does not add XmeFlushIconFileCache()
needed by dtcreate.
2012-09-29 20:28:43 -06:00
Frederic Koehler
71962e580d dtcreate: Avoid trying to reuse closed help window
This fixes a segfault when trying to go to help a second
time, after closing the first window.
2012-09-29 19:29:02 -06:00
Frederic Koehler
4773d68153 dthelp: Avoid undefined behaviour in strcpy
Technically strcpy's ranges cannot overlap at all,
although in practice this is usually not an issue.
Does quiet a valgrind warning, however.
2012-09-29 19:21:27 -06:00
Marcin Cieslak
7948362829 dtfile: fix crash in RecheckFlag (64bit) 2012-09-28 19:13:29 -06:00
Jelle Hermsen
399915f0ce Teach ToolTalk config about NetBSD and adds HAS_STATVFS identifier which is consequently used in tt_file_system.C, because NetBSD switched to the POSIX/XOpen statvfs() calls in 2004. 2012-09-28 19:11:09 -06:00
James Woodcock
0ea703ed1e Use the system strcasestr() on Linux. 2012-09-27 18:01:24 -06:00
James Woodcock
44e384aedb Older Linux installations do not have svcfd_create().
svcfd_create() is only called if OPT_UNIX_SOCKET_RPC is defined, so a #ifdef
round that code should be OK.
2012-09-27 18:01:19 -06:00
James Woodcock
406fa95994 Use RPC_ANYSOCK instead of the magic number -1. 2012-09-27 18:01:14 -06:00
James Woodcock
407bb371f2 Remove unnecessary extern modifier from struct declaration. 2012-09-27 18:01:09 -06:00
Marcin Cieslak
ee82570104 Use typedef XDR from <rpc/xdr.h>
__rpc_xdr is no longer available on FreeBSD 10.
(XDR is typedef'd as "struct XDR" and not "struct __rpc_xdr").

By the way, why did we ever need this? Probably
it should be removed. Leaving for __OpenBSD__ for now.
2012-09-27 17:54:12 -06:00
Marcin Cieslak
5f8b6ba739 dticon: fix typo in the last commit 2012-09-27 17:54:09 -06:00
Marcin Cieslak
481e46a7b2 Update vendor logo for FreeBSD
- Improved font rendering and anti-aliasing
  by hand
- Let dticon recognize .bm file as X bitmap
2012-09-26 19:43:55 -06:00
Marcin Cieslak
0f6300008d dticon: make XVaGetValues() call 64-bit compliant 2012-09-26 19:43:00 -06:00
Marcin Cieslak
e1f9b57844 dtstyle: XVaGetValues() calls 2012-09-26 19:42:57 -06:00
Pascal Stumpf
b61e8ebad6 Add csu objects to shared libraries on OpenBSD.
This is required by recent changes to the stack protector code in gcc,
generating references to __guard_local instead of __guard, defined in
crtbeginS.o.

This is a temporary solution; strictly speaking, we shouldn't invoke ld
directly at all but use cc instead.
2012-09-25 11:37:23 -06:00
Marcin Cieslak
e7ad6b776e Dtlogin logo for FreeBSD
Install black and white and 128-color custom logos for FreeBSD.

The FreeBSD logo based on the artwork provided by The FreeBSD Foundation:
  http://www.freebsd.org/logo/logo-basic.png

  The mark FreeBSD is a registered trademark of The FreeBSD Foundation
  is are used by Common Desktop Enviroment (CDE) with
  the permission of The FreeBSD Foundation.

  The FreeBSD Logo is a trademark of The FreeBSD Foundation and is used
  by Common Desktop Environment (CDE) with the permission of
  The FreeBSD Foundation.

Use of logo subject to Trademark Usage Terms and Conditions:
    http://www.freebsdfoundation.org/documents/Guidelines.shtml
2012-09-25 11:35:29 -06:00
Marcin Cieslak
c697b943d4 Don't make /var group writable
* Use 0755 permissions for /var (not 0775)
  - this makes sendmail unhappy
* Don't change permissions on /var on dtlogin startup
2012-09-25 11:33:11 -06:00
Marcin Cieslak
663c251125 Install /usr/local/libdata/ldconfig/cde for FreeBSD
I mean really this time. Please.
2012-09-25 11:33:09 -06:00
Anthony Perkins
e7cb79e9b2 Corrected font aliases for "-b&h-lucidasans" on FreeBSD.
The following patch gets the Lucida Sans font working on my FreeBSD system. Before applying this, title bars and menu bars are displayed in the "-misc-fixed" font. This is on FreeBSD 9.0-RELEASE-p3.
2012-09-25 11:32:02 -06:00
Marcin Cieslak
0747780cdd FreeBSD: Add /usr/dt/lib to runtime linker - update
On Mon, 24 Sep 2012, Jon Trulson wrote:

> On Tue, 25 Sep 2012, Marcin Cieslak wrote:
>
> Applied.

I'm sorry - it turns out this one does not fully
work as expected.

This one is better (it's relative to the old master)
- so it might cause a conflict:
2012-09-24 19:21:12 -06:00
Jon Trulson
a658d226d1 Revert "FreeBSD: Add /usr/dt/lib to runtime linker"
This reverts commit 91f228411e.

Updated patch.
2012-09-24 19:20:56 -06:00
Marcin Cieslak
77ec7b56b8 2 warnings fixed (64-bit)
Fix XtVaGetValues() output for 64-bit
Fix filename comparison in Dts.c
2012-09-24 18:35:24 -06:00
Marcin Cieslak
91f228411e FreeBSD: Add /usr/dt/lib to runtime linker
Create $LOCALBASE/libdata/ldconfig/cde
which points the runtime linker to /usr/dt/lib

There is no need to invoke ldconfig manually
after this.
2012-09-24 18:34:30 -06:00
Marcin Cieslak
a8c2232e48 dtpdm: XtVaGetValues, XtPointer, XtArgVal, ...
Make XtVaGetValues return variables safe for 64-bit
2012-09-24 18:31:25 -06:00
Marcin Cieslak
917f7da191 157 warnings: remove -DXK_MISCELLANY from Makefiles
Fixes the following warning:

In file included from ../../../imports/x11/include/X11/Xutil.h:54,
                 from ../../../imports/x11/include/X11/Intrinsic.h:54,
                 from Action.c:64:
../../../imports/x11/include/X11/keysym.h:49:1: warning: "XK_MISCELLANY" redefined
<command-line>: warning: this is the location of the previous definition

<keysym.h> which includes all key symbols and loads <keysymdef.h>
is automaticlly included by the X Toolkit.

This patch removes #include <keysymdef.h> whenever not needed,
and adds #define XK_MISCALLANY in the source code where required.
2012-09-24 18:30:21 -06:00
Marcin Cieslak
c70978e986 dtmail: fix warning: comparison is always false
This warning was caused by a typo:

warning: comparison is always false due to limited range of data type
2012-09-24 18:27:45 -06:00
Marcin Cieslak
22a0f8f497 dtmail: fix warning: NULL used in arithmetic
NULL != NULL makes no sense, really...
2012-09-24 18:27:18 -06:00
Marcin Cieslak
e3564643ad dtmail: warning: 'DtMailBoolean' is promoted to (int)
Fix this warning:

RFCTransport.C: In function 'long unsigned int writeToFileDesc(const char*, int,
 __va_list_tag*)':
RFCTransport.C:91: warning: 'DtMailBoolean' is promoted to 'int' when passed thr
ough '...'
RFCTransport.C:91: warning: (so you should pass 'int' not 'DtMailBoolean' to 'va
_arg')
RFCTransport.C:91: note: if this code is reached, the program will abort
2012-09-24 18:26:27 -06:00
Marcin Cieslak
91bfe1e4dc dtmail: Fix XtVaGetValues() return value storage
At least one crash was caused by this
on the 64-bit system
2012-09-24 18:26:11 -06:00
Marcin Cieslak
3a246dfb9b Get rid of unpleasant cast, it causes SIGSEGV
Having a difficult choice between unplasant
cast to get a void * into an enumeration type
and "Something's wrong here" double cast
I decided for the latter.

At least it does not crash when the legal
value of zero is passed as the argument.
2012-09-24 18:25:28 -06:00
Marcin Cieslak
86cb67de90 dtpad: kill one warning 2012-09-23 19:46:21 -06:00
Marcin Cieslak
e077181a46 dtpad: Use XtArgVal for int conversion
Avoid overwrite of local variables when using
short (int, etc.) types with XtVaGetValues().

Cast XtPointer using (XtArgVal) without
the need to use C99 <stdint.h> and friends.
2012-09-23 19:45:56 -06:00
Marcin Cieslak
d089ff7599 dtpad: Fix 64-bit crash on file open/save
Fix SIGSEGV because of implicit declaration
of _XmStringUngenerate.

The error message reported to the user was:

TT_ERR_PROCID The process id passed is not valid.
2012-09-23 19:45:22 -06:00
Marcin Cieslak
d852a8bfa6 BSD: Remove libXX.so symlink before installing
Now we can run "make" in "lib/tt" again
and the symlink will be recreated.
2012-09-23 19:44:36 -06:00
Marcin Cieslak
c1b4c13398 dtprintinfo: sym2num needs ksh 2012-09-23 19:43:43 -06:00
Marcin Cieslak
df1da3432e dtprintinfo: Use 64-bit values for XtVaGetValues() pointers
XtArgVal should be a type that encompasses XtPointer
and long integer types. In the X.org implementation
it is currently defined as (long).

Don't use (unsigned int *) instead of (Window *).
2012-09-23 19:43:11 -06:00
Marcin Cieslak
fc0f1ff697 dtprintinfo: Use CUPS lpq for FreeBSD
Use /usr/local/bin/lpq from CUPS for FreeBSD
for now; this prevents immediate dtprintinfo
crash.

In the future we should handle both built-in
/usr/bin/lpq as well as CUPS /usr/local/bin/lpq
output in separate functions.

Code to support CUPS should probably shared between
other operating systems.
2012-09-23 19:41:32 -06:00
Marcin Cieslak
6ea7855841 Fix logic in dtprintinfo
Fix values for true/false and boolean type
2012-09-23 19:38:43 -06:00
Marcin Cieslak
18a78bbff5 dtfile: fix pointer to integer conversion
Use XtArgVal (usually (long)) to convert
(XtPointer) to (int) and back.

This provides safe way to convert and
avoids compiler warning.
2012-09-23 19:38:40 -06:00
Jon Trulson
359126b739 contrib/xinetd: xinetd file for cmsd and ttsdbserver
mailling list post from: Ecmel Ercan <ecmel.ercan@gmail.com>
2012-09-23 19:32:17 -06:00
Marcin Cieslak
6b1d497984 dttypes should not crash on 64-bit system
Casting (int) to (char **) will not
prevent crash on a 64-bit system.

A proper ANSI prototype has been added.
2012-09-22 19:04:27 -06:00
Marcin Cieslak
1041e08003 Fix dtfile crash on 64 bit
When asking for data using XtVaGetValue()
make sure that there is enough place for
the return value (which is sometimes XtPointer).
Providing pointer to (int) is not enough.

Cast XtPointer into requested int types
directly, which unfortunately introduces
compilation warning:

cast from pointer to integer of different size
2012-09-22 19:04:21 -06:00
Jon Trulson
9b77aa08b4 Xm/Imakefile: never try to regen XmPrivate.h on linux systems. It will always fail. 2012-09-18 10:14:33 -06:00
Jon Trulson
3a9bac86e3 Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2012-09-18 10:07:11 -06:00
Marcin Cieslak
1079b56422 dtfile: Add missing prototypes
Add missing prototypes and header files to the dtfile
code in order to move closer towards 64-bit compatibility.

Extract the following functions from Motif internal headers:

_XmGetWidgetExtData
_XmRecordEvent
_XmStringUngenerate
_XmTextFieldSetDestination
_XmGetActiveTopLevelMenu

Extract manually prototypes of the obsolete Motif interface:
_XmHighlightBorder
_XmUnhighlightBorder

Remove XmPrivate.h if extractprototype.awk fails

Make the following header files available via -I:
	codelibs/boolean.h
	codelibs/pathutils.h
	codelibs/shellutils.h
and remove shellutils.h from dtwm directory.
2012-09-18 09:59:11 -06:00
Peter Howkins
5e14a88e2c dtudcexch/dtudcfonted: Resolve 78 compiler warnings. 2012-09-18 12:00:05 +01:00
Peter Howkins
e2432556b8 Merge branch 'master' of ssh://localhost:3333/p/cdesktopenv/code 2012-09-18 11:59:42 +01:00
Jon Trulson
f55dfc34c0 CDE-MAN.udb: add /usr/dt/man symlink for linux, like freebsd 2012-09-17 18:26:14 -06:00
Jon Trulson
735bdff392 Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2012-09-17 18:23:31 -06:00
Marcin Cieslak
464bc5b3f6 Improve MANPATH control
* Revert changes to programs/dtsearchpath/libCliSrv/UnixEnv.C
  introduced by c3cb5b8aa6
  that could have produced disappearing Application Manager
  icons on FreeBSD
* Introduce SearchPath:useSystemPath() virtual method to tell
  dtsearchpath to leave some environment variables alone.

  It is currently overriden for FreeBSD only if the MANPATH
  is empty (system default). Other operating systems
  might want to override it if they prefer to have distribution
  specific control of a search path in effect.

* Symlink /usr/dt/share/man to /usr/dt/man for FreeBSD
  This allows dtsearchpath to actually include /usr/dt/man
  in the MANPATH when MANPATH override is in effect.
2012-09-17 18:23:14 -06:00
Peter Howkins
f3d2d238ed dtterm: Resolve 4 compiler warnings 2012-09-17 16:28:55 +01:00
Peter Howkins
dcdd21df34 dtstyle: Resolve 28 compiler warnings. 2012-09-17 14:56:06 +01:00
Marcin Cieslak
071da0d223 BSD: Add /usr/local/bin to the default PATH on login 2012-09-10 12:08:36 -06:00
Marcin Cieslak
c3cb5b8aa6 FreeBSD: Don't set MANPATH, use OS configuration
- make installer to set up man(1) paths using /usr/local/etc/man.d/*
- don't override empty/unset MANPATH with compiled in default
2012-09-10 12:08:34 -06:00
Mike Stroyan
f0a60e47b1 Don't use fstat for readable pipe chars in dtexec.
The dtexec code assumes that fstat reports pipe's readable chars.
Linux always reports 0 for st_size of a pipe.
Instead read one character when select reports readable.
Note EOF when select says readable but read returns 0.
2012-09-09 18:23:45 -06:00
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
1a51479e38 add HISTORY file 2012-09-06 13:33:58 -06:00
Jon Trulson
096f96be24 dtlogin: enable building on FreeBSD 2012-09-06 12:36:14 -06:00
Jon Trulson
6df4fac771 Update README file 2012-09-06 12:12:15 -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
Jon Trulson
a38242a9d0 Update CONTRIBUTORS file. 2012-09-05 19:38:24 -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
591e58fe1a linux.cf: add libtirpc support. Disabled by default.
Currently on Linux, you must run rpcbind in insecure mode (-i) in
order for ttsession to register with rpcbind (the portmapper).  This
is because, on most systems, libc contains an older sun-based rpc
library embedded within it.  The sun-rpc code does not know how to
authenticate with rpcbind when run as a non-privileged user.

Using libtirpc, ttsession can register with rpcbind without requiring
it to be run in insecure mode.  You must have the libtirpc-dev, or
equivalent package installed to use it.

If you want to try this:

- install libtirpc-dev or equivalent
- if your rpcbind process is already running in insecure mode (-i
  option), remove that option and restart it.
- edit config/host.def, (create if it doesn't exist) and add:

  #define HasTIRPCLib  YES

- rebuild CDE (make World).  It's probably a good idea to remove
  /usr/dt/* beforehand to avoid contamination.

Some linux systems seem to incorporate tirpc directly into libc (as
all of the BSD's do AFAIK) so this may not be needed.

I know that at least on Ubuntu systems defining HasTIRPCLib to YES is
required in order to run rpcbind without -i.
2012-09-03 19:50:10 -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
e9bb2bcf09 libDtSvc: Resolve 89 compiler warnings. 2012-09-01 21:35:10 +01:00
Peter Howkins
92743e0999 libDtSearch: Resolve 26 compiler warnings. 2012-09-01 20:54:23 +01:00
Peter Howkins
a1bec3d0e1 dtpdmd: Resolving warnings. 2012-09-01 20:37:02 +01:00
Peter Howkins
e2b6c5420f Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2012-09-01 18:30:13 +01:00
Jon Trulson
2d3517ec6e installCDE: remove \c from installing... Log lines 2012-08-31 19:57:29 -06:00
Jon Trulson
d2c0ceaaf6 linux.cf: add some gcc system include paths to makedepend. Shaves about 5150 more warnings off (makedepend) :)
This is on ubuntu.  You may wany to add additional -I... entries for
other linux systems, if the ones I added for i386 and x86_64 don't
help.
2012-08-31 16:31:26 -06:00
Peter Howkins
971e3280d7 dtpdm: Resolve 4 compiler warnings 2012-08-31 21:41:32 +01:00
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