Commit Graph

61 Commits

Author SHA1 Message Date
Patrick Georgi ae001c320f fix misleading indentation
Mostly to shut up the compiler, but some real bugs hidden in there.
2025-12-18 22:58:26 +01:00
Chase e64189f19d Feature test for poll.h 2025-12-14 13:27:55 -07:00
Chase f38cd20c5c dtmail: remove DEAD_WOOD code 2025-11-30 16:26:42 -07:00
Jon Trulson 2d0c4d6d39 Kill off OSMAJORVERSION and OSMINORVERSION defines/cpp flags
This has meant very little for a long time as configure.ac just
hardcoded these values depending on the current OS versions at the
time.

The only place where this is really 'needed' is XlationSvc.c in DtSvc
so that differences between locale specifications on various versions
of an OS can be accounted for. So for now, we just define those when
building DtSvc.

We could probably safely remove them as well with an update to the
Xlate locale DB to remove ancient cruft we don't care about anymore.

For various other modules, like dtlogin, dtsession, etc we just use
the code that was already being used due to the hardcoded values we've
had for the last 10-ish years.
2022-08-06 17:57:44 -06:00
Chase 45cee195bd Generify source code
Previously we would fail in some parts of the code if we did not have a
premade configuration, now we use any code that was marked as Linux, BSD and
Solaris as our basis in order to support building unknown Unix systems.
2022-08-06 11:31:51 -06:00
Chase edf4319548 Discontinue HPUX support 2022-07-23 17:49:33 -06:00
Peter Howkins 238385530d dtmail: Resolve format-overflow issues 2021-12-24 10:50:28 -07:00
Peter Howkins 72b59ec869 dtmail: Resolve uninitialized warnings 2021-12-24 10:50:28 -07:00
Jon Trulson e10d06f210 configure/Makefiles: add checks for Xmu, Xext, and Xdmcp
We also remove sun pro specific options, and do some general cleanup
as well as remove hardcoded library refs like -lXm, -lXext, etc...
2021-12-21 16:42:22 -07:00
Jon Trulson adc056eb83 MIMEBodyPart.C: fix a couple sizeof-pointer-memaccess warnings 2021-12-11 17:39:35 -07:00
Jon Trulson dda11f0e38 Fix a bunch of -Wempty-body warnings reported by clang
Many of these were real bugs, like:

if (cond);
   do_something

etc...

Others were just cosmetic - like placing the ';' on a separate line to
make the intention clear.
2021-12-11 13:10:24 -07:00
Jon Trulson 51646fb06a programs/: remove Imakefiles for completed modules 2021-07-03 19:12:43 -06:00
Lev Kujawski a6ea2a2d52 Centralize catgets() calls through MsgCat
CDE has relied upon catgets() implementations following a relaxed
interpretation of the XPG internationalization standard that ignored
-1, the standard error value returned by catopen, as the catalog
argument. However, this same behavior causes segmentation faults with
the musl C library.

This patch:

- Centralizes (with the exception of ToolTalk) all calls to catopen(),
  catgets(), and catclose() through MsgCat within the DtSvc library.
- Prevents calls to catgets() and catclose() that rely upon
  undefined behavior.
- Eliminates a number of bespoke catgets() wrappers, including multiple
  redundant caching implementations designed to work around a design
  peculiarity in HP/UX.
- Eases building CDE without XPG internationalization support by providing
  the appropriate macros.
