Commit Graph

15 Commits

Author SHA1 Message Date
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
Peter Howkins
67f62e5a8a all: remove deprecated sys_errlist[] and replace with ANSI C strerror() 2020-11-02 05:30:08 +00:00
Peter Howkins
9e038c8b2b dtcm: Coverity 89685 2018-07-13 19:04:37 +01:00
Peter Howkins
b24e4a3e6f dtcm: Coverity 89667 2018-07-13 17:27:41 +01:00
Peter Howkins
008c224771 dtcm: Coverity 89287 2018-07-04 23:02:09 +01:00
Peter Howkins
4f40139793 dtcm: Coverity 88613 2018-07-04 22:09:23 +01:00
Peter Howkins
3c056ef018 dtcm: Coverity 88514 2018-07-04 22:07:44 +01:00
chase
4f5e7fe5e3 Use POSIX macros for linux 2018-05-24 18:22:55 -06:00
chase
1fe5a550b2 Fix typo in license headers 2018-04-28 12:30:20 -06:00
Peter Howkins
8baeb4c0a0 dtcm: Resolve 303 compiler warnings. 2015-01-13 14:22:25 +00: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
Peter Howkins
ca9da25d44 dtcm: Resolve all -Wformat-security warnings. 2012-08-29 20:16:01 +01: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
Peter Howkins
c884521619 Add GNU LGPL headers to all .c .C and .h files 2012-03-10 18:58:32 +00:00
Peter Howkins
83b6996daa Initial import of the CDE 2.1.30 sources from the Open Group. 2012-03-10 18:21:40 +00:00