OpenBSD fixes for DtWidget, dtaction, dtappbuilder.
authorPascal Stumpf <Pascal.Stumpf@cubes.de>
Fri, 10 Aug 2012 12:35:23 +0000 (14:35 +0200)
committerJon Trulson <jon@radscan.com>
Fri, 10 Aug 2012 20:10:52 +0000 (14:10 -0600)
cde/lib/DtWidget/Editor.c
cde/programs/dtaction/Main.c
cde/programs/dtappbuilder/src/ab/abobjP.h
cde/programs/dtappbuilder/src/ab/abobj_set.c
cde/programs/dtappbuilder/src/ab/prop.c
cde/programs/dtappbuilder/src/ab/prop.h
cde/programs/dtappbuilder/src/ab/propP.h
cde/programs/dtappbuilder/src/abmf/stubs_c_file.c
cde/programs/dtappbuilder/src/abmf/write_c.c
cde/programs/dtappbuilder/src/libABobj/obj.c

index c851ce20cc003030641db03eb733511f21546ab2..431dbb5b78998ea4e518f3d850e8a8816b92382d 100644 (file)
@@ -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>
index b06a9f99e265e4f6a0cf40b807749c623290373e..866ec8db76ad7259ee22961e79c7ecece5d6f175 100644 (file)
@@ -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);
index 21c5536fc529c9ca90659c45ba9a8fb2bf5c8188..7740c98e5ae41292a5bb9533907f641bf88d29be 100644 (file)
@@ -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>
index 92488f146ad9c0c8a119d28f78187d9dce2bd2d2..0c748b09294406f1b6b41f25b00a60f36fec26c2 100644 (file)
@@ -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>
index 682f2f83ae0ece73d320fe45d23e70268d11d04d..9aec493c32d0a69a1530aae720cb6f07c0d614e0 100644 (file)
 #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;
index a7e5c166e5ff08ca5a09a7fabc103f0b8947fbf6..8ff07c97514ae490de07d6ceefb8340a90286e35 100644 (file)
@@ -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>
index 33052c799fa0bb3d9fc6814144f73ee256639612..798bcdc4311377421c70b69c55a9cae733d0c414 100644 (file)
@@ -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>
index 06007c22fa35fb6ea32b9a5236aaea817e53c97e..6440a7642147581ede172636414956648d5b947d 100644 (file)
@@ -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 };
index 7eb647ce6245acb4c0f5c44804d5d1c557e39679..93d561937590a8ea4a9c8f06968861e58715a8b9 100644 (file)
@@ -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)
index 204b05c2dd4f4fe2db85bcf81c1ffe2f2ca0f0c4..8b873161ae0ffc26e283b10b9f3260945b533e41 100644 (file)
@@ -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>