Commit Graph

1882 Commits

Author SHA1 Message Date
Jon Trulson d99b3eb895 DtXinerama: build as shared lib, all dep on libXinerama 2019-10-29 18:07:58 -06:00
Jon Trulson 022709f6e2 configure: Several changes, disable static builds, etc
Static builds are disabled - there is no reason to build both shared
and static versions of everything.

MAJOR/MINOR/MICRO variables changed to CDE_VERSION_MAJOR/MINOR/MICRO.

Make DtXinerama a shared (la) library.

Add DTCLIENTLIBS SUBST to replace the role of Imake DtClientLibs, DT
libs needed to link most CDE programs.

Add AC_PROG_RANDLIB.
2019-10-29 18:02:29 -06:00
Jon Trulson 6660a892c1 dsdm: make it build 2019-10-29 12:34:06 -06:00
Jon Trulson becacdba4a configure: add icons and backdrops to AC_CONFIG_FILES 2019-10-29 12:33:38 -06:00
Jon Trulson c33872257d programs: temporarily disable: dthelp dtksh dtappbuilder dtdocbook dtinfo nsgmls 2019-10-29 12:09:06 -06:00
Jon Trulson 8f40c924a5 dtpad: fix Makefile.am to use proper XTOOLLIB 2019-10-28 20:05:04 -06:00
Jon Trulson c44d4f24c8 configure: rework how $XTOOLLIB works 2019-10-28 20:04:10 -06:00
Jon Trulson d674597f41 dtpad: get it to build 2019-10-28 19:26:40 -06:00
Jon Trulson 730da7747c Change "if SUN" conditionals in remaining Makefile.am files to "if SOLARIS" 2019-10-28 18:54:17 -06:00
Jon Trulson 24171c3194 configure: add programs/ dthelp, dsdm, dtmail, dtpad, and dtfile
At this stage, these certainly won't actually build yet.

Just fix up the relevent Makefile.am files so that autogen does not
emit errors and warnings for them.

Removed AIX/HPUX support in Makefile.am files.  No point in
propogating that stuff when we've already removed much of that
unmaintained code from the codebase.

Commented out all of the Sun Pro stuff.  Someone whos using that will
need to go through and fix it.  This is mostly in dtmail and dthelp.

In fact, someone who does Solaris in general will need to go through
this stuff.

Next up, we'll replace any remaining 'if SUN' conditionals with 'if
SOLARIS' which is a more appropriate name and was already defined in
configure.ac.

Then we'll see about getting these new directories building.
2019-10-28 18:54:17 -06:00
Jon Trulson 4b8a65e884 Get rid of ancient, useless logs/ subdir 2019-10-28 17:17:38 -06:00
Jon Trulson 001bde0008 configure: enable C99 2019-10-28 17:11:45 -06:00
Jon Trulson 98b815be8e configure/m4: add ax_pthread.m4 for pthread checks 2019-10-28 17:05:13 -06:00
Jon Trulson 86bae29d78 Protect inclusions of autotools_config.h with HAVE_CONFIG_H 2019-10-28 15:01:02 -06:00
Jon Trulson 9eee455580 configure: various fixes regarding compiler flags
First attempt at setting certain -Defines and compiler flags (like
-fno-strict-aliasing).  Only linux for now.

Add CSRG_BASED to CPP_SOURCE_FLAGS rather than directly at CFLAGS.
This will be added to CFLAGS later on in the script along with other
gathered flags and options.

Set CFLAGS, CXXFLAGS, and CPPFLAGS at the end, composed of other env
variables we set earlier on.
2019-10-28 14:44:58 -06:00
Jon Trulson d7e5206d6b DtSvc/DtUtil2: fix implicit function declarations 2019-10-28 14:30:43 -06:00
Jon Trulson dbce2e4337 DtSvc/DtUtil1: fix implicit function declarations 2019-10-28 14:30:36 -06:00
Jon Trulson c0e3f08c9f DtSvc/DtUtil2: fix implicit function declarations 2019-10-28 13:27:47 -06:00
Jon Trulson 951ae0d327 DtSvc/DtUtil1: fix implicit function declarations 2019-10-28 13:22:09 -06:00
Jon Trulson f2caa218b2 gitignore: add a few more files from csa/ 2019-10-26 17:39:48 -06:00
Jon Trulson 7bd6429b8a csa: add dep for reparser.h to fix multicore build
Also rework a bit to make sure reparser.o is actually linked into the
lib.  Ahem.
2019-10-26 17:31:59 -06:00
Jon Trulson 01167185ed configure: only build lib/* for now 2019-10-26 17:17:55 -06:00
Jon Trulson 34ff9da4b3 gitignore: add a few more files 2019-10-26 17:10:39 -06:00
Jon Trulson c15237ddac csa: make it build 2019-10-26 17:08:41 -06:00
Jon Trulson c282f38d16 configure: check for rpcgen, add new CSA_INCDIR and SPC_INCDIR 2019-10-26 17:08:20 -06:00
Jon Trulson 6186a4c631 DtMrm: make it build 2019-10-26 16:36:37 -06:00
Jon Trulson c3d7858424 DtTerm: make it build 2019-10-26 16:34:29 -06:00
Jon Trulson 7ff1995da0 DtPrint: make it build 2019-10-26 16:09:18 -06:00
Jon Trulson b0cc0c8747 DtHelp: make it build
Use configure's endian checks to determine whether to set LSB in il/.

Add locale.h check, include to Helpos.c

Both via including autotools_config.h.
2019-10-26 16:05:48 -06:00
Jon Trulson 63ba9bac39 configure: add compiler checks, determine endianess, look for locale.h 2019-10-26 16:04:27 -06:00
Jon Trulson 61ab4a5b95 DtWidget: make it build, change include/cppfile.inc a bit
cppfile.inc - don't set BUIT_SOURCES or CLEANFILES here as they
overwrite (or in case of the CLEANFILES +=...) ignore the settings.
Do those in the Makefile.am always.

We still need a better way to preprocess generic files.  cppfile.inc
will only work for one file per Makefile...
2019-10-26 15:05:52 -06:00
Jon Trulson 1079ffa240 configure: create some convenience AC_SUBST's for the global includes
Modify the various makefiles that were doing $(top_builddir)/include/Dt
to use them like @DT_INCDIR@, @TT_INCDIR@, etc...
2019-10-26 14:30:36 -06:00
Jon Trulson 056144488a DtSearch: get it to build, fix up some confusion
There are/were two dproto.h files, one in DtSearch, one in raima.  The
one in raima is the one we want, so replace the global Dt/dproto.h
with it.  Also correct a prototype declaration error in that file.

Delete the dproto.h file in DtSearch, it's garbage and unused.

Next, redo the way yacc is used.  Autotools does "the right thing" by
simply including the .y file in *_SOURCES and using
BUILT_SOURCES/CLEANFILES to manage it.  No need for special rules to
handle yacc and lex.
2019-10-26 14:13:19 -06:00
Jon Trulson a048cea50f gitignore: update for autotools_config.h/.h.in 2019-10-25 18:33:06 -06:00
Jon Trulson 43387e7368 libDtSvc: get it to build 2019-10-25 18:33:06 -06:00
Jon Trulson 4320036bfa Add fake OSMAJORVERSION/OSMINORVERSION CPP flags
These really need to go away and are primarily used by older
unsupported platforms.

Here we fake these for Linux (4.15), freebsd (10.0), openbsd (6.2),
netbsd (8.0), and solaris (5.10).

I'm not sure about the Solaris one as I don't have any of them.
Basically, anything after Solaris 5.10, which is pretty ancient.

These should be considered temporary - all uses of these macros in the
code should be removed in favor of functionality-specific checks in
configure.
2019-10-25 18:33:06 -06:00
Jon Trulson 0d78e17036 DtSvc,DtXinerama: More include fixes to deal with new order. 2019-10-25 18:06:54 -06:00
Jon Trulson 647d0ae96a DtXinerama.h header file - moved to main include/ dir 2019-10-25 17:52:20 -06:00
Jon Trulson 31fec7edb5 tt: Fixup tt build for new includes locations
Some files were trying to access the global includes directy in the
build area with things like #include <api/c/tt_c.h>, which is now
wrong.  Se we fix all of those up.  tt_c.h and tttk.h are now global,
so we no longer need to root around various build dirs to find them.

TT builds again.
2019-10-25 17:37:58 -06:00
Jon Trulson 369308b737 The great includes migration of 2019 (autotools)
Ok - so one of the steps in building CDE is an early phase called the
includes phase (make includes).  At this point, all of the public
header files are exported to exports/include/Dt, DtI, ...

Then, the software is built using that include dir.

This of course does not work in autotools.  Much of the software does
things like #include <Dt/something.h>, so in order for the build to
succeed, this behavior must be represented/replicated in some way.

It seems the usual way of dealing with this is to place all public
headers (and in some projects, ALL headers) into a toplevel include
directory.

We now do this for all public headers - they have been moved from
wherever they were and placed in the appropriate spot in includes/

This will break the Imake 'make includes' phase unless the Imakefiles
are fixed (remove the HEADERS = stuff, and the incdir defines).  This
has not been done at this point since in reality, once autotools works
properly, there will be no need for the Imake stuff anymore, and I
intend to get rid of it.

This is just a warning for now - Imake builds in this tree will now
fail at the 'includes' stage.

This commit is only the migration.  In upcoming commits, libtt will be
fixed so that the hack being used before to get around this problem is
removed as there will no longer be any need.

And then the autotools work continues...
2019-10-25 17:01:34 -06:00
Jon Trulson 7c2983185d Re-fix tt_type_comp -- it doesn't actually need yacc/lex 2019-10-25 10:43:05 -06:00
Jon Trulson 9182ddfcc3 tt: fixup remaining build issues 2019-10-24 21:29:03 -06:00
Jon Trulson e8f3c6eee2 tt: get tt_type_comp to build 2019-10-24 20:55:04 -06:00
Jon Trulson bb4a2c7694 configure/Makefiles for TT: many fixups
Redo the way the main CDE libs are specified in configure.ac... The
current way could not work due to evaluation issues, and the fact that
variables like $srcdir and the like are only valid in Makefiles, not
configure.

Use @LIBNAME@ rather then $(LIBNAME) in Makefile.am files - this way
the location is always evaluated when it's run, not in configure -
which can't work for a variety of reasons.

Got some of the TT binaries to build.

Made a new include/cppfile.inc file that can be used to pre-process
files.  The downside is that currently you can only pre-process one
file at a time per Makefile.  Something more robust is needed, but at
least tt/bin/shell now builds.  Will need to come up with a better way.
2019-10-24 20:06:39 -06:00
Jon Trulson f55e448fc7 tt/slib: include hack 2019-10-24 17:50:02 -06:00
Jon Trulson 2ebfcd0e8a configure: fix up some cut/paste errors regarding languages 2019-10-24 17:30:50 -06:00
Jon Trulson a4ca695daf configure: some changes to config.h, CSRG, and XTOOLLIB impl
We create autotools_config.h instead of config.h to make it clear  and
avoid collisions.

We use a different method to define CSRG_BASED on BSD systems, and fix
a bug in definition of XTOOLLIB.

XTOOLLIB should probably be checked out - we should get some info from
AC_PATH_X and AC_PATH_XTRA instead of hardcoding it.  To be looked at
later.
2019-10-24 17:10:53 -06:00
Jon Trulson b4295847c6 tt/tttk: play symlink games so tttk can build
With this, we can now build the tooltalk library successfully.
2019-10-24 14:29:29 -06:00
Jon Trulson ff2e991ce8 tt: create Makefile.am for tt/util 2019-10-24 14:05:03 -06:00
Jon Trulson 8ae0dace89 configure: perhaps jumping the gun - set CSRG_BASED #define for the BSD's 2019-10-24 13:02:38 -06:00
Jon Trulson e3028d4eff lib/tt: replace tooltalk.tmpl with tooltalk.inc in all Makefile.am files
This fixes the remaining warnings from autogen in lib/
2019-10-24 12:43:02 -06:00
Jon Trulson 241c7dc257 gitignore: add more build artifacts 2019-10-24 12:41:33 -06:00
Jon Trulson 4186507c72 tt shell: fix up build - use LDADD rather than AM_LDADD 2019-10-24 12:40:57 -06:00
Jon Trulson 6996d53f91 tooltalk.tmpl: restore to previous version for use with Imake
For autotools we will include lib/tt/tooltalk.inc instead.
2019-10-24 11:27:39 -06:00
Jon Trulson 03544e68ad tt: begin to get it building under autotools 2019-10-23 22:07:26 -06:00
Jon Trulson db16ffd968 Fixup some more autogen wanrings. Only lib/tt/bin/shell remaining 2019-10-23 21:49:34 -06:00
Jon Trulson 8d948c0da2 gitignore: add the generated utilities (config.guess, etc) 2019-10-23 21:35:19 -06:00
Jon Trulson 628ceb1560 Rename original Makefile to Makefile.imake 2019-10-23 21:33:35 -06:00
Jon Trulson 29c5f90139 configure: use a different method to detect tirpc 2019-10-23 21:32:48 -06:00
Jon Trulson 76f1605e5e Remove AUTOMAKE_OPTIONS and ACLOCAL_AMFLAGS from top level Makefile.am 2019-10-23 17:55:50 -06:00
Jon Trulson 4bda07b5ab autotools: use m4/ rather than existing admin/ for m4/autotools utils 2019-10-23 17:44:11 -06:00
Jon Trulson a6c3aad21f gitignore: add the various autotools generated stuff 2019-10-23 17:43:13 -06:00
Jon Trulson 1d7ed3a17e autotools: many fixups, SUN->SOLARIS, typos, etc
This should allow an autoregen and ./confiure to work.  We only
generate Makefiles for lib/* and ./Makefile for now.  We'll ad more as
we go along.

Make still fails as we need to figure out TT - tirpc lib, rpcgen,
etc.  But it's a start!
2019-10-23 17:34:55 -06:00
Chase 8ed2ce2c26 programs/types: add automake file 2019-10-23 15:34:20 -06:00
Chase 3ab4c518d4 programs/tttypes: add automake file 2019-10-23 15:34:20 -06:00
Chase fbfde13dbb programs/nsgmls/Makefile.am 2019-10-23 15:34:20 -06:00
Chase 1d0f90cff8 programs/icons: add automake file 2019-10-23 15:34:20 -06:00
Chase 29424f66cd programs/localized: add automake files 2019-10-23 15:34:20 -06:00
Chase 2f8484ae14 programs/fontaliases: add automake files 2019-10-23 15:34:20 -06:00
Chase c76539517b programs/dtwm: add automake file 2019-10-23 15:34:20 -06:00
Chase faf0f3b087 programs/dtudcexch: add automake file 2019-10-23 15:34:20 -06:00
Chase 3e21e982f3 programs/dtterm: add automake files 2019-10-23 15:34:20 -06:00
Chase 3737ce6f96 programs/dtstyle: add automake file 2019-10-23 15:34:20 -06:00
Chase 85aff9320f programs/dtsr: add automake file 2019-10-23 15:34:20 -06:00
Chase f42b0ce115 programs/dtspcd: add automake file 2019-10-23 15:34:20 -06:00
Chase c310f73661 programs/dtsearchpath: add automake files 2019-10-23 15:34:20 -06:00
Chase 9347d0b09c programs/dtscreen: add automake file 2019-10-23 15:34:20 -06:00
Chase e79d944119 programs/dtprintinfo: add automake files 2019-10-23 15:34:20 -06:00
Chase f2b13938e5 programs/dtprintegrate: add automake file 2019-10-23 15:34:20 -06:00
Chase 015b457916 programs/dtpdmd: add automake files 2019-10-23 15:34:20 -06:00
Chase 09bc04b088 programs/dtpdm: add automake files 2019-10-23 15:34:20 -06:00
Chase b7c0788d95 programs/dtpad: add automake file 2019-10-23 15:34:20 -06:00
Chase f04677726e programs/dtopen: add automake files 2019-10-23 15:34:20 -06:00
Chase d08d22cb5d programs/dtmail: add automake files 2019-10-23 15:34:20 -06:00
Chase 268205ab10 programs/dtlogin: add automake file 2019-10-23 15:34:20 -06:00
Chase 9f862c06a8 programs/dtksh: add automake files 2019-10-23 15:34:20 -06:00
Chase fd762e2c01 programs/dtimsstart: add automake file 2019-10-23 15:34:20 -06:00
Chase ac1921ed58 programs/dticon: add automake file 2019-10-23 15:34:20 -06:00
Chase 37a7c7c7ce programs/dthelp: add automake files 2019-10-23 15:34:20 -06:00
Chase 4e254aee74 programs/dtinfo: add automake files 2019-10-23 15:34:20 -06:00
Chase f8ba07efd1 programs/dthello: add automake file 2019-10-23 15:34:20 -06:00
Chase febc0c45c1 programs/dtfile: add automake files 2019-10-23 15:34:20 -06:00
Chase 407153b0f3 programs/dtexec: add automake files 2019-10-23 15:34:20 -06:00
Chase fbd9308ac8 programs/dtdspmsg: add automake file 2019-10-23 15:34:20 -06:00
Chase 2d136b7062 programs/dtdocbook: add automake files 2019-10-23 15:34:20 -06:00
Chase f1865536b0 programs/dtdbcache: add automake files 2019-10-23 15:34:20 -06:00
Chase 398de66d9f programs/dtcreate: add automake files 2019-10-23 15:34:20 -06:00
Chase 3a1ea5975d programs/dtconfig: add automake files 2019-10-23 15:34:20 -06:00
Chase ca20cfe55b programs/dtcm: add automake files 2019-10-23 15:34:20 -06:00
Chase 031411fc36 programs/dtcalc: add automake files 2019-10-23 15:34:20 -06:00
Chase 0cebe79824 programs/dtappintegrate: add automake file 2019-10-23 15:34:20 -06:00
Chase 41d3e651b4 programs/dtappbuilder: add automake files 2019-10-23 15:34:20 -06:00
Chase 4984f3db19 programs/dtaction: add automake file 2019-10-23 15:34:20 -06:00
Chase 4f8d7b3894 programs/dsdm: add automake files 2019-10-23 15:34:20 -06:00
Chase bca385079b programs/backdrops: add automake files 2019-10-23 15:34:20 -06:00
Chase b055acde4a programs: add automake file 2019-10-23 15:34:20 -06:00
Chase 519ed266a8 logs: add automake files 2019-10-23 15:34:20 -06:00
Chase 500b30b2b3 lib/tt: add automake files 2019-10-23 15:34:20 -06:00
Chase 63956c4f61 lib/pam: add automake files: 2019-10-23 15:34:20 -06:00
Chase 6ec8c9e89c lib/csa: add automake file 2019-10-23 15:34:20 -06:00
Chase e4f4a4cfb5 lib: add automake file 2019-10-23 15:34:20 -06:00
Chase 97f55834e7 lib/DtXinerama: add automake file 2019-10-23 15:34:20 -06:00
Chase 91b0497ba0 lib/DtWidget: add automake file 2019-10-23 15:34:20 -06:00
Chase eb907bd68c lib/DtTerm: add automake files 2019-10-23 15:34:20 -06:00
Chase b587eb7bf3 lib/DtSvc: add automake files 2019-10-23 15:34:19 -06:00
Chase 8dfc0f62eb lib/DtSearch: add automake files 2019-10-23 15:34:19 -06:00
Chase 2deca46f0b lib/DtPrint: add automake file 2019-10-23 15:34:19 -06:00
Chase f1ed9a9919 lib/DtMrm: add automake file 2019-10-23 15:34:19 -06:00
Chase f6820cc8fd lib/DtHelp: add automakefiles 2019-10-23 15:34:19 -06:00
Chase ab15f92fbe include: add makefile 2019-10-23 15:34:19 -06:00
Chase 78951b54ff doc/LANG: add makefiles 2019-10-23 15:34:19 -06:00
Chase f517f8c526 doc/util: add automake files 2019-10-23 15:34:19 -06:00
Chase ee3a6d545e doc/common: add makefiles 2019-10-23 15:34:19 -06:00
Chase afd95a6ad8 doc/C: Add makefiles 2019-10-23 15:34:19 -06:00
Chase f2efbbce70 Add top level automake files 2019-10-23 15:34:19 -06:00
Jon Trulson 5e05b59025 ttserver: fixup forward (vexing) fucntion decl's in main, get rid of **environ 2019-10-19 18:36:54 -06:00
wmoxam 14e385d175 Remove all optional compile flags from dtwm that are not referenced anywhere, and are unlikely to ever be used 2019-10-17 20:34:14 -06:00
Jon Trulson ab863f212d dtmail: fix extra format args warnings 2019-10-15 21:22:11 -06:00
Jon Trulson a38f72c0c8 dtmail: fix NULL char embedded in format string 2019-10-15 21:12:17 -06:00
wmoxam ab741a1241 'notdef' means it's not used, so we remove it 2019-10-15 20:32:13 -06:00
wmoxam de81a5b518 Remove ancient HP VUE compatibility support 2019-10-15 20:32:05 -06:00
Chase 4107a1b6be Remove old jpeg files 2019-10-14 19:18:40 -06:00
wmoxam ca9cdf6cfc Remove 'oldcode' 2019-10-14 15:54:43 -06:00
wmoxam d380b0fac6 Remove legacysun code blocks 2019-10-14 15:54:33 -06:00
wmoxam e1e2004696 Remove unused HP_EXTENSIONS code blocks 2019-10-14 15:54:25 -06:00
Jon Trulson 7f414f5d35 dtpad: emit error on catopen() failure
This patch was manually added via a diff supplied from a user on the
CDE mailing list: Michele Ghisolfo <ghisolfo.m@gmail.com>
2019-10-14 14:42:21 -06:00
Jon Trulson 1972d3e378 dtfile: Add scroll wheel support
This patch was manually added via a diff supplied from a user on the
CDE mailing list: Michele Ghisolfo <ghisolfo.m@gmail.com>
2019-10-14 14:34:56 -06:00
Jon Trulson fd3cffcb37 dtcalc: increase highlight thickness to match Solaris CDE
This patch was manually added via a diff supplied from a user on the
CDE mailing list: Michele Ghisolfo <ghisolfo.m@gmail.com>
2019-10-14 14:30:58 -06:00
Jon Trulson ad94f2089d dtterm: add scroll wheel support
This patch was manually added via a diff supplied from a user on the
CDE mailing list: Michele Ghisolfo <ghisolfo.m@gmail.com>
2019-10-14 14:08:43 -06:00
wmoxam 923951b414 Remove NOTDONE code 2019-10-14 11:57:41 -06:00
Jon Trulson f2d52e35d6 linux: build all languages by default again
Someday we should be able to detect which languages are installed and
only build support for those.  Until then, build them all.
2019-10-13 22:24:38 -06:00
Jon Trulson 511c2bb427 Merge /u/jrubio/cdesktopenv/ branch discarded-qualifiers into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/17/
2019-10-13 17:09:04 +00:00
Jon Trulson 08a49581b7 Merge /u/jrubio/cdesktopenv/ branch delete-incomplete into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/18/
2019-10-13 17:06:14 +00:00
Jose Rubio 08cea15be5 get rid of the 'extern sys_errlist' and 'sys_nerr' in SysErrorMsg. 2019-10-13 10:23:49 +02:00
Jon Trulson 2e4deb41c0 Merge branch 'master' into utf8-conversion, after 2.3.0a release 2019-10-12 19:17:42 -06:00
Jon Trulson 34b5ee08c8 Merge /u/jrubio/cdesktopenv/ branch incompatible-pointer-types into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/16/
2019-10-12 21:43:45 +00:00
Jose Rubio 5c56c32d17 Fixes for a few -Wincompatible-pointer-types 2019-10-12 22:29:44 +02:00
Jon Trulson e05d138c4c Merge /u/jrubio/cdesktopenv/ branch int-conversion into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/14/
2019-10-11 23:58:44 +00:00
Jose Rubio c900cedbc9 Fix to delete-incomplete warnings. 2019-10-11 13:43:08 +02:00
Jose Rubio 0086a7067e Fix to compile warnings.
* discarded-qualifiers warnings.
* Function definitions, the .h doesn't match the .c.
* Added some include to ensure the .c has function definition.
2019-10-11 10:49:48 +02:00
Jose Rubio f9790767f3 Fix to different compile warnings.
Fix to multiple int-conversion
Removal of duplicated function definition in dtudcfonted/util.h
Added XtEventHandler prototypes to mtfgui
2019-10-10 19:59:40 +02:00
Jose Rubio 20ba7550cd Fix to Wenum-compare
It seems the purpose is to define a constant as an anonymous enum.
that behaviour triggers the enum  compare. Let's make it a constant.
2019-10-10 17:01:56 +02:00
Jose Rubio 707cc1256f Fix openbsd compile build errors due to dependency on libiconv
The path to libiconv is selected in config/cf/OpenBSD.cf reusing the
same trick  as FreeBSD does.
2019-09-27 21:54:06 +02:00
Jon Trulson ddc3c8857b Merge branch 'master' into utf8-conversion 2019-09-16 13:24:18 -06:00
Jose Rubio 507665352f Link TCL libraries and restrict tcl8.6 to SuSE only. 2019-09-16 14:58:21 +02:00
Jon Trulson 1ebd1a2416 Merge /u/jrubio/cdesktopenv/ branch implicit-int into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/9/
2019-09-12 22:14:19 +00:00
Jon Trulson 6e23c81914 Merge /u/jrubio/cdesktopenv/ branch pointer-compare into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/8/
2019-09-12 22:11:52 +00:00
Jon Trulson 0561080e16 Merge /u/jrubio/cdesktopenv/ branch linux_aarch64 into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/6/
2019-09-12 22:05:43 +00:00
Jon Trulson 086672e193 Merge /u/jrubio/cdesktopenv/ branch dtksh_include_sys_sysmacros into master
https://sourceforge.net/p/cdesktopenv/code/merge-requests/10/
2019-09-12 22:02:51 +00:00
Jose Rubio 51db5ff378 Fix for deprecated warnings related to gnu libc sys macros.
The patch only includes sysmacros for linux, the only target with gnu libc to avoid regression issues.
2019-09-12 13:10:02 +02:00
Jon Trulson 426a18d9ef isfname.c: remove register keyword 2019-09-11 17:48:06 -06:00
Jon Trulson b53728d3b3 ksh/libast: include sys/sysmacros.h in fmtdev.c for linux systems
Fix scraped from CDE forum post:
https://sourceforge.net/p/cdesktopenv/discussion/general/thread/24d7511a39/
2019-09-11 17:39:30 -06:00
Jose Rubio a49aedc946 FIX: Define Aarch64 as little endian so DtInfo compiles. 2019-08-29 11:12:26 +02:00
Jose Rubio f0c312b207 Fixes for warnings related to -Wimplicit-int. 2019-08-20 12:52:43 +02:00
Jose Rubio db7370b62b Cleanup of -Wpointer-compare warnings. 2019-08-19 18:02:25 +02:00
Jose Rubio 0d115796c2 Added linux/aarch64 as valid target. 2019-08-19 16:55:11 +02:00
Jon Trulson d59ec197e5 dtprintinfo: remove SUID root on install
This program should not be SUID root.  If you need it's services, just
run

sudo dtprintinfo -populate

TODO: dtprintinfo should only create it's actions (if ever) in a
user's .dt/types/ directory and not in any system-wide dirs.  No need
for root access at all.
2019-05-07 11:32:44 -06:00
Jon Trulson 05d231606e dtprintinfo: correct another possible buffer overflow 2019-05-07 11:21:49 -06:00
Jon Trulson 30cd56ac38 dtprintinfo: Fix a potential exploitable buffer overrun
This fixes a potentially exploitable buffer overrun in dtprintinfo.
This was brought to my attention based on a 0day exploit released for
Solaris CDE.

The exploit code does not work (or build) on linux, and the overrun is
in the heap rather than the stack as on Solaris, but it's easy to see
how this could be exploited.

The following is the content of the advisory:

8<-----------------------------------------------------------

@Mediaservice.net (Cybaze Group) Security Advisory #2019-01 (2019-05-07)

         Title:	Local privilege escalation via CDE dtprintinfo
   Application:	Common Desktop Environment 2.3.0 and earlier
     Platforms:	Oracle Solaris 10 1/13 (Update 11) and earlier
   Description:	A local attacker can gain root privileges by exploiting
		a buffer overflow in CDE dtprintinfo
        Author:	Marco Ivaldi <marco.ivaldi@mediaservice.net>
   Contributor:	Dave Aitel <dave.aitel@cyxtera.com> (original discovery)
 Vendor Status:	<secalert_us@oracle.com> notified on 2019-05-05
		<cdesktopenv-devel@lists.sourceforge.net> notified on 2019-05-05
           CVE:	The Common Vulnerabilities and Exposures project has not assigned
		a name to this issue yet
    References: https://lab.mediaservice.net/advisory/2019-01-cde-dtprintinfo.txt
		https://github.com/0xdea/raptor_infiltrate19
		https://sourceforge.net/p/cdesktopenv/wiki/Home/
		https://www.oracle.com/technetwork/server-storage/solaris10/
		https://www.mediaservice.net/
		https://infiltratecon.com/

1. Abstract.

A buffer overflow in the DtPrinterAction::PrintActionExists() function in the
Common Desktop Environment 2.3.0 and earlier, as used in Oracle Solaris 10 1/13
(Update 11) and earlier, allows local users to gain root privileges via a long
printer name passed to dtprintinfo by a malicious lpstat program.

This is a 0day vulnerability demonstrated at #INFILTRATE19 on May 2nd, 2019 in
the talk "A bug's life: story of a Solaris 0day".

2. Example Attack Session.

bash-3.2$ cat /etc/release
                    Oracle Solaris 10 1/13 s10x_u11wos_24a X86
  Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
                            Assembled 17 January 2013
bash-3.2$ uname -a
SunOS nostalgia 5.10 Generic_147148-26 i86pc i386 i86pc
bash-3.2$ id
uid=54322(raptor) gid=1(other)
bash-3.2$ gcc raptor_dtprintname_intel.c -o raptor_dtprintname_intel -Wall
bash-3.2$ ./raptor_dtprintname_intel 192.168.1.1:0
raptor_dtprintname_intel.c - dtprintinfo 0day, Solaris/Intel
Copyright (c) 2004-2019 Marco Ivaldi <raptor@0xdeadbeef.info>

Using SI_PLATFORM       : i86pc (5.10)
Using stack base        : 0x8047fff
Using rwx_mem address   : 0xfeffa004
Using sc address        : 0x8047f60
Using strcpy() address  : 0xfefe26a0

lpstat called with -v
lpstat called with -v
lpstat called with -d
uid=0(root) gid=1(other)

3. Affected Platforms.

All platforms shipping the Common Desktop Environment are potentially
affected. This includes:

* Oracle Solaris 10 1/13 (Update 11) and earlier [default installation]

According to the CDE Wiki, the following platforms are officially supported:

* All Official Ubuntu variants 12.04 - 18.04
* Debian 6, 7, 8, 9
* Fedora 17 at least
* Archlinux
* Red Hat
* Slackware 14.0
* OpenBSD
* NetBSD
* FreeBSD 9.2, 10.x, 11.x
* openSUSE Tumbleweed (gcc7)
* openSUSE Leap 4.2 (gcc4)
* SUSE 12 SP3 (gcc4)
* Solaris, OpenIndiana

4. Fix.

The upstream CDE maintainers have issued a patch for this vulnerability. Oracle
is investigating the issue via tracking# S1153109 and is expected to release a
fix for all affected-supported versions of Solaris via their quarterly Critical
Patch Update (CPU) program.

As a temporary workaround, it is possible to remove the setuid bit from the
dtprintinfo executable as follows:

bash-3.2# chmod -s /usr/dt/bin/dtprintinfo

5. Proof of Concept.

A working exploit for Oracle Solaris 10 1/13 (Update 11) Intel has been
developed as a proof of concept. Exploits for other Solaris versions and for
the SPARC architecture are also available. All exploits can be downloaded at:

https://github.com/0xdea/raptor_infiltrate19/
https://github.com/0xdea/exploits/

8<-----------------------------------------------------------
2019-05-07 11:21:49 -06:00
Jon Trulson 5cdeaf5b1f NLS: fix quote issue with various OS's in C/types/_common.dt.tmsg 2019-02-24 12:58:31 -07:00
Jon Trulson d6ece8fd00 Merge branch 'master' of ssh://git.code.sf.net/p/cdesktopenv/code 2019-02-24 12:56:10 -07:00
Jon Trulson c575ca9315 dtdockbook/instant: Add the proper paths for TCL on NetBSD
Patch submitted by Danilo Pecher <danilo.pecher@data-experts.biz>
2019-02-24 12:54:42 -07:00
Adam Sampson ae499c794e Explicitly initialise two more static pointers
"dtcm: Coverity 88006" fixed this for buf, but not for string in the
same function (and we may as well initialise string_head for consistency
too).
2019-01-26 00:07:36 +00:00
Adam Sampson 162c88b6ea Don't dereference an uninitialised pointer
This was an incorrect fix in "dtcm: Coverity 88382".
2019-01-26 00:05:54 +00:00
Adam Sampson a97ab71059 Avoid a NULL pointer dereference
"dtcm: Coverity 89051" fixed an instance of this on the previous line,
but not this one.
2019-01-26 00:03:34 +00:00
Jon Trulson 8ba629fcd1 Merge branch 'master' into utf8-conversion 2019-01-15 12:02:49 -07:00
Chase 4d7f9df692 Use iconv on linux 2019-01-14 10:48:28 -07:00
Alex Ivanov b9f352df59 define M4Cmd 2019-01-08 19:48:47 -07:00
tu83 d5faa0360c Fixed segfault for mode switching when compiled with clang
dtcalc compiled with clang segfaulted when switched
to a different mode like Deg to Rad or Financial to
Scientific. Was reproducable at least under FreeBSD/AMD64.
Fixed now.
2019-01-06 18:55:19 +01:00
Jon Trulson 2902373dbb Merge branch 'master' into utf8-conversion 2018-11-08 14:51:46 -07:00
Jon Trulson 76721c2348 dtcalc/calctool.h: Use include stdlib rather than extern declarations 2018-11-08 14:19:25 -07:00
Jon Trulson 965e5c0384 Merge branch 'master' into utf8-conversion-2 2018-11-07 11:24:00 -07:00
Peter Howkins cb4075e855 libDtHelp: Fix another regression caused by Coverity fix, clicking 'Help Manager' works again. 2018-11-07 17:04:59 +00:00
Peter Howkins fff0c54538 libDtHelp: Fix a regression with the Help Index pages caused by an overzealous Coverity fix 2018-11-07 01:05:56 +00:00
Jon Trulson cf89ba1a77 Merge branch 'master' into utf8-conversion-2 2018-11-05 15:52:14 -07:00
Jon Trulson 59dc231872 linux: DtHelp/StringFuncs, enable real iconv() support
For some reason, the #include of iconv.h was removed, and dummy stubs
were put in place on linux systems (only).  This caused iconv() calls
to be completely ignored.

Now we use iconv() just like very other OS we support.
2018-11-05 15:33:16 -07:00
Jon Trulson 54b7550205 utf8 conversion: mostly working, help has issues
Localization seems to work.  The main help viewer dies though.  Other
parts of help seem to work.  Index causes a crash too.

Crash:
*** Error in `/usr/dt/bin/dthelpview': malloc(): memory corruption (fast): 0x00000000021fefb0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f61814917e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x82651)[0x7f618149c651]
/lib/x86_64-linux-gnu/libc.so.6(__libc_malloc+0x54)[0x7f618149e184]
/usr/lib/x86_64-linux-gnu/libxcb.so.1(+0xc2ab)[0x7f617f71d2ab]
/usr/lib/x86_64-linux-gnu/libxcb.so.1(+0x9ed1)[0x7f617f71aed1]
/usr/lib/x86_64-linux-gnu/libxcb.so.1(+0xa31d)[0x7f617f71b31d]
/usr/lib/x86_64-linux-gnu/libxcb.so.1(xcb_writev+0x45)[0x7f617f71b3a5]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XSend+0x19e)[0x7f6181b2a54e]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XReply+0x82)[0x7f6181b2aa42]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XSync+0x4d)[0x7f6181b2652d]
/usr/lib/x86_64-linux-gnu/libXm.so.4(XmUpdateDisplay+0x49)[0x7f61821c1d89]
/usr/dt/lib/libDtHelp.so.2(+0x2cf1d)[0x7f6182ae8f1d]
/usr/dt/lib/libDtHelp.so.2(+0x2d66d)[0x7f6182ae966d]
/usr/dt/lib/libDtHelp.so.2(_DtHelpGlobSrchDisplayDialog+0x2205)[0x7f6182aebca5]
/usr/dt/lib/libDtHelp.so.2(_DtHelpDisplayIndexCB+0x26)[0x7f6182af07e6]
/usr/lib/x86_64-linux-gnu/libXm.so.4(+0xde9d5)[0x7f618216e9d5]
/usr/lib/x86_64-linux-gnu/libXm.so.4(+0xdf0c5)[0x7f618216f0c5]
/usr/lib/x86_64-linux-gnu/libXm.so.4(_XmDispatchGadgetInput+0x113)[0x7f6182140683]
/usr/lib/x86_64-linux-gnu/libXm.so.4(_XmGadgetActivate+0x22)[0x7f61821ef0b2]
/usr/lib/x86_64-linux-gnu/libXt.so.6(+0x48965)[0x7f6181e6f965]
/usr/lib/x86_64-linux-gnu/libXt.so.6(_XtTranslateEvent+0x31a)[0x7f6181e7090a]
/usr/lib/x86_64-linux-gnu/libXt.so.6(XtDispatchEventToWidget+0x4cb)[0x7f6181e4921b]
/usr/lib/x86_64-linux-gnu/libXt.so.6(+0x228dd)[0x7f6181e498dd]
/usr/lib/x86_64-linux-gnu/libXt.so.6(XtDispatchEvent+0xc9)[0x7f6181e499b9]
/usr/lib/x86_64-linux-gnu/libXt.so.6(XtAppProcessEvent+0x1d7)[0x7f6181e555d7]
/usr/lib/x86_64-linux-gnu/libXt.so.6(XtAppMainLoop+0x2d)[0x7f6181e49d9d]
/usr/dt/bin/dthelpview[0x401b77]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0)[0x7f618143a830]
/usr/dt/bin/dthelpview[0x401c89]
2018-11-04 20:21:20 -07:00
Jon Trulson 5839bfdc5f Fix .gitignore for ISO8859-1 docs 2018-11-04 19:31:22 -07:00
Jon Trulson c876a76f4f utf8 conversion: fix up seperation of locale and doc building
Docs (help and the dtinfo guides) are now always built using the
ISO8859-1 locale.  To support UTF-8, our docbook needs to be updated
to something from this century, ideally this decade.  In addition, a
conversion to XML would also be required as a result.  So, until that
happens, use ISO8859-1 for docs.

However, other locale information, like message catalogs, resource
files, and the like are now converted to UTF-8.

All supported languages are now built by default on linux again.
2018-11-04 19:25:57 -07:00
Jon Trulson 6a5dc63f3b UTF-8 conversion: fixup database Imakefiles, config and gitignore 2018-11-04 18:36:07 -07:00
Jon Trulson 63ad725508 UTF-8 conversion: programs/localized/sv_SE 2018-11-04 18:35:54 -07:00
Jon Trulson 8c73c01cb1 UTF-8 conversion: programs/localized/it_IT 2018-11-04 18:34:49 -07:00
Jon Trulson 592c6bc5d1 UTF-8 conversion: programs/localized/fr_FR 2018-11-04 18:34:43 -07:00
Jon Trulson 6867b04b1b UTF-8 conversion: programs/localized/es_ES 2018-11-04 18:34:34 -07:00
Jon Trulson c2997ba60c UTF-8 conversion: programs/localized/de_DE 2018-11-04 18:34:23 -07:00
Jon Trulson 0c42562d39 Remove useless logs/ directory 2018-11-04 18:34:06 -07:00
Jon Trulson d197b1c4bb UTF-8 conversion: convert imports/motif/localized 2018-11-04 18:33:31 -07:00
Jon Trulson 2c1f56d37c Merge branch 'master' into cde-next 2018-11-04 10:56:04 -07:00
Matthew R. Trower 0ffb04938c Repair and simplify installCDE.src:CleanDaemons() 2018-11-04 10:33:13 -07:00
Matthew R. Trower 041788debc Restore original `tail` functionality in ttsnoop, with POSIX args 2018-11-04 10:28:42 -07:00
Peter Howkins de69b56458 installCDE: fix outputting of missing files on install, caused by C&P error in shellshock fixes 2018-11-01 22:19:46 +00:00
Matthew R. Trower a94c997e8f Clean up UseInstalledX11 logic 2018-10-25 12:15:03 -06:00
Matthew R. Trower 012862e8ee Add default TCLLIB, and allow override in host.def
Restores build on Sun, and maybe others.
2018-10-25 11:43:43 -06:00
chase 7d6a4ae645 dbtoman: Improve readability 2018-10-14 18:01:20 -06:00
Jon Trulson 2fb1f12654 dtdocbook/instant: add Tcl_GetErrorLine check for older versions of Tcl 2018-10-07 13:28:04 -06:00
chase 1db1e96b08 Clean up OPENBUGS
This patch fixes some wierd word splicing that occured with the importing of
the sources, which caused the last letter of many bugs to be cut off, with
some of them cutting off more, I made my best judgement on what was supposed
to be there.

This patch also gets rid of old bugs and software that CDE no longer includes.
2018-10-06 17:01:45 -06:00
chase dd68514e4f Remove hpversion.h from repository
This patch removes hpversion.h from the repository, this also untangles a
lot of ifdef mess. This closes bug CDExc19524.
2018-10-06 17:00:38 -06:00
chase 90a2b2848a remove ultrix support 2018-09-30 17:27:04 -06:00
chase d8c017caa2 gpftobdf.c: fix long int comiler warnings 2018-09-30 17:26:27 -06:00
chase 286d1895c4 debian: misc cleanup 2018-09-30 17:26:10 -06:00
Jon Trulson 2dadc23e0e Merge branch 'master' into cde-next 2018-09-22 15:50:13 -06:00
Jon Trulson 77a027039c docbook.tcl, instant: finish remaining help generation issues with tcl
In this commit, we convert FreeBSD and OpenBSD to use a system version
of TCL (8.6).

We also get rid of the hairy and buggy "CompareI18NStrings" custom Tcl
function and use the newer Tcl's builtin dictionary sort mechanism for
generating the Indexes and Glossaries, which were silently broken in
previous commits.

It was just not possible to use the same Tcl code in modern versions
of Tcl in addition to the ancient version included with CDE - so, now
we will always depend on the system version.  It's been tested with
8.6 and 8.7 versions of Tcl with great results.
2018-09-22 12:27:27 -06:00
Jon Trulson 1fb82e3327 Remove ancient included tcl code 2018-09-22 12:27:09 -06:00
Jon Trulson 1c40db8eb0 dtdocbook/tcl/tcl.h: Add compatibility defines for old Tcl
dtdocbook/instant has been modified to use a more modern Tcl (8.6),
which means certain functions are not present when we are using the
dtdocbook/tcl (7.5) version of tcl instead of a modern system version.

So, create some defines that should work around this problem.
2018-09-20 16:50:28 -06:00
Jon Trulson 6a72e2cea8 Change version to 2.3.0a (devel) 2018-09-20 16:49:01 -06:00
Jon Trulson e82991579f use system tcl: clean up Imake files for dtdocbook/instant 2018-09-19 17:49:15 -06:00
Jon Trulson 23c4c0667d instant: encode 8bit chars to keep Tcl happy 2018-09-19 17:40:25 -06:00
Jon Trulson 7712950fb7 docbook/instant: fix a few more issues 2018-09-19 17:40:25 -06:00
Jon Trulson 776e031b60 docbook.tcl: fix up some problems using a modern Tcl
One issue that came up was attempting to read array values indexed by
a key that didn't exist when generating indexes and glossaries.

I am not sure why this hasn't been a problem before, but for now, we
simply won't try to emit array values for non-existant array indexes.
2018-09-19 17:40:25 -06:00
Jon Trulson 68559d4f76 tcl: use the system version, initial work only on linux for now 2018-09-19 17:40:25 -06:00
chase bf0b602b9a il: Remove deprecated files 2018-08-26 16:58:38 -06:00
Jon Trulson 58af8b5c5e configShlibs.src: Fixup some bugs introduced by previous commits 2018-08-26 16:45:22 -06:00
chase d002967908 dtprintegrate: fix shellcheck warnings 2018-08-26 15:45:23 -06:00
chase 6f2d38aaa0 dtappintegrate.src and dtopen.src: fix shellcheck warnings 2018-08-26 15:45:08 -06:00
chase 5e96644596 DtsMM.c: Remove null in string 2018-08-26 15:44:47 -06:00
Jon Trulson fa4d519aef sgmls: remove from repository - we always use nsgmls
This was part of Chase's sgml removal patch, but was not properly
merged by me, leaving the files intact.
2018-08-26 13:17:46 -06:00
Jon Trulson a29bd8937a dtfile: Fix up CopyCheckDeletePermission() and CheckDeletePermission
Remove calls to bogus utility functions in cases where the user is
root and the filesystem in question is an NFS filesystem.

For now, __linux___ and CSRG_BASED machines will use statfs to
determine whether to test delete-ability.  For other systems, just do
the create/delete test always if the user is root.
2018-08-25 17:38:48 -06:00
David Cantrell 9cb1f309f2 Patch out use of deprecated and now removed ustat(2) function on Linux.
dtfile makes use of ustat(2) on certain systems.  This call has been
deprecated in glibc for a while and now, as of glibc-2.28, it has been
removed.  The recommended replacement is to use statfs(2).
2018-08-25 17:10:02 -06:00
chase fcdeb932d3 Dtdocbook: Remove old sgmls program 2018-08-25 16:54:16 -06:00
chase d12ad886c1 Remove old windows support 2018-08-25 15:47:54 -06:00
chase 1610ff3415 Remove amoeba support 2018-08-25 15:47:36 -06:00
chase e8e0364121 post_install: fix shellcheck warnings 2018-08-25 15:47:18 -06:00
chase ba28368c40 CDE-RUN: Readd binary entries for dtudcfonted 2018-08-18 16:37:36 -06:00
chase b491f9134f Refactor and reimplement dtudcfonted 2018-08-18 16:37:36 -06:00
chase 0f1aaa3e46 Revert "Disable building of dtudcfonted and dtudcexch"
This reverts commit 7f70748d65.
2018-08-18 16:37:36 -06:00
chase 6b713f12b5 Revert "dtudcfonted, dtudcexch: delete from repository"
This reverts commit e0036e6167.
2018-08-18 16:37:36 -06:00
chase 5fb08c15d9 linksLast and uncomment: Fix shellcheck warnings 2018-08-18 16:37:36 -06:00
chase ff17b57585 installCDE.src: Fix shellcheck warnings 2018-08-18 16:37:18 -06:00
Peter Howkins ddaa606d36 libDtHelp: Cov 88381 2018-08-11 01:28:57 +01:00
Peter Howkins 6a15c3deaa libDtHelp: Cov 88365 2018-08-11 01:26:59 +01:00
Peter Howkins f14e247a41 libDtHelp: Cov 89129 and 88355 2018-08-11 01:18:45 +01:00
Peter Howkins c9f5a14778 libDtHelp: Cov 88302 2018-08-11 01:14:03 +01:00
Peter Howkins 027bc031fd libDtHelp: Cov 88890 and 88294 2018-08-11 01:11:04 +01:00
Peter Howkins b4c10b4d63 libDtHelp: Cov 88275 2018-08-11 01:08:17 +01:00
Peter Howkins 5571bbceae libDtHelp: Cov 88262 and 88459 2018-08-11 01:05:01 +01:00
Peter Howkins f74bf1a29f libDtHelp: Cov 88240 2018-08-11 01:03:23 +01:00
Peter Howkins a97c7370a5 libDtHelp: Cov 88209 2018-08-11 01:01:13 +01:00
Peter Howkins 1c0312de48 libDtHelp: Cov 88162 2018-08-11 00:58:46 +01:00
Peter Howkins 2b2a1225da libDtHelp: Cov 88119 2018-08-11 00:57:11 +01:00
Peter Howkins 30809197c7 libDtHelp: Cov 88109 2018-08-11 00:55:03 +01:00