mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
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)
This commit is contained in:
parent
43bae997c8
commit
71f3ed16f8
5 changed files with 9 additions and 5 deletions
|
@ -41,7 +41,7 @@
|
||||||
|
|
||||||
#include "dtscreen.h"
|
#include "dtscreen.h"
|
||||||
|
|
||||||
#if !defined(_AIX) && !defined(hpV4) && !defined(linux)
|
#if !defined(_AIX) && !defined(hpV4) && !defined(linux) && !defined(CSRG_BASED)
|
||||||
int
|
int
|
||||||
usleep(unsigned long usec)
|
usleep(unsigned long usec)
|
||||||
{
|
{
|
||||||
|
|
|
@ -88,12 +88,14 @@ typedef struct {
|
||||||
int size[MAXCOLORS];
|
int size[MAXCOLORS];
|
||||||
} wormstruct;
|
} wormstruct;
|
||||||
|
|
||||||
|
#if !defined(CSRG_BASED)
|
||||||
int
|
int
|
||||||
round(x)
|
round(x)
|
||||||
float x;
|
float x;
|
||||||
{
|
{
|
||||||
return ((int) floor((double) x));
|
return ((int) floor((double) x));
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
#endif
|
#endif
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#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 UID_NO_CHANGE ((uid_t) -1)
|
||||||
#define GID_NO_CHANGE ((gid_t) -1)
|
#define GID_NO_CHANGE ((gid_t) -1)
|
||||||
#endif
|
#endif
|
||||||
|
@ -80,6 +80,8 @@ UnixEnvironment::UnixEnvironment()
|
||||||
manpath = "/usr/share/%L/man:/usr/share/man:/usr/local/man";
|
manpath = "/usr/share/%L/man:/usr/share/man:/usr/local/man";
|
||||||
#elif defined(linux)
|
#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";
|
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
|
#endif
|
||||||
else
|
else
|
||||||
manpath = temp;
|
manpath = temp;
|
||||||
|
|
|
@ -163,7 +163,7 @@ GetMemoryUtilization(void)
|
||||||
#if !defined(linux)
|
#if !defined(linux)
|
||||||
static int init = 0;
|
static int init = 0;
|
||||||
static kmem;
|
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();
|
extern void nlist();
|
||||||
#endif
|
#endif
|
||||||
int i;
|
int i;
|
||||||
|
|
|
@ -1352,7 +1352,7 @@ RemoveFiles(
|
||||||
|
|
||||||
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);
|
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);
|
||||||
|
|
||||||
#ifdef __osf__
|
#if defined(__osf__) || defined(CSRG_BASED)
|
||||||
setsid();
|
setsid();
|
||||||
#else
|
#else
|
||||||
(void) setpgrp();
|
(void) setpgrp();
|
||||||
|
@ -1457,7 +1457,7 @@ MoveDirectory(
|
||||||
|
|
||||||
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);
|
_DtEnvControl(DT_ENV_RESTORE_PRE_DT);
|
||||||
|
|
||||||
#ifdef __osf__
|
#if defined(__osf__) || defined(CSRG_BASED)
|
||||||
setsid();
|
setsid();
|
||||||
#else
|
#else
|
||||||
(void) setpgrp();
|
(void) setpgrp();
|
||||||
|
|
Loading…
Reference in a new issue