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

Allow dtterm to at least allocate a pty on OpenBSD. Display is still mangled, however, and it frequently crashes (64bit issue).

This commit is contained in:
Pascal Stumpf 2012-08-10 14:29:28 +02:00 committed by Jon Trulson
parent 19647809e4
commit 8bbf5a7a1b
3 changed files with 10 additions and 2 deletions

View file

@ -25,6 +25,11 @@ INCLUDES = -I. -I./TermPrim -I./Term -I./TermView
REQUIREDLIBS = SharedDtTermReqs REQUIREDLIBS = SharedDtTermReqs
#endif #endif
/* for openpty */
#if defined(OpenBSDArchitecture)
REQUIREDLIBS += -lutil
#endif
TERMPRIM_OBJS = \ TERMPRIM_OBJS = \
TermPrim/TermPrim.o \ TermPrim/TermPrim.o \
TermPrim/TermPrimAction.o \ TermPrim/TermPrimAction.o \

View file

@ -37,6 +37,9 @@ static char rcs_id[] = "$XConsortium: TermPrimGetPty-bsd.c /main/4 1996/11/21 19
#include "TermHeader.h" #include "TermHeader.h"
#include <fcntl.h> #include <fcntl.h>
#include <termios.h> #include <termios.h>
#if defined(OPENBSD_ARCHITECTURE)
#include <util.h>
#endif
#include <sys/wait.h> #include <sys/wait.h>
#include <ctype.h> #include <ctype.h>
#include <errno.h> #include <errno.h>
@ -166,7 +169,7 @@ static struct _pty_dirs {
{PTY_null, PTY_null, PTY_null, PTY_null, PTY_null, False}, {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 */ /* Use openpty() to open Master/Slave pseudo-terminal pair */
/* Current version of openpty() uses non-STREAM device. BSD name space */ /* Current version of openpty() uses non-STREAM device. BSD name space */
#define TTYNAMELEN 25 #define TTYNAMELEN 25

View file

@ -72,7 +72,7 @@ main(int argc, char **argv)
} }
/* init data... */ /* 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)); (void) memset((void *) &myaddr_in, (int) '\0', sizeof(myaddr_in));
#else #else
(void) memset(myaddr_in, '\0', sizeof(myaddr_in)); (void) memset(myaddr_in, '\0', sizeof(myaddr_in));