зеркало из https://github.com/mozilla/pjs.git
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
This commit is contained in:
Родитель
602e6cecc2
Коммит
f60130aa75
|
@ -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"
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
Загрузка…
Ссылка в новой задаче