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:
committed by
Jon Trulson
parent
f5a8836bff
commit
19647809e4
@@ -332,6 +332,7 @@ _DtTermPrimUtmpGetUtLine(int pty, char *ptyName)
|
||||
static char *
|
||||
UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine)
|
||||
{
|
||||
#if !defined(CSRG_BASED) /* XXX */
|
||||
DtTermPrimitiveWidget tw = (DtTermPrimitiveWidget) w;
|
||||
struct termData *tpd = tw->term.tpd;
|
||||
struct utmp ut;
|
||||
@@ -489,6 +490,9 @@ UtmpEntryCreate(Widget w, pid_t pid, char *utmpLine)
|
||||
/* failure... */
|
||||
(void) endutent();
|
||||
return((char *) 0);
|
||||
#else /* __OpenBSD__ */
|
||||
return(utmpLine);
|
||||
#endif
|
||||
}
|
||||
|
||||
/* this is a public wrapper around the previous function that runs the
|
||||
@@ -511,6 +515,7 @@ _DtTermPrimUtmpEntryCreate(Widget w, pid_t pid, char *utmpLine)
|
||||
static void
|
||||
UtmpEntryDestroy(Widget w, char *utmpLine)
|
||||
{
|
||||
#if !defined(CSRG_BASED)
|
||||
struct utmp ut;
|
||||
struct utmp *utPtr;
|
||||
time_t now;
|
||||
@@ -537,6 +542,7 @@ UtmpEntryDestroy(Widget w, char *utmpLine)
|
||||
(void) endutent();
|
||||
|
||||
(void) DeleteUtmpInfo(utmpLine);
|
||||
#endif /* !__OpenBSD__ */
|
||||
}
|
||||
|
||||
/* this is a public wrapper around the previous function that runs the
|
||||
|
||||
Reference in New Issue
Block a user