OpenBSD fixed for lib/DtSvc.
authorPascal Stumpf <Pascal.Stumpf@cubes.de>
Thu, 9 Aug 2012 20:51:52 +0000 (22:51 +0200)
committerJon Trulson <jon@radscan.com>
Fri, 10 Aug 2012 11:51:37 +0000 (05:51 -0600)
cde/lib/DtSvc/DtCodelibs/filegen.C
cde/lib/DtSvc/DtEncap/spc-termio.c
cde/lib/DtSvc/DtUtil1/CmdMain.c
cde/lib/DtSvc/DtUtil1/DbLoad.c
cde/lib/DtSvc/DtUtil1/Dts.c
cde/lib/DtSvc/DtUtil2/XlationSvc.c
cde/lib/DtSvc/include/bms/sbstdinc.h
cde/lib/DtSvc/include/codelibs/dynarray.h
cde/lib/DtSvc/include/codelibs/privbuf.h
cde/lib/DtSvc/include/codelibs/stringx.h

index e29f1c3cd1281e6276f7722a026a973cb231e0a6..ad8c8de4b32b5aeca93f83b92c6f9c08c58d7764 100644 (file)
@@ -272,10 +272,11 @@ _SHXbuf::filegen()
     // Find the longest match if we are doing completion:
     if (completion)
     {
+       long i;
        // compare all entries to a copy of the first entry
        strcpy(filebuf, &bufptr[long(vec[0])]);
 
-       for (long i = 1; i < vec.size(); i++)
+       for (i = 1; i < vec.size(); i++)
        {
            register char *ref = filebuf;
            register char *ptr = &bufptr[long(vec[i])];
index 033453a35d9ea6aeaf301ffc4d89c23e12d7882d..89b7b4e5f2c1a9094977e17b6261fffd01f0f0e4 100644 (file)
@@ -36,7 +36,7 @@
 #include <bms/stringbuf.h>
 
 #include <termios.h>
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
 #include <sys/termio.h>
 #endif
 #include <codelibs/stringx.h>
@@ -145,6 +145,7 @@ static struct modes_s Output_modes[] = {
     "OCRNL",   OCRNL,
     "ONOCR",   ONOCR,
     "ONLRET",  ONLRET,
+#if !defined(CSRG_BASED)
     "OFILL",   OFILL,
     "OFDEL",   OFDEL,
     "NLDLY",   NLDLY,
@@ -169,6 +170,7 @@ static struct modes_s Output_modes[] = {
     "FFDLY",   FFDLY,
     "FF0",     FF0,
     "FF1",     FF1,
+#endif
     END_OF_LIST, 0
 };
 
index 00e64ec1ba46249985c3a7fd9cadf798f0284602..d57a2f4ee430f228d5f001cfb7a51b22328d671b 100644 (file)
@@ -43,7 +43,7 @@
 #ifdef __apollo
 #include "/sys5/usr/include/sys/termio.h"
 #else
-#include <termio.h>
+#include <termios.h>
 #endif
 #include <errno.h>
 #include <unistd.h>
@@ -989,7 +989,7 @@ _DtCmdCommandInvokerExecute (
       if (commandPid == 0) 
       {
 
-#if defined(__hp_osf) || defined(__osf__)
+#if defined(__hp_osf) || defined(__osf__) || defined(CSRG_BASED)
          setsid() ;
 #else
          (void) setpgrp ();
index 7f0e242bee0dd31aa9e7b09bd3a12b93ef896f01..b0b753d15040b44d8e6abc2799b26c962fee02fe 100644 (file)
@@ -104,6 +104,8 @@ extern      void    _DtDtsSeqReset(void);
 extern int     _DtDtsNextDCSeq(void);
 extern int     _DtDtsNextDASeq(void);
 
+char **_DtsDbListDb(void);
+
 int      use_in_memory_db = False;
 
 static void
index 4c61d8a97170f697c445171007572558cf275961..4b5956c80e4ca2886e94234985982a99de6ec2eb 100644 (file)
@@ -49,7 +49,6 @@
 #include <string.h>
 #include <stdlib.h>
 #include <ctype.h>
-#include <values.h>
 #include <sys/mman.h>
 #include <stdio.h>
 #include <fcntl.h>
  * On HP MAXINT is defined in both <values.h> and <sys/param.h>
  */
 #undef MAXINT
+#elif defined(CSRG_BASED)
+#define MAXINT INT_MAX
+#else
+#include <values.h>
 #endif
 #include <sys/param.h>
 #include <sys/errno.h>
index 4d7dc3dd488da48cc83338761ee808a5eaa2d9ff..cbb6982d14ecd32b2d8a29ac174444a24b83b2a1 100644 (file)
@@ -2197,7 +2197,7 @@ int _DtXlateGetXlateEnv(
    /* then look up version number of execution host */
    if (ret_AppExecEnvVersion) 
    {
-#if defined(sun) || defined(_AIX) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux)
+#if defined(sun) || defined(_AIX) || defined(USL) || defined(__uxp__) || defined(__osf__) || defined(linux) || defined(CSRG_BASED)
       char version[SYS_NMLN+SYS_NMLN+2];
 #else
       char version[UTSLEN+UTSLEN+2];
@@ -2250,7 +2250,7 @@ int _DtXlateGetXlateEnv(
 #error OSMAJORVERSION and/or OSMINORVERSION not defined
 #endif
 
-#if defined(linux)
+#if defined(linux) || defined(CSRG_BASED)
       sprintf(buf,"%s%s%s", STR(OSMAJORVERSION), 
                      nl_langinfo('.'), STR(OSMINORVERSION));
 #else
index 05711f1b5263a6a97b1543d7a4e4099ff5ead9b8..ed5ae36bf7dbee191ea83acd3ed9f841ea7bf263 100644 (file)
@@ -59,7 +59,7 @@
 /************************************************************************/
 
 /* Domain/OS BSD has bzero(), bcmp(), and bcopy() defined. */
-#if !defined(apollo) || !defined(__bsd)
+#if !(defined(apollo) && defined(__bsd)) && !defined(CSRG_BASED)
 
 #if defined(__STDC__)
 #if !defined(linux) && !defined(__osf__) && !defined(_XFUNCS_H_)
index 8c2e88c0bbbfaaacc22279a3eef2aaf68a104ee4..51f03cd2613d983ce6c10b821eac0c1fac992a40 100644 (file)
 #ifndef __DYNARRAY_H_
 #define __DYNARRAY_H_
 
-#if !defined(linux)
+#if !defined(linux) && !defined(CSRG_BASED)
 #include <generic.h>
 #endif
-#if defined(USL) || defined(__uxp__) || defined(__osf__) || defined(sun) || defined(linux)
+#if defined(USL) || defined(__uxp__) || defined(__osf__) || defined(sun) || defined(linux) || defined(CSRG_BASED)
 #define _DELETE_ARRAY(sz) delete[]
 #else
 #define _DELETE_ARRAY(sz) delete[(sz)]
index e3a538bbf48ac71edd00d0da7f4e217d837e4ed0..23f78407ed2ee9b244d485e2c369982d36dc70e1 100644 (file)
@@ -48,7 +48,7 @@ typedef void (*privbuf_func)(void *v);
 #include <stddef.h>
 #include <stdlib.h>
 
-#if defined(__osf__) || defined(sun) || defined(linux)
+#if defined(__osf__) || defined(sun) || defined(linux) || defined(CSRG_BASED)
 // The DEC C++ compiler rejects valid inline declarations, claiming
 // they have both internal and external linkage.
 #else
index 6ccc6cea7b1e164e490121b825369bb5c9c025f7..0d878b67fad8c5657f9f8f460e1d0535026f1e40 100644 (file)
@@ -75,7 +75,7 @@ extern "C"
 
 #ifdef __cplusplus
     char *strtokx(char *&ptr, const char *sep);
-# if !defined(__osf__) && !defined(linux)
+# if !defined(__osf__) && !defined(linux) && !defined(CSRG_BASED)
     char **strsep(const char *str, const char *sep,
        boolean whsp = TRUE, int *num = NULL);
 #  if !defined(__osf__)
@@ -85,7 +85,7 @@ extern "C"
 
 #else /* __STDC__ */
     char *strtokx(char **ptr, const char *sep);
-# if !defined(linux)
+# if !defined(linux) && !defined(CSRG_BASED)
     char **strsep(const char *str, const char *sep,
        boolean whsp, int *num);
 #endif
@@ -137,7 +137,7 @@ inline void  strfree(const char *s)
        { if (s != NULL) free((char *)s); }
 #else
 inline void  strfree(const char *s)
-#if defined(__hpux) || defined(__osf__)
+#if defined(__hpux) || defined(__osf__) || defined(CSRG_BASED)
        { if (s != NULL) free((void *)s); }
 #else
        { if (s != NULL) free((const void *)s); }