From 93d3d4933d1a127a70cbb087c2c6de232c36981b Mon Sep 17 00:00:00 2001 From: "wchang0222%aol.com" Date: Wed, 4 Feb 2004 01:31:33 +0000 Subject: [PATCH] Bugzilla bug 232120: added support for NetBSD's pthread library. The patch is contributed by Shin'ichiro TAYA . r=wtc. Modified Files: configure configure.in ptio.c Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH git-svn-id: svn://10.0.0.236/branches/NSPRPUB_PRE_4_2_CLIENT_BRANCH@152263 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/nsprpub/configure | 7 ++++++- mozilla/nsprpub/configure.in | 7 ++++++- mozilla/nsprpub/pr/src/pthreads/ptio.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/mozilla/nsprpub/configure b/mozilla/nsprpub/configure index dadea3a697e..0441cf3f8ce 100755 --- a/mozilla/nsprpub/configure +++ b/mozilla/nsprpub/configure @@ -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/mozilla/nsprpub/configure.in b/mozilla/nsprpub/configure.in index bcb47e8e667..02353b105e3 100644 --- a/mozilla/nsprpub/configure.in +++ b/mozilla/nsprpub/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/mozilla/nsprpub/pr/src/pthreads/ptio.c b/mozilla/nsprpub/pr/src/pthreads/ptio.c index 130004b0777..6792d8e7aa3 100644 --- a/mozilla/nsprpub/pr/src/pthreads/ptio.c +++ b/mozilla/nsprpub/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"