From 71f3ed16f8dc4f6309b0ef5eff51377cb0b0f0ed Mon Sep 17 00:00:00 2001 From: Pascal Stumpf Date: Sat, 11 Aug 2012 14:04:50 +0200 Subject: [PATCH] Patches for dtscreen, dtsearchpath, dtsession on OBSD. Do not redefine round(3), and provide a manpath for OpenBSD. (this is one of the few things that need to be adjusted for other BSDs) --- cde/programs/dtscreen/usleep.c | 2 +- cde/programs/dtscreen/worm.c | 2 ++ cde/programs/dtsearchpath/libCliSrv/UnixEnv.C | 4 +++- cde/programs/dtsession/SmConMgmt.c | 2 +- cde/programs/dtsession/SmGlobals.c | 4 ++-- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cde/programs/dtscreen/usleep.c b/cde/programs/dtscreen/usleep.c index 08490812..ca89c528 100644 --- a/cde/programs/dtscreen/usleep.c +++ b/cde/programs/dtscreen/usleep.c @@ -41,7 +41,7 @@ #include "dtscreen.h" -#if !defined(_AIX) && !defined(hpV4) && !defined(linux) +#if !defined(_AIX) && !defined(hpV4) && !defined(linux) && !defined(CSRG_BASED) int usleep(unsigned long usec) { diff --git a/cde/programs/dtscreen/worm.c b/cde/programs/dtscreen/worm.c index bdf01413..a806facc 100644 --- a/cde/programs/dtscreen/worm.c +++ b/cde/programs/dtscreen/worm.c @@ -88,12 +88,14 @@ typedef struct { int size[MAXCOLORS]; } wormstruct; +#if !defined(CSRG_BASED) int round(x) float x; { return ((int) floor((double) x)); } +#endif void diff --git a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C index 731fe91c..1e7fdf11 100644 --- a/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C +++ b/cde/programs/dtsearchpath/libCliSrv/UnixEnv.C @@ -53,7 +53,7 @@ #endif #include -#if defined(sun) || defined(_AIX) || defined(__osf__) || defined(USL) || defined(__uxp__) || (linux) +#if defined(sun) || defined(_AIX) || defined(__osf__) || defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED) #define UID_NO_CHANGE ((uid_t) -1) #define GID_NO_CHANGE ((gid_t) -1) #endif @@ -80,6 +80,8 @@ UnixEnvironment::UnixEnvironment() manpath = "/usr/share/%L/man:/usr/share/man:/usr/local/man"; #elif defined(linux) manpath = "/usr/share/man/%L:/usr/share/man:/usr/contrib/man/%L:/usr/contrib/man:/usr/local/man/%L:/usr/local/man"; +#elif defined(__OpenBSD__) + manpath = "/usr/share/man:/usr/X11R6/man:/usr/local/man:/usr/ports/infrastructure/man"; #endif else manpath = temp; diff --git a/cde/programs/dtsession/SmConMgmt.c b/cde/programs/dtsession/SmConMgmt.c index aa0f678f..23ed57cc 100644 --- a/cde/programs/dtsession/SmConMgmt.c +++ b/cde/programs/dtsession/SmConMgmt.c @@ -163,7 +163,7 @@ GetMemoryUtilization(void) #if !defined(linux) static int init = 0; static kmem; -#if !defined(SVR4) && !defined(sco) && !defined(hpV4) && !defined(_POWER) && !defined (__osf__) +#if !defined(SVR4) && !defined(sco) && !defined(hpV4) && !defined(_POWER) && !defined (__osf__) && !defined(CSRG_BASED) extern void nlist(); #endif int i; diff --git a/cde/programs/dtsession/SmGlobals.c b/cde/programs/dtsession/SmGlobals.c index 36c35119..4bda658e 100644 --- a/cde/programs/dtsession/SmGlobals.c +++ b/cde/programs/dtsession/SmGlobals.c @@ -1352,7 +1352,7 @@ RemoveFiles( _DtEnvControl(DT_ENV_RESTORE_PRE_DT); -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else (void) setpgrp(); @@ -1457,7 +1457,7 @@ MoveDirectory( _DtEnvControl(DT_ENV_RESTORE_PRE_DT); -#ifdef __osf__ +#if defined(__osf__) || defined(CSRG_BASED) setsid(); #else (void) setpgrp(); -- 2.25.1