From 3718075b7ca696eb3541be3619fa6e8b5a69979b Mon Sep 17 00:00:00 2001 From: Pascal Stumpf Date: Fri, 10 Aug 2012 14:35:23 +0200 Subject: [PATCH] OpenBSD fixes for DtWidget, dtaction, dtappbuilder. --- cde/lib/DtWidget/Editor.c | 2 ++ cde/programs/dtaction/Main.c | 6 +++--- cde/programs/dtappbuilder/src/ab/abobjP.h | 2 ++ cde/programs/dtappbuilder/src/ab/abobj_set.c | 2 ++ cde/programs/dtappbuilder/src/ab/prop.c | 4 ++++ cde/programs/dtappbuilder/src/ab/prop.h | 2 ++ cde/programs/dtappbuilder/src/ab/propP.h | 2 ++ cde/programs/dtappbuilder/src/abmf/stubs_c_file.c | 2 +- cde/programs/dtappbuilder/src/abmf/write_c.c | 2 +- cde/programs/dtappbuilder/src/libABobj/obj.c | 2 ++ 10 files changed, 21 insertions(+), 5 deletions(-) diff --git a/cde/lib/DtWidget/Editor.c b/cde/lib/DtWidget/Editor.c index c851ce20..431dbb5b 100644 --- a/cde/lib/DtWidget/Editor.c +++ b/cde/lib/DtWidget/Editor.c @@ -67,6 +67,8 @@ #elif defined(linux) # include # define NO_putwc +#elif defined(CSRG_BASED) +# include #endif /* linux */ #include diff --git a/cde/programs/dtaction/Main.c b/cde/programs/dtaction/Main.c index b06a9f99..866ec8db 100644 --- a/cde/programs/dtaction/Main.c +++ b/cde/programs/dtaction/Main.c @@ -295,7 +295,7 @@ main( XtSetLanguageProc(NULL, NULL, NULL); _DtEnvControl(DT_ENV_SET); - (void) signal(SIGCLD, (void (*)())SIG_IGN); + (void) signal(SIGCHLD, (void (*)())SIG_IGN); /* Initialize the toolkit and open the display */ XtToolkitInitialize() ; @@ -407,7 +407,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) /* fix process gid */ #if defined(SVR4) || defined(_AIX) setgid(rgid); -#elif defined(__osf__) || defined(linux) +#elif defined(__osf__) || defined(linux) || defined(CSRG_BASED) setregid(rgid, rgid); #elif defined(__hpux) setresgid(rgid, rgid, rgid); @@ -418,7 +418,7 @@ SetGidUid ( unsigned short rgid, unsigned short ruid ) /* fix process uid */ #if defined (SVR4) || defined (_AIX) setuid(ruid); -#elif defined(__osf__) || defined(linux) +#elif defined(__osf__) || defined(linux) || defined(CSRG_BASED) setreuid(ruid, ruid); #elif defined(__hpux) setresuid(ruid, ruid, ruid); diff --git a/cde/programs/dtappbuilder/src/ab/abobjP.h b/cde/programs/dtappbuilder/src/ab/abobjP.h index 21c5536f..7740c98e 100644 --- a/cde/programs/dtappbuilder/src/ab/abobjP.h +++ b/cde/programs/dtappbuilder/src/ab/abobjP.h @@ -47,7 +47,9 @@ #define _ABOBJ_P_H_ +#if !defined(CSRG_BASED) #include +#endif #include #include diff --git a/cde/programs/dtappbuilder/src/ab/abobj_set.c b/cde/programs/dtappbuilder/src/ab/abobj_set.c index 92488f14..0c748b09 100644 --- a/cde/programs/dtappbuilder/src/ab/abobj_set.c +++ b/cde/programs/dtappbuilder/src/ab/abobj_set.c @@ -49,7 +49,9 @@ *********************************************************************** */ #include +#if !defined(CSRG_BASED) #include +#endif #include #include #include
diff --git a/cde/programs/dtappbuilder/src/ab/prop.c b/cde/programs/dtappbuilder/src/ab/prop.c index 682f2f83..9aec493c 100644 --- a/cde/programs/dtappbuilder/src/ab/prop.c +++ b/cde/programs/dtappbuilder/src/ab/prop.c @@ -86,6 +86,10 @@ #include "dtbuilder.h" #include "revolv_ui.h" +#if defined(CSRG_BASED) +#define MAXINT INT_MAX +#endif + char *LabelForString = NULL; char *LabelForGraphic = NULL; char *NoneItem = NULL; diff --git a/cde/programs/dtappbuilder/src/ab/prop.h b/cde/programs/dtappbuilder/src/ab/prop.h index a7e5c166..8ff07c97 100644 --- a/cde/programs/dtappbuilder/src/ab/prop.h +++ b/cde/programs/dtappbuilder/src/ab/prop.h @@ -47,7 +47,9 @@ #define _PROPS_H_ #include +#if !defined(CSRG_BASED) #include +#endif #include #include #include diff --git a/cde/programs/dtappbuilder/src/ab/propP.h b/cde/programs/dtappbuilder/src/ab/propP.h index 33052c79..798bcdc4 100644 --- a/cde/programs/dtappbuilder/src/ab/propP.h +++ b/cde/programs/dtappbuilder/src/ab/propP.h @@ -48,7 +48,9 @@ #define _PROPP_H_ #include +#if !defined(CSRG_BASED) #include +#endif #include #include #include diff --git a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c index 06007c22..6440a764 100644 --- a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c +++ b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c @@ -279,7 +279,7 @@ printf_setval(GenCodeInfo genCodeInfo, ABObj obj, ...) { int return_value = 0; File codeFile = genCodeInfo->code_file; -#if defined(__osf__) || defined(linux) +#if defined(__osf__) || defined(linux) || defined(CSRG_BASED) /* OSF/1 define va_list in as structure of char ** and int * Sun define va_list as void * */ va_list paramList = { NULL, 0 }; diff --git a/cde/programs/dtappbuilder/src/abmf/write_c.c b/cde/programs/dtappbuilder/src/abmf/write_c.c index 7eb647ce..93d56193 100644 --- a/cde/programs/dtappbuilder/src/abmf/write_c.c +++ b/cde/programs/dtappbuilder/src/abmf/write_c.c @@ -350,7 +350,7 @@ write_func_def_params( va_list va_params ) { -#if defined(__ppc) || defined(linux) +#if defined(__ppc) || defined(linux) || defined(CSRG_BASED) #define va_start_params() __va_copy(params, va_params) #else #define va_start_params() (params = va_params) diff --git a/cde/programs/dtappbuilder/src/libABobj/obj.c b/cde/programs/dtappbuilder/src/libABobj/obj.c index 204b05c2..8b873161 100644 --- a/cde/programs/dtappbuilder/src/libABobj/obj.c +++ b/cde/programs/dtappbuilder/src/libABobj/obj.c @@ -47,7 +47,9 @@ #include #include #include +#if !defined(CSRG_BASED) #include +#endif #include #include #include -- 2.25.1