OpenBSD fixes for lib/DtTerm: values.h, #ifdef's and some constants that are not defined on BSD. Also, leave out utmp stuff that does not work on BSD. Note that this terminal allocation does not work properly yet, but this will be fixed later.

This commit is contained in:
Pascal Stumpf
2012-08-09 23:53:47 +02:00
committed by Jon Trulson
parent f5a8836bff
commit 19647809e4
9 changed files with 43 additions and 8 deletions

View File

@@ -166,7 +166,7 @@ static struct _pty_dirs {
{PTY_null, PTY_null, PTY_null, PTY_null, PTY_null, False},
};
#ifdef ALPHA_ARCHITECTURE
#if defined(ALPHA_ARCHITECTURE) || defined(OpenBSDArchitecture)
/* Use openpty() to open Master/Slave pseudo-terminal pair */
/* Current version of openpty() uses non-STREAM device. BSD name space */
#define TTYNAMELEN 25
@@ -254,7 +254,11 @@ GetPty(char **ptySlave, char **ptyMaster)
* name for the tty that everyone else will
* use...
*/
#if defined(XTHREADS)
if (c1 = _XTtyname(ttyFd, tty_buf)) {
#else
if (c1 = _XTtyname(ttyFd)) {
#endif
ttyDev = realloc(ttyDev, strlen(c1) + 1);
(void) strcpy(ttyDev, c1);
}