another round of easy fixes.
>From 82ebb6b7a5a234557863149d01e8c71b7704c1c3 Mon Sep 17 00:00:00 2001
From: Pascal Stumpf <pascal.stu...@cubes.de>
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 c851ce2..431dbb5 100644
--- a/cde/lib/DtWidget/Editor.c
+++ b/cde/lib/DtWidget/Editor.c
@@ -67,6 +67,8 @@
 #elif defined(linux)
 # include <wctype.h>
 # define NO_putwc
+#elif defined(CSRG_BASED)
+# include <wctype.h>
 #endif /* linux */
 
 #include <sys/wait.h>
diff --git a/cde/programs/dtaction/Main.c b/cde/programs/dtaction/Main.c
index b06a9f9..866ec8d 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 21c5536..7740c98 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 <values.h>
+#endif
 
 #include <ab_private/abobj.h>
 #include <ab_private/abobj_set.h>
diff --git a/cde/programs/dtappbuilder/src/ab/abobj_set.c 
b/cde/programs/dtappbuilder/src/ab/abobj_set.c
index 92488f1..0c748b0 100644
--- a/cde/programs/dtappbuilder/src/ab/abobj_set.c
+++ b/cde/programs/dtappbuilder/src/ab/abobj_set.c
@@ -49,7 +49,9 @@
  ***********************************************************************
  */
 #include <stdio.h>
+#if !defined(CSRG_BASED)
 #include <values.h>
+#endif
 #include <Xm/Xm.h>
 #include <Xm/List.h>
 #include <Dt/SpinBox.h>
diff --git a/cde/programs/dtappbuilder/src/ab/prop.c 
b/cde/programs/dtappbuilder/src/ab/prop.c
index 682f2f8..9aec493 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 a7e5c16..8ff07c9 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 <X11/Intrinsic.h>
+#if !defined(CSRG_BASED)
 #include <values.h>
+#endif
 #include <limits.h>
 #include <ab_private/obj.h>
 #include <ab_private/pal.h>
diff --git a/cde/programs/dtappbuilder/src/ab/propP.h 
b/cde/programs/dtappbuilder/src/ab/propP.h
index 33052c7..798bcdc 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 <X11/Intrinsic.h>
+#if !defined(CSRG_BASED)
 #include <values.h>
+#endif
 #include <ab_private/obj.h>
 #include <ab_private/pal.h>
 #include <ab_private/abobj_edit.h>
diff --git a/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c 
b/cde/programs/dtappbuilder/src/abmf/stubs_c_file.c
index 06007c2..6440a76 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 <va_list.h> 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 7eb647c..93d5619 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 204b05c..8b87316 100644
--- a/cde/programs/dtappbuilder/src/libABobj/obj.c
+++ b/cde/programs/dtappbuilder/src/libABobj/obj.c
@@ -47,7 +47,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <ctype.h>
+#if !defined(CSRG_BASED)
 #include <values.h>
+#endif
 #include <stdlib.h>
 #include <sys/param.h>
 #include <string.h>
-- 
1.7.6

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to