From: Pascal Stumpf Date: Fri, 10 Aug 2012 12:29:28 +0000 (+0200) Subject: Allow dtterm to at least allocate a pty on OpenBSD. Display is still mangled, however... X-Git-Tag: 2.2.0b~83^2~34 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8bbf5a7a1b6940eeef0581bb16445c59974bd054;p=oweals%2Fcde.git Allow dtterm to at least allocate a pty on OpenBSD. Display is still mangled, however, and it frequently crashes (64bit issue). --- diff --git a/cde/lib/DtTerm/Imakefile b/cde/lib/DtTerm/Imakefile index 8d502d7f..f4d86a66 100644 --- a/cde/lib/DtTerm/Imakefile +++ b/cde/lib/DtTerm/Imakefile @@ -25,6 +25,11 @@ INCLUDES = -I. -I./TermPrim -I./Term -I./TermView REQUIREDLIBS = SharedDtTermReqs #endif +/* for openpty */ +#if defined(OpenBSDArchitecture) +REQUIREDLIBS += -lutil +#endif + TERMPRIM_OBJS = \ TermPrim/TermPrim.o \ TermPrim/TermPrimAction.o \ diff --git a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c index b8bfd3a0..8507cdf3 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c @@ -37,6 +37,9 @@ static char rcs_id[] = "$XConsortium: TermPrimGetPty-bsd.c /main/4 1996/11/21 19 #include "TermHeader.h" #include #include +#if defined(OPENBSD_ARCHITECTURE) +#include +#endif #include #include #include @@ -166,7 +169,7 @@ static struct _pty_dirs { {PTY_null, PTY_null, PTY_null, PTY_null, PTY_null, False}, }; -#if defined(ALPHA_ARCHITECTURE) || defined(OpenBSDArchitecture) +#if defined(ALPHA_ARCHITECTURE) || defined(OPENBSD_ARCHITECTURE) /* Use openpty() to open Master/Slave pseudo-terminal pair */ /* Current version of openpty() uses non-STREAM device. BSD name space */ #define TTYNAMELEN 25 diff --git a/cde/programs/dtterm/util/logger.c b/cde/programs/dtterm/util/logger.c index 0f51669d..dc5c8cca 100644 --- a/cde/programs/dtterm/util/logger.c +++ b/cde/programs/dtterm/util/logger.c @@ -72,7 +72,7 @@ main(int argc, char **argv) } /* init data... */ -#if defined(USL) || defined(__uxp__) || defined(linux) +#if defined(USL) || defined(__uxp__) || defined(linux) || defined(CSRG_BASED) (void) memset((void *) &myaddr_in, (int) '\0', sizeof(myaddr_in)); #else (void) memset(myaddr_in, '\0', sizeof(myaddr_in));