diff options
author | wchang0222%aol.com <devnull@localhost> | 2004-02-04 01:31:33 +0000 |
---|---|---|
committer | wchang0222%aol.com <devnull@localhost> | 2004-02-04 01:31:33 +0000 |
commit | 07f5228964067f757abd058eb9276464fdc5b366 (patch) | |
tree | 2ab09e4b3b3d6407962eb41e9a8c4042a90d1bc4 | |
parent | 1206cb2d4a5e52a38eb5240b30da7dfea47ffe90 (diff) | |
download | nspr-hg-07f5228964067f757abd058eb9276464fdc5b366.tar.gz |
Bugzilla bug 232120: added support for NetBSD's pthread library. The
patch is contributed by Shin'ichiro TAYA <taya@netbsd.org>. r=wtc.
Modified Files: configure configure.in ptio.c
Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rwxr-xr-x | configure | 7 | ||||
-rw-r--r-- | configure.in | 7 | ||||
-rw-r--r-- | pr/src/pthreads/ptio.c | 2 |
3 files changed, 13 insertions, 3 deletions
@@ -5243,7 +5243,12 @@ EOF _PTHREAD_LDFLAGS="-lc_r" fi ;; - *-openbsd*|*-bsdi*|*-netbsd*) + *-netbsd*) + if test "$ac_cv_have_dash_pthread" = "yes"; then + _PTHREAD_LDFLAGS="-pthread" + fi + ;; + *-openbsd*|*-bsdi*) cat >> confdefs.h <<\EOF #define _THREAD_SAFE 1 EOF diff --git a/configure.in b/configure.in index bcb47e8e..02353b10 100644 --- a/configure.in +++ b/configure.in @@ -2190,7 +2190,12 @@ if test -n "$USE_PTHREADS"; then _PTHREAD_LDFLAGS="-lc_r" fi ;; - *-openbsd*|*-bsdi*|*-netbsd*) + *-netbsd*) + if test "$ac_cv_have_dash_pthread" = "yes"; then + _PTHREAD_LDFLAGS="-pthread" + fi + ;; + *-openbsd*|*-bsdi*) AC_DEFINE(_THREAD_SAFE) dnl -pthread links in -lc_r, so don't specify it explicitly. if test "$ac_cv_have_dash_pthread" = "yes"; then diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c index 130004b0..6792d8e7 100644 --- a/pr/src/pthreads/ptio.c +++ b/pr/src/pthreads/ptio.c @@ -205,7 +205,7 @@ static PRBool _pr_ipv6_v6only_on_by_default; #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(HPUX) \ || defined(LINUX) || defined(FREEBSD) || defined(BSDI) || defined(VMS) \ || defined(NTO) || defined(OPENBSD) || defined(DARWIN) \ - || defined(UNIXWARE) + || defined(UNIXWARE) || defined(NETBSD) #define _PRSockOptVal_t void * #else #error "Cannot determine architecture" |