summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%netscape.com <devnull@localhost>2001-12-26 22:59:38 +0000
committerwtc%netscape.com <devnull@localhost>2001-12-26 22:59:38 +0000
commit0e657e43684ce78d9646073c93d9e614e82d3564 (patch)
tree116d862db3b5a7fad146fb96efd3d9ad276bc950
parent376569e0cd0d7a40cc328e2d5d0c7afedd7b635b (diff)
downloadnspr-hg-0e657e43684ce78d9646073c93d9e614e82d3564.tar.gz
Bugzilla bug 48308: checked in part of the patch to bring NSPR up to
OpenUNIX8 build with pthreads. The patch is contributed by Hiram Clawson <hiramc@caldera.com>. Modified files: _pth.h ptio.c ptthread.c pr/tests/Makefile.in
-rw-r--r--pr/include/md/_pth.h10
-rw-r--r--pr/src/pthreads/ptio.c10
-rw-r--r--pr/src/pthreads/ptthread.c2
-rw-r--r--pr/tests/Makefile.in9
4 files changed, 21 insertions, 10 deletions
diff --git a/pr/include/md/_pth.h b/pr/include/md/_pth.h
index 21815728..faa50377 100644
--- a/pr/include/md/_pth.h
+++ b/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/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c
index 073fcd2d..ce263217 100644
--- a/pr/src/pthreads/ptio.c
+++ b/pr/src/pthreads/ptio.c
@@ -55,7 +55,7 @@
#include <sys/uio.h>
#include <sys/file.h>
#include <sys/ioctl.h>
-#ifdef SOLARIS
+#if defined(SOLARIS) || defined(UNIXWARE)
#include <sys/filio.h> /* 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/pr/src/pthreads/ptthread.c b/pr/src/pthreads/ptthread.c
index d23b2dd1..dc8cc127 100644
--- a/pr/src/pthreads/ptthread.c
+++ b/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/pr/tests/Makefile.in b/pr/tests/Makefile.in
index fdbcfd28..7e8dbaf7 100644
--- a/pr/tests/Makefile.in
+++ b/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)