2021-06-02 19:55:15 -06:00
Jon Trulson c329d5cfd7 Remove $(TIRPCINC) from all Makefile.am files - it no longer exists
Also, restructure some of the dependencies in the lib/tt binaries.  We
will link with libtt (which will include libtirpc as a dependency),
and XTOOLLIB - all the right X11 stuff without needing to add it to
every OS.  Removed several uneeded OS specializations ("if LINUX",
etc) as a result.
2019-11-20 18:52:29 -07:00
Jon Trulson 77dfe92b3c dtmail: Make it build. There is more work to be done here.
Specifically, we should be able to have libDtMail subdir build all of
it's objects directly w/o intervening Makefile.am's and archive .a
libs.
2019-10-29 18:34:05 -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
Chase d08d22cb5d programs/dtmail: add automake files 2019-10-23 15:34:20 -06:00
Jon Trulson a38f72c0c8 dtmail: fix NULL char embedded in format string 2019-10-15 21:12:17 -06:00
Chase 4d7f9df692 Use iconv on linux 2019-01-14 10:48:28 -07:00
Jon Trulson d0a4f777d8 dtmail: remove register keyword 2018-06-27 22:20:34 -06:00
Jon Trulson ac883b6972 FreeBSD 11: Fix clang (v6) builds
While CDE builds fine with gcc6 on FreeBSD 11, the default clang build
was broken in a few places.  This commit allows CDE to build now using
the default clang 6 system compiler.
2018-06-14 18:32:35 -06:00
chase 4172308892 Remove reallyoldsun defines 2018-06-09 18:32:42 -06:00
chase 809c3d8bb6 Spelling fixes 2018-05-31 22:23:19 -06:00
Ulrich Wilkens 07f272122d Fix Linux rpc problems with new glibc 2018-05-31 18:00:22 -06:00
chase 4f5e7fe5e3 Use POSIX macros for linux 2018-05-24 18:22:55 -06:00
chase 164e695cd0 remove OSF1 support 2018-05-24 14:25:26 -06:00
chase 07900bd93b Remove Unixware and openserver support 2018-05-20 12:13:07 -06:00
chase 8a4f389634 Remove UXPDS support 2018-05-15 20:27:22 -06:00
chase 3ccf3a8b86 Add missing license headers on *.hh files and others 2018-05-12 15:49:13 -06:00
chase 33d2749ea3 Last of the spelling fixed 2018-04-28 12:36:44 -06:00
chase 6d3a19d8f9 Even more spelling fixed 2018-04-28 12:36:33 -06:00
chase 1fe5a550b2 Fix typo in license headers 2018-04-28 12:30:20 -06:00
Peter Howkins 3cf92f3741 dtmail: Further Coverity fixes 2018-04-24 02:38:56 +01:00
Peter Howkins f905d25392 dtmail: resolve coverity warnings related to uninitialised members in C++ classes 2018-04-20 02:36:24 +01:00
Peter Howkins 0b38496bd8 dtmail: resolve 'deference before null check' errors related to if(!NULL) checks around free() calls 2018-04-02 20:29:28 +01:00
Jon Trulson ecee8b3f3a dtmail/DtMailRc.C: coverity CID 88975; use after free 2018-03-31 17:46:53 -06:00
Swift Griggs 1fdcd4c93d Patches from pkgsrc-WIP 2016-08-05 11:21:06 -06:00
Peter Howkins 0a0e1eebf5 dtmail: Resolve 50 compiler warnings. 2015-01-06 15:07:55 +00:00
Ulrich Wilkens 01d6c363fa OpenIndiana and Solaris port 2014-10-28 13:40:11 -06:00
Jon Trulson 78fec87fa6 Threads.C: NULL is not 0 2014-03-22 19:09:46 -06:00
Peter Tribble 468d576030 initial illumos port 2014-03-22 16:33:11 -06:00
Ulrich Wilkens 2712d5f787 NetBSD port 2014-02-22 19:12:19 -07:00
Ulrich Wilkens 2d08153289 correction of message files 2013-09-15 19:35:53 -06:00
Pascal Stumpf 5b9d3fc5ec Use /usr/sbin/sendmail as default mailer on OpenBSD. 2012-11-19 19:44:29 -07: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
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
Ulrich Wilkens 5c68d52ce4 Two fixes for dtmail 2012-08-29 20:40:23 -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 3bbcda35b9 Find correct system includes and libs on FreeBSD. 2012-08-19 18:08:31 -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