From d24fd29b52abe949a10b24d7c592715a0399a507 Mon Sep 17 00:00:00 2001 From: Ulrich Wilkens Date: Tue, 11 Mar 2014 19:24:35 +0100 Subject: [PATCH] Fix dtfile and dtterm on NetBSD --- cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c | 10 ++++++++-- cde/programs/dtappbuilder/src/ab/Imakefile | 10 ++++++++-- cde/programs/dtappbuilder/src/abmf/Imakefile | 8 ++++++-- cde/programs/dtfile/Main.c | 10 +++++----- cde/programs/dtterm/Imakefile | 8 ++++++-- cde/programs/ttsnoop/Imakefile | 8 ++++++-- 6 files changed, 39 insertions(+), 15 deletions(-) diff --git a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c index 2fc19846..a512e236 100644 --- a/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c +++ b/cde/lib/DtTerm/TermPrim/TermPrimGetPty-bsd.c @@ -35,10 +35,16 @@ static char rcs_id[] = "$XConsortium: TermPrimGetPty-bsd.c /main/4 1996/11/21 19 #include #include -#if defined(OPENBSD_ARCHITECTURE) +#if defined(CSRG_BASED) #include +#include +#include +#if defined(__FreeBSD__) +#include +#else #include #endif +#endif #include #include #include @@ -172,7 +178,7 @@ static struct _pty_dirs { {PTY_null, PTY_null, PTY_null, PTY_null, PTY_null, False}, }; -#if defined(ALPHA_ARCHITECTURE) || defined(OPENBSD_ARCHITECTURE) +#if defined(ALPHA_ARCHITECTURE) || defined(CSRG_BASED) /* 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/dtappbuilder/src/ab/Imakefile b/cde/programs/dtappbuilder/src/ab/Imakefile index 1339d87f..64248805 100644 --- a/cde/programs/dtappbuilder/src/ab/Imakefile +++ b/cde/programs/dtappbuilder/src/ab/Imakefile @@ -249,6 +249,10 @@ SYS_LIBRARIES = -lm $(ICONVSYSLIB) $(DYNLIBSYSLIB) $(REGEXSYSLIB) WAITTARGET = .WAIT #endif /* SunArchitecture */ +#ifdef BSDArchitecture +UTILLIB = -lutil +#endif /* BSDArchitecture */ + PROGRAMS = dtbuilder LINTLIBS = $(XINPUTLIB) $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) @@ -264,11 +268,13 @@ LINTLIBS = $(XINPUTLIB) $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) DEPLIBS = ../libABil/libABil.a ../libABobjXm/libABobjXm.a \ ../libABobj/libABobj.a ../libAButil/libAButil.a $(DEPDTWIDGETLIB) \ $(DEPDTTERMLIB) $(DEPDTHELPLIB) $(DEPDTSVCLIB) $(DEPTTLIB) \ - $(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB) + $(DEPUILLIB) $(DEPMRESOURCELIB) $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXLIB) \ + $(DEPUTILLIB) LOCAL_LIBRARIES = ../libABil/libABil.a ../libABobjXm/libABobjXm.a \ ../libABobj/libABobj.a ../libAButil/libAButil.a \ $(DTWIDGETLIB) $(DTTERMLIB) $(DTHELPLIB) $(DTSVCLIB) \ - $(TTLIB) $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) + $(TTLIB) $(UILLIB) $(MRESOURCELIB) $(XMLIB) $(XTOOLLIB) $(XLIB) \ + $(UTILLIB) $(OBJS): $(SOURCES.h) diff --git a/cde/programs/dtappbuilder/src/abmf/Imakefile b/cde/programs/dtappbuilder/src/abmf/Imakefile index abb7571b..b8f68838 100644 --- a/cde/programs/dtappbuilder/src/abmf/Imakefile +++ b/cde/programs/dtappbuilder/src/abmf/Imakefile @@ -109,6 +109,10 @@ CCOPTIONS = -qnoro WAITTARGET = .WAIT #endif /* SunArchitecture */ +#ifdef BSDArchitecture +UTILLIB = -lutil +#endif /* BSDArchitecture */ + PROGRAMS = dtcodegen LINTLIBS = $(XINPUTLIB) $(DTHELPLIB) $(DTSVCLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) @@ -125,11 +129,11 @@ DEPLIBS = ../libABil/libABil.a ../libABobjXm/libABobjXm.a \ ../libABobj/libABobj.a ../libAButil/libAButil.a \ $(DEPDTTERMLIB) $(DEPDTHELPLIB) $(DEPDTWIDGETLIB) \ $(DEPDTSVCLIB) $(DEPTTLIB) $(DEPXMLIB) \ - $(DEPXTOOLLIB) $(DEPXLIB) + $(DEPXTOOLLIB) $(DEPXLIB) $(DEPUTILLIB) LOCAL_LIBRARIES = ../libABil/libABil.a ../libABobjXm/libABobjXm.a \ ../libABobj/libABobj.a ../libAButil/libAButil.a \ $(DTTERMLIB) $(DTHELPLIB) $(DTWIDGETLIB) \ - $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) + $(DTSVCLIB) $(TTLIB) $(XMLIB) $(XTOOLLIB) $(XLIB) $(UTILLIB) ComplexProgramTarget(dtcodegen) diff --git a/cde/programs/dtfile/Main.c b/cde/programs/dtfile/Main.c index be996bad..c41ee3ed 100644 --- a/cde/programs/dtfile/Main.c +++ b/cde/programs/dtfile/Main.c @@ -116,7 +116,7 @@ #include #include -#if defined(__osf__) || defined(__OpenBSD__) +#if defined(__osf__) || defined(CSRG_BASED) #include #endif /* __osf__ */ @@ -975,7 +975,7 @@ XtActionsRec actionTable[] = { extern XtInputId ProcessToolTalkInputId; -#if defined(__osf__) || defined(__OpenBSD__) +#if defined(__osf__) || defined(CSRG_BASED) extern void sigchld_handler(int); #endif /* __osf__ */ @@ -1019,7 +1019,7 @@ main( Tt_pattern requests2Handle; Tt_message msg; Tt_status status; -#if defined(__osf__) || defined(__OpenBSD__) +#if defined(__osf__) || defined(CSRG_BASED) struct sigaction sa, osa; #endif /* __osf__ */ int session_flag = 0; @@ -1031,7 +1031,7 @@ main( (void) signal (SIGINT, (void (*)())Stop); /* We don't want any zombie children, do we? */ -#if defined(__osf__) || defined(__OpenBSD__) +#if defined(__osf__) || defined(CSRG_BASED) sa.sa_handler = sigchld_handler; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; @@ -6292,7 +6292,7 @@ FinalizeToolTalkSession(); exit (1); } -#if defined(__osf__) || defined(__OpenBSD__) +#if defined(__osf__) || defined(CSRG_BASED) extern void sigchld_handler(int signo) /* Do not use the arg signo at the moment */ { diff --git a/cde/programs/dtterm/Imakefile b/cde/programs/dtterm/Imakefile index 0b168a27..de00d2e2 100644 --- a/cde/programs/dtterm/Imakefile +++ b/cde/programs/dtterm/Imakefile @@ -29,6 +29,10 @@ DEPHELPLIB = $(DEPDTHELPLIB) $(DEPDTSVCLIB) $(DEPTTLIB) USE_XHPLIB = $(XHPLIB) #endif /* HPArchitecture */ +#ifdef BSDArchitecture +UTILLIB = -lutil +#endif /* BSDArchitecture */ + /* DEPLIBS contains the list of library depencies for a client. * LOCAL_LIBRARIES contains the list of libraries on the link line. * Generally, the dependency form of a library has DEP as a prefix. @@ -39,9 +43,9 @@ USE_XHPLIB = $(XHPLIB) * paths to the library. */ DEPLIBS = $(DEPDTTERMLIB) $(DEPARCHLIBS) $(DEPXINPUTLIB) $(DEPHELPLIB) \ - $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB) + $(DEPXMLIB) $(DEPXTOOLLIB) $(DEPXPLIB) $(DEPXLIB) $(DEPUTILLIB) LOCAL_LIBRARIES = $(DTTERMLIB) $(USE_XHPLIB) $(XINPUTLIB) $(HELPLIB) \ - $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) + $(XMLIB) $(XTOOLLIB) $(XPLIB) $(XLIB) $(UTILLIB) SYS_LIBRARIES = DtClientSysLibs INCLUDES = -I. -I$(DTTERMSRC)/TermPrim -I$(DTTERMSRC)/Term -I$(DTTERMSRC)/TermView diff --git a/cde/programs/ttsnoop/Imakefile b/cde/programs/ttsnoop/Imakefile index ed23d0ff..9d239141 100644 --- a/cde/programs/ttsnoop/Imakefile +++ b/cde/programs/ttsnoop/Imakefile @@ -1,11 +1,15 @@ XCOMM $XConsortium: Imakefile /main/18 1996/05/08 09:29:12 drk $ +#ifdef BSDArchitecture +UTILLIB = -lutil +#endif /* BSDArchitecture */ + #define CplusplusSource YES DEPEND_DEFINES = $(CXXDEPENDINCLUDES) EXTRA_LOAD_FLAGS = ExtraLoadFlags $(UNSHARED_CXXLIB) -DEPLIBS = $(DEPDTTERMLIB) DepDtClientLibs -LOCAL_LIBRARIES = $(DTTERMLIB) DtClientLibs +DEPLIBS = $(DEPDTTERMLIB) DepDtClientLibs $(DEPUTILLIB) +LOCAL_LIBRARIES = $(DTTERMLIB) DtClientLibs $(UTILLIB) SYS_LIBRARIES = DtClientSysLibs DtClientExtraLibs -- 2.25.1