summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2007-05-26 00:16:38 +0000
committerwtc%google.com <devnull@localhost>2007-05-26 00:16:38 +0000
commit6abc089b7f57eb3c904262f1a4c545c3df5d866b (patch)
tree388240ed6aef1e9b7e3b9e9327b06a8648d6ec5e
parent5c1a043cd03bf30138648d07b690fab565a5f708 (diff)
downloadnspr-hg-6abc089b7f57eb3c904262f1a4c545c3df5d866b.tar.gz
Bug 371247: checked in some changes for OpenBSD. The patch is contributed
by Martynas Venckus <martynas@openbsd.org>. r=nelsonb,wtc. Modified Files: configure configure.in lib/tests/Makefile.in _openbsd.cfg _openbsd.h prnetdb.c Tag: NSPRPUB_PRE_4_2_CLIENT_BRANCH
-rwxr-xr-xconfigure1
-rw-r--r--configure.in1
-rw-r--r--lib/tests/Makefile.in6
-rw-r--r--pr/include/md/_openbsd.cfg2
-rw-r--r--pr/include/md/_openbsd.h6
-rw-r--r--pr/src/misc/prnetdb.c3
6 files changed, 16 insertions, 3 deletions
diff --git a/configure b/configure
index 462dda2f..6cd63cc5 100755
--- a/configure
+++ b/configure
@@ -4377,6 +4377,7 @@ EOF
DSO_CFLAGS=-fPIC
MDCPUCFG_H=_openbsd.cfg
PR_MD_CSRCS=openbsd.c
+ OS_LIBS="-lc"
if test -z "$USE_NSPR_THREADS"; then
USE_PTHREADS=1
fi
diff --git a/configure.in b/configure.in
index 679fb325..47a1a431 100644
--- a/configure.in
+++ b/configure.in
@@ -1751,6 +1751,7 @@ mips-sony-newsos*)
DSO_CFLAGS=-fPIC
MDCPUCFG_H=_openbsd.cfg
PR_MD_CSRCS=openbsd.c
+ OS_LIBS="-lc"
if test -z "$USE_NSPR_THREADS"; then
USE_PTHREADS=1
fi
diff --git a/lib/tests/Makefile.in b/lib/tests/Makefile.in
index f55824ad..f3c05295 100644
--- a/lib/tests/Makefile.in
+++ b/lib/tests/Makefile.in
@@ -127,6 +127,12 @@ ifeq ($(OS_ARCH), Linux)
endif
endif
+ifeq (,$(filter-out OpenBSD,$(OS_ARCH)))
+ ifeq ($(USE_PTHREADS),1)
+ EXTRA_LIBS = -lpthread
+ endif
+endif
+
ifeq ($(OS_ARCH), OSF1)
LDOPTS += -rpath $(PWD)/$(dist_libdir) -lpthread
endif
diff --git a/pr/include/md/_openbsd.cfg b/pr/include/md/_openbsd.cfg
index 0041a242..e133d9f5 100644
--- a/pr/include/md/_openbsd.cfg
+++ b/pr/include/md/_openbsd.cfg
@@ -48,7 +48,7 @@
#define PR_AF_INET6 24 /* same as AF_INET6 */
-#if defined(__i386__)
+#if defined(__i386__) || defined(__arm__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
diff --git a/pr/include/md/_openbsd.h b/pr/include/md/_openbsd.h
index ccd75306..8719fe78 100644
--- a/pr/include/md/_openbsd.h
+++ b/pr/include/md/_openbsd.h
@@ -54,9 +54,11 @@
#define _PR_SI_ARCHITECTURE "powerpc"
#elif defined(__sparc__)
#define _PR_SI_ARCHITECTURE "sparc"
+#elif defined(__arm__)
+#define _PR_SI_ARCHITECTURE "arm"
#endif
-#define PR_DLL_SUFFIX ".so.1.0"
+#define PR_DLL_SUFFIX ".so"
#define _PR_VMBASE 0x30000000
#define _PR_STACK_VMBASE 0x50000000
@@ -97,6 +99,8 @@
#define JB_SP_INDEX 34
#elif defined(__amd64__)
#define JB_SP_INDEX 6
+#elif defined(__arm__)
+#define JB_SP_INDEX 23
#else
#error "Need to define SP index in jmp_buf here"
#endif
diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c
index 922d84b8..580fb51c 100644
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -103,7 +103,8 @@ PRLock *_pr_dnsLock = NULL;
#if defined(OSF1) \
|| defined(AIX4_3_PLUS) || (defined(AIX) && defined(_THREAD_SAFE)) \
|| (defined(HPUX10_10) && defined(_REENTRANT)) \
- || (defined(HPUX10_20) && defined(_REENTRANT))
+ || (defined(HPUX10_20) && defined(_REENTRANT)) \
+ || defined(OPENBSD)
#define _PR_HAVE_GETPROTO_R
#define _PR_HAVE_GETPROTO_R_INT
#endif