1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

OpenBSD fixed for lib/DtSvc.

This commit is contained in:
Pascal Stumpf 2012-08-09 22:51:52 +02:00 committed by Jon Trulson
parent 78053ff2a4
commit 185ec24999
10 changed files with 22 additions and 14 deletions

View file

@ -272,10 +272,11 @@ _SHXbuf::filegen()
// Find the longest match if we are doing completion: // Find the longest match if we are doing completion:
if (completion) if (completion)
{ {
long i;
// compare all entries to a copy of the first entry // compare all entries to a copy of the first entry
strcpy(filebuf, &bufptr[long(vec[0])]); 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 *ref = filebuf;
register char *ptr = &bufptr[long(vec[i])]; register char *ptr = &bufptr[long(vec[i])];

View file

@ -36,7 +36,7 @@
#include <bms/stringbuf.h> #include <bms/stringbuf.h>
#include <termios.h> #include <termios.h>
#if !defined(linux) #if !defined(linux) && !defined(CSRG_BASED)
#include <sys/termio.h> #include <sys/termio.h>
#endif #endif
#include <codelibs/stringx.h> #include <codelibs/stringx.h>
@ -145,6 +145,7 @@ static struct modes_s Output_modes[] = {
"OCRNL", OCRNL, "OCRNL", OCRNL,
"ONOCR", ONOCR, "ONOCR", ONOCR,
"ONLRET", ONLRET, "ONLRET", ONLRET,
#if !defined(CSRG_BASED)
"OFILL", OFILL, "OFILL", OFILL,
"OFDEL", OFDEL, "OFDEL", OFDEL,
"NLDLY", NLDLY, "NLDLY", NLDLY,
@ -169,6 +170,7 @@ static struct modes_s Output_modes[] = {
"FFDLY", FFDLY, "FFDLY", FFDLY,
"FF0", FF0, "FF0", FF0,
"FF1", FF1, "FF1", FF1,
#endif
END_OF_LIST, 0 END_OF_LIST, 0
}; };

View file

@ -43,7 +43,7 @@
#ifdef __apollo #ifdef __apollo
#include "/sys5/usr/include/sys/termio.h" #include "/sys5/usr/include/sys/termio.h"
#else #else
#include <termio.h> #include <termios.h>
#endif #endif
#include <errno.h> #include <errno.h>
#include <unistd.h> #include <unistd.h>
@ -989,7 +989,7 @@ _DtCmdCommandInvokerExecute (
if (commandPid == 0) if (commandPid == 0)
{ {
#if defined(__hp_osf) || defined(__osf__) #if defined(__hp_osf) || defined(__osf__) || defined(CSRG_BASED)
setsid() ; setsid() ;
#else #else
(void) setpgrp (); (void) setpgrp ();

View file

@ -104,6 +104,8 @@ extern void _DtDtsSeqReset(void);
extern int _DtDtsNextDCSeq(void); extern int _DtDtsNextDCSeq(void);
extern int _DtDtsNextDASeq(void); extern int _DtDtsNextDASeq(void);
char **_DtsDbListDb(void);
int use_in_memory_db = False; int use_in_memory_db = False;
static void static void

View file

@ -49,7 +49,6 @@
#include <string.h> #include <string.h>
#include <stdlib.h> #include <stdlib.h>
#include <ctype.h> #include <ctype.h>
#include <values.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <stdio.h> #include <stdio.h>
#include <fcntl.h> #include <fcntl.h>
@ -59,6 +58,10 @@
* On HP MAXINT is defined in both <values.h> and <sys/param.h> * On HP MAXINT is defined in both <values.h> and <sys/param.h>
*/ */
#undef MAXINT #undef MAXINT
#elif defined(CSRG_BASED)
#define MAXINT INT_MAX
#else
#include <values.h>
#endif #endif
#include <sys/param.h> #include <sys/param.h>
#include <sys/errno.h> #include <sys/errno.h>

View file

@ -2197,7 +2197,7 @@ int _DtXlateGetXlateEnv(
/* then look up version number of execution host */ /* then look up version number of execution host */
if (ret_AppExecEnvVersion) 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]; char version[SYS_NMLN+SYS_NMLN+2];
#else #else
char version[UTSLEN+UTSLEN+2]; char version[UTSLEN+UTSLEN+2];
@ -2250,7 +2250,7 @@ int _DtXlateGetXlateEnv(
#error OSMAJORVERSION and/or OSMINORVERSION not defined #error OSMAJORVERSION and/or OSMINORVERSION not defined
#endif #endif
#if defined(linux) #if defined(linux) || defined(CSRG_BASED)
sprintf(buf,"%s%s%s", STR(OSMAJORVERSION), sprintf(buf,"%s%s%s", STR(OSMAJORVERSION),
nl_langinfo('.'), STR(OSMINORVERSION)); nl_langinfo('.'), STR(OSMINORVERSION));
#else #else

View file

@ -59,7 +59,7 @@
/************************************************************************/ /************************************************************************/
/* Domain/OS BSD has bzero(), bcmp(), and bcopy() defined. */ /* 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(__STDC__)
#if !defined(linux) && !defined(__osf__) && !defined(_XFUNCS_H_) #if !defined(linux) && !defined(__osf__) && !defined(_XFUNCS_H_)

View file

@ -36,10 +36,10 @@
#ifndef __DYNARRAY_H_ #ifndef __DYNARRAY_H_
#define __DYNARRAY_H_ #define __DYNARRAY_H_
#if !defined(linux) #if !defined(linux) && !defined(CSRG_BASED)
#include <generic.h> #include <generic.h>
#endif #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[] #define _DELETE_ARRAY(sz) delete[]
#else #else
#define _DELETE_ARRAY(sz) delete[(sz)] #define _DELETE_ARRAY(sz) delete[(sz)]

View file

@ -48,7 +48,7 @@ typedef void (*privbuf_func)(void *v);
#include <stddef.h> #include <stddef.h>
#include <stdlib.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 // The DEC C++ compiler rejects valid inline declarations, claiming
// they have both internal and external linkage. // they have both internal and external linkage.
#else #else

View file

@ -75,7 +75,7 @@ extern "C"
#ifdef __cplusplus #ifdef __cplusplus
char *strtokx(char *&ptr, const char *sep); 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, char **strsep(const char *str, const char *sep,
boolean whsp = TRUE, int *num = NULL); boolean whsp = TRUE, int *num = NULL);
# if !defined(__osf__) # if !defined(__osf__)
@ -85,7 +85,7 @@ extern "C"
#else /* __STDC__ */ #else /* __STDC__ */
char *strtokx(char **ptr, const char *sep); char *strtokx(char **ptr, const char *sep);
# if !defined(linux) # if !defined(linux) && !defined(CSRG_BASED)
char **strsep(const char *str, const char *sep, char **strsep(const char *str, const char *sep,
boolean whsp, int *num); boolean whsp, int *num);
#endif #endif
@ -137,7 +137,7 @@ inline void strfree(const char *s)
{ if (s != NULL) free((char *)s); } { if (s != NULL) free((char *)s); }
#else #else
inline void strfree(const char *s) 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); } { if (s != NULL) free((void *)s); }
#else #else
{ if (s != NULL) free((const void *)s); } { if (s != NULL) free((const void *)s); }