From: Pascal Stumpf Date: Sat, 11 Aug 2012 11:38:22 +0000 (+0200) Subject: OpenBSD patches for dtcalc, dtdocbook, dthelp and dtimsstart. X-Git-Tag: 2.2.0b~83^2~25 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=3e4517dc2aff69c57859f134edaf11dc9c14c934;p=oweals%2Fcde.git OpenBSD patches for dtcalc, dtdocbook, dthelp and dtimsstart. --- diff --git a/cde/programs/dtcalc/motif.c b/cde/programs/dtcalc/motif.c index 2a663e4d..e3db030d 100644 --- a/cde/programs/dtcalc/motif.c +++ b/cde/programs/dtcalc/motif.c @@ -80,6 +80,7 @@ #include #include #include +#include /* Copied from BaseClassI.h */ extern XmWidgetExtData _XmGetWidgetExtData( Widget widget, @@ -266,6 +267,12 @@ extern Vars v ; /* Calctool variables and options. */ char translations_return[] = "Return:ManagerGadgetSelect()"; static Boolean NoDisplay=False; +extern XtPointer _XmStringUngenerate ( + XmString string, + XmStringTag tag, + XmTextType tag_type, + XmTextType output_type); + int main(argc, argv) int argc ; diff --git a/cde/programs/dtdocbook/instant/util.c b/cde/programs/dtdocbook/instant/util.c index 19ab9bdd..eb3d2647 100644 --- a/cde/programs/dtdocbook/instant/util.c +++ b/cde/programs/dtdocbook/instant/util.c @@ -78,7 +78,9 @@ static char *RCSid = #include #include #include +#if !defined(CSRG_BASED) #include +#endif #include "general.h" diff --git a/cde/programs/dthelp/parser/canon1/helptag/global.h b/cde/programs/dthelp/parser/canon1/helptag/global.h index 7b619d11..2e9e2674 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/global.h +++ b/cde/programs/dthelp/parser/canon1/helptag/global.h @@ -44,7 +44,7 @@ #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) #include #include #include @@ -179,7 +179,7 @@ EXTERN char dirsep #if defined(MSDOS) INIT('\\') #else -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) INIT('/') #else ****define directory separator here**** @@ -187,7 +187,7 @@ INIT('/') #endif ; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)|| defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__)|| defined(__osf__) || defined(linux) || defined(CSRG_BASED) #define CSEP '/' #define SSEP "/" #else diff --git a/cde/programs/dthelp/parser/canon1/helptag/help.c b/cde/programs/dthelp/parser/canon1/helptag/help.c index 830bf2ec..21625953 100644 --- a/cde/programs/dthelp/parser/canon1/helptag/help.c +++ b/cde/programs/dthelp/parser/canon1/helptag/help.c @@ -356,7 +356,7 @@ char *qualname; char *unqualname; #endif { -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) FILE *f; #endif @@ -381,7 +381,7 @@ else fnp = fn; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -495,7 +495,7 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) #else strupr ( qualname ); #endif diff --git a/cde/programs/dthelp/parser/canon1/util/wchar.c b/cde/programs/dthelp/parser/canon1/util/wchar.c index 570aaa87..d49e825f 100644 --- a/cde/programs/dthelp/parser/canon1/util/wchar.c +++ b/cde/programs/dthelp/parser/canon1/util/wchar.c @@ -26,6 +26,8 @@ */ #include "basic.h" +#include "trie.h" +#include "cont.h" /* compare two wide character strings */ diff --git a/cde/programs/dthelp/parser/pass1/helptag/help.c b/cde/programs/dthelp/parser/pass1/helptag/help.c index 7e291cc2..115e5486 100644 --- a/cde/programs/dthelp/parser/pass1/helptag/help.c +++ b/cde/programs/dthelp/parser/pass1/helptag/help.c @@ -355,7 +355,7 @@ char *qualname; char *unqualname; #endif { -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) FILE *f; #endif char fn[FNAMELEN]; @@ -379,7 +379,7 @@ else fnp = fn; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) qualname[0] = '\0'; gp = qualname + strlen(qualname); roomleft = roomleft - strlen(qualname); @@ -493,7 +493,7 @@ do { while (1); *strrchr(qualname, CSEP) = '\0'; -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED) #else strupr ( qualname ); #endif diff --git a/cde/programs/dthelp/parser/pass1/util/wchar.c b/cde/programs/dthelp/parser/pass1/util/wchar.c index 44d388a4..0d8b46ce 100644 --- a/cde/programs/dthelp/parser/pass1/util/wchar.c +++ b/cde/programs/dthelp/parser/pass1/util/wchar.c @@ -26,6 +26,8 @@ */ #include "basic.h" +#include "trie.h" +#include "cont.h" /* compare two wide character strings */ diff --git a/cde/programs/dthelp/parser/pass2/htag2/global.h b/cde/programs/dthelp/parser/pass2/htag2/global.h index e14bcdef..5ff444a3 100644 --- a/cde/programs/dthelp/parser/pass2/htag2/global.h +++ b/cde/programs/dthelp/parser/pass2/htag2/global.h @@ -44,7 +44,7 @@ #endif #include -#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(linux) +#if defined(hpux) || defined(_AIX) || defined(sun) || defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED) #include #include #include diff --git a/cde/programs/dthelp/parser/pass2/util/wchar.c b/cde/programs/dthelp/parser/pass2/util/wchar.c index c2bab001..780bbf40 100644 --- a/cde/programs/dthelp/parser/pass2/util/wchar.c +++ b/cde/programs/dthelp/parser/pass2/util/wchar.c @@ -26,6 +26,8 @@ */ #include "basic.h" +#include "trie.h" +#include "cont.h" /* compare two wide character strings */ diff --git a/cde/programs/dtimsstart/main.c b/cde/programs/dtimsstart/main.c index 735f8bb4..ef445113 100644 --- a/cde/programs/dtimsstart/main.c +++ b/cde/programs/dtimsstart/main.c @@ -136,7 +136,7 @@ main (argc, argv) case MODE_START: #ifndef DEBUG2 -# ifdef __osf__ +# if defined(__osf__) || defined(CSRG_BASED) setsid(); # else setpgrp(); diff --git a/cde/programs/dtimsstart/start.c b/cde/programs/dtimsstart/start.c index be6a0b7f..68800512 100644 --- a/cde/programs/dtimsstart/start.c +++ b/cde/programs/dtimsstart/start.c @@ -28,7 +28,7 @@ #include #include -#if (defined(USL) || defined(__uxp__) | defined(linux)) && !defined(_NFILE) +#if (defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED)) && !defined(_NFILE) #define _NFILE FOPEN_MAX #endif @@ -233,7 +233,7 @@ void set_sig_chld(enable) int enable; { DPR(("set_sig_chld(%s)\n", enable ? "Enabled" : "Disabled")); - signal(SIGCLD, enable ? on_sig_chld : SIG_IGN); + signal(SIGCHLD, enable ? on_sig_chld : SIG_IGN); } int im_mod_available(renv) @@ -620,7 +620,7 @@ static int invoke_ims(sel) for (i = 0; i < _NFILE; i++) (void) close(i); -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else setpgrp(); @@ -668,7 +668,7 @@ static void on_sig_chld(sig) if (pid == -1) return; - signal(SIGCLD, on_sig_chld); + signal(SIGCHLD, on_sig_chld); if (WIFEXITED(wait_status)) { cause = ErrImsAborted;