diff --git a/nsprpub/pr/include/md/_pth.h b/nsprpub/pr/include/md/_pth.h index 21815728f3e..faa50377a76 100644 --- a/nsprpub/pr/include/md/_pth.h +++ b/nsprpub/pr/include/md/_pth.h @@ -134,7 +134,8 @@ #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \ || defined(HPUX) || defined(LINUX) || defined(FREEBSD) \ || defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \ - || defined(VMS) || defined(NTO) || defined(DARWIN) + || defined(VMS) || defined(NTO) || defined(DARWIN) \ + || defined(UNIXWARE) #define _PT_PTHREAD_INVALIDATE_THR_HANDLE(t) (t) = 0 #define _PT_PTHREAD_THR_HANDLE_IS_INVALID(t) (t) == 0 #define _PT_PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st) @@ -194,7 +195,7 @@ */ #if (defined(AIX) && !defined(AIX4_3)) || defined(LINUX) \ || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ - || defined(BSDI) || defined(VMS) + || defined(BSDI) || defined(VMS) || defined(UNIXWARE) #define PT_NO_SIGTIMEDWAIT #endif @@ -245,7 +246,7 @@ #define PT_PRIO_MIN 1 #define PT_PRIO_MAX 127 #elif defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ - || defined(BSDI) || defined(DARWIN) /* XXX */ + || defined(BSDI) || defined(DARWIN) || defined(UNIXWARE) /* XXX */ #define PT_PRIO_MIN 0 #define PT_PRIO_MAX 126 #else @@ -278,7 +279,8 @@ extern int (*_PT_aix_yield_fcn)(); PR_END_MACRO #elif defined(HPUX) || defined(LINUX) || defined(SOLARIS) \ || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ - || defined(BSDI) || defined(NTO) || defined(DARWIN) + || defined(BSDI) || defined(NTO) || defined(DARWIN) \ + || defined(UNIXWARE) #define _PT_PTHREAD_YIELD() sched_yield() #else #error "Need to define _PT_PTHREAD_YIELD for this platform" diff --git a/nsprpub/pr/src/pthreads/ptio.c b/nsprpub/pr/src/pthreads/ptio.c index 073fcd2d1ac..ce2632176ae 100644 --- a/nsprpub/pr/src/pthreads/ptio.c +++ b/nsprpub/pr/src/pthreads/ptio.c @@ -55,7 +55,7 @@ #include #include #include -#ifdef SOLARIS +#if defined(SOLARIS) || defined(UNIXWARE) #include /* to pick up FIONREAD */ #endif #ifdef _PR_POLL_AVAILABLE @@ -184,7 +184,8 @@ static ssize_t (*pt_aix_sendfile_fptr)() = NULL; #define _PRSockOptVal_t char * #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(HPUX) \ || defined(LINUX) || defined(FREEBSD) || defined(BSDI) || defined(VMS) \ - || defined(NTO) || defined(OPENBSD) || defined(DARWIN) + || defined(NTO) || defined(OPENBSD) || defined(DARWIN) \ + || defined(UNIXWARE) #define _PRSockOptVal_t void * #else #error "Cannot determine architecture" @@ -198,7 +199,8 @@ static ssize_t (*pt_aix_sendfile_fptr)() = NULL; || defined(OSF1) || defined(SOLARIS) \ || defined(HPUX10_30) || defined(HPUX11) || defined(LINUX) \ || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \ - || defined(BSDI) || defined(VMS) || defined(NTO) || defined(DARWIN) + || defined(BSDI) || defined(VMS) || defined(NTO) || defined(DARWIN) \ + || defined(UNIXWARE) #define _PRSelectFdSetArg_t fd_set * #else #error "Cannot determine architecture" @@ -2994,7 +2996,7 @@ static PRIOMethods _pr_socketpollfd_methods = { #if defined(HPUX) || defined(OSF1) || defined(SOLARIS) || defined (IRIX) \ || defined(AIX) || defined(LINUX) || defined(FREEBSD) || defined(NETBSD) \ || defined(OPENBSD) || defined(BSDI) || defined(VMS) || defined(NTO) \ - || defined(DARWIN) + || defined(DARWIN) || defined(UNIXWARE) #define _PR_FCNTL_FLAGS O_NONBLOCK #else #error "Can't determine architecture" diff --git a/nsprpub/pr/src/pthreads/ptthread.c b/nsprpub/pr/src/pthreads/ptthread.c index d23b2dd1d9e..dc8cc1272c0 100644 --- a/nsprpub/pr/src/pthreads/ptthread.c +++ b/nsprpub/pr/src/pthreads/ptthread.c @@ -1215,7 +1215,7 @@ static void suspend_signal_handler(PRIntn sig) while (me->suspend & PT_THREAD_SUSPENDED) { #if !defined(FREEBSD) && !defined(NETBSD) && !defined(OPENBSD) \ - && !defined(BSDI) && !defined(VMS) /*XXX*/ + && !defined(BSDI) && !defined(VMS) && !defined(UNIXWARE) /*XXX*/ PRIntn rv; sigwait(&sigwait_set, &rv); #endif diff --git a/nsprpub/pr/tests/Makefile.in b/nsprpub/pr/tests/Makefile.in index fdbcfd28d45..7e8dbaf7897 100644 --- a/nsprpub/pr/tests/Makefile.in +++ b/nsprpub/pr/tests/Makefile.in @@ -396,6 +396,13 @@ EXTRA_LIBS = -lsocket -lnsl -lresolv -ldl export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR) endif +ifeq ($(OS_ARCH),OpenUNIX) +export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR) +ifeq ($(USE_PTHREADS),1) +LDOPTS += -pthread +endif +endif + ifeq ($(OS_ARCH), UNIXWARE) export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR) endif @@ -424,7 +431,7 @@ LIBPTHREAD = -lpthread ifeq ($(OS_ARCH),AIX) LIBPTHREAD = -lpthreads endif -ifeq (,$(filter-out FreeBSD OpenBSD BSD_OS NTO Darwin,$(OS_ARCH))) +ifeq (,$(filter-out FreeBSD OpenBSD BSD_OS NTO Darwin OpenUNIX,$(OS_ARCH))) LIBPTHREAD = endif ifeq ($(OS_ARCH)$(basename $(OS_RELEASE)),HP-UXB.10)