This should be applied in addition to my previous DtTerm patches.
>From 5d97aa0dec2fd18a1a206311b6ee54a518e34424 Mon Sep 17 00:00:00 2001
From: Pascal Stumpf <pascal.stu...@cubes.de>
Date: Fri, 10 Aug 2012 14:29:28 +0200
Subject: [PATCH] Allow dtterm to at least allocate a pty on OpenBSD.  Display
 is still mangled, however, and it frequently crashes (64bit
 issue).

---
 cde/lib/DtTerm/Imakefile                     |    5 +++++
 cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c |    5 ++++-
 cde/programs/dtterm/util/logger.c            |    2 +-
 3 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/cde/lib/DtTerm/Imakefile b/cde/lib/DtTerm/Imakefile
index 8d502d7..f4d86a6 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 b8bfd3a..8507cdf 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 <fcntl.h>
 #include <termios.h>
+#if defined(OPENBSD_ARCHITECTURE)
+#include <util.h>
+#endif
 #include <sys/wait.h>
 #include <ctype.h>
 #include <errno.h>
@@ -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 0f51669..dc5c8cc 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));
-- 
1.7.6

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
cdesktopenv-devel mailing list
cdesktopenv-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/cdesktopenv-devel

Reply via email to