Commit d8fb5295 authored by deuce's avatar deuce
Browse files

Updates for NetBSD 2.0

parent 5d6ab8c5
......@@ -182,17 +182,13 @@ MTOBJODIR := $(CCPRE).$(machine).obj.$(BUILDPATH)-mt
EXEODIR := $(CCPRE).$(machine).exe.$(BUILDPATH)
LDFLAGS += -L$(LIBODIR)
ifeq ($(os),netbsd)
ifeq ($(os),openbsd)
DELETE := rm -f
else
ifeq ($(os),openbsd)
ifeq ($(os),sunos)
DELETE := rm -f
else
ifeq ($(os),sunos)
DELETE := rm -f
else
DELETE = rm -fv
endif
DELETE = rm -fv
endif
endif
......@@ -221,7 +217,7 @@ ifeq ($(os),sunos) # Solaris
CFLAGS += -D__solaris__ -DNEEDS_DAEMON -DNEEDS_FORKPTY -DNEEDS_SETENV -DNEEDS_CFMAKERAW
endif
ifeq ($(os),netbsd) # NetBSD
CFLAGS += -D__unix__ -I/usr/pkg/include -I/usr/pkg/pthreads/include -DNEEDS_FORKPTY
CFLAGS += -D__unix__
endif
ifeq ($(os),darwin)
CFLAGS += -D__unix__ -fno-common -D__DARWIN__
......@@ -246,9 +242,8 @@ else
XP_SEM := 1
else
ifeq ($(os),netbsd) # NetBSD
CFLAGS += -D__unix__
MT_CFLAGS += -DUSE_XP_SEMAPHORES
MT_LDFLAGS += -L/usr/pkg/lib -L/usr/pkg/pthreads/lib -lpthread
MT_LDFLAGS += -lpthread
XP_SEM := 1
else
ifeq ($(os),qnx) # QNX
......
......@@ -30,11 +30,6 @@ ifeq ($(os),sunos) # Solaris
LDFLAGS += -lsocket -lnsl -lrt
endif
ifeq ($(os),netbsd)
LDFLAGS += -L/usr/pkg/lib
UTIL_LDFLAGS += -lpth -L/usr/pkg/lib
endif
# So far, only QNX has sem_timedwait()
ifeq ($(os),qnx)
LDFLAGS += -lsocket
......
......@@ -48,12 +48,10 @@
#if defined(__FreeBSD__)
#include <libutil.h> // forkpty()
#elif defined(__OpenBSD__)
#elif defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DARWIN__)
#include <util.h>
#elif defined(__linux__)
#include <pty.h>
#elif defined(__DARWIN__)
#include <util.h>
#elif defined(__QNX__)
#if 0
#include <unix.h>
......@@ -154,7 +152,7 @@
#ifndef TTYDEF_CFLAG
#define TTYDEF_CFLAG (CREAD | CS8 | HUPCL)
#endif
#if defined(__QNX__) || defined(__solaris__)
#if defined(__QNX__) || defined(__solaris__) || defined(__NetBSD__)
static cc_t ttydefchars[NCCS] = {
CEOF, CEOL, CEOL, CERASE, CWERASE, CKILL, CREPRINT,
CERASE2, CINTR, CQUIT, CSUSP, CDSUSP, CSTART, CSTOP, CLNEXT,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment