summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtchang%redhat.com <devnull@localhost>2005-08-18 17:26:03 +0000
committerwtchang%redhat.com <devnull@localhost>2005-08-18 17:26:03 +0000
commitf6b4646d5babeba19b10a40db53854655cd8deed (patch)
tree81fd4f8723ba822ef8d4812642fcc7f188ab2637
parentd6669ba014b13165ec7eb22e9a1266c516bce8b5 (diff)
downloadnspr-hg-f6b4646d5babeba19b10a40db53854655cd8deed.tar.gz
Bugzilla Bug 304526: upgraded the NSPR on the MOZILLA_1_8_BRANCH to NSPR
4.6.1 Beta. a=cbeard for mozilla1.8b4. Tag: MOZILLA_1_8_BRANCH
-rwxr-xr-xadmin/repackage.sh8
-rwxr-xr-xconfigure297
-rw-r--r--configure.in87
-rw-r--r--pkg/linux/Makefile.in14
-rw-r--r--pr/include/md/_darwin.h16
-rw-r--r--pr/include/md/_linux.cfg48
-rw-r--r--pr/include/md/_linux.h4
-rw-r--r--pr/include/md/_pth.h7
-rw-r--r--pr/include/md/_riscos.cfg141
-rw-r--r--pr/include/md/_riscos.h209
-rw-r--r--pr/include/md/_win95.h16
-rw-r--r--pr/include/md/_winnt.h16
-rw-r--r--pr/include/md/prosdep.h3
-rw-r--r--pr/include/prinit.h6
-rw-r--r--pr/include/private/primpl.h2
-rw-r--r--pr/include/prlink.h8
-rw-r--r--pr/include/prthread.h2
-rw-r--r--pr/src/io/prprf.c4
-rw-r--r--pr/src/io/prscanf.c2
-rw-r--r--pr/src/linking/prlink.c414
-rw-r--r--pr/src/malloc/prmem.c13
-rw-r--r--pr/src/md/unix/riscos.c120
-rw-r--r--pr/src/md/unix/unix.c2
-rw-r--r--pr/src/md/unix/uxrng.c2
-rw-r--r--pr/src/misc/prdtoa.c5
-rw-r--r--pr/src/misc/prnetdb.c4
-rw-r--r--pr/src/misc/prsystem.c2
-rw-r--r--pr/src/pthreads/ptio.c15
-rw-r--r--pr/src/pthreads/ptthread.c7
-rw-r--r--pr/tests/server_test.c9
-rw-r--r--pr/tests/servr_kk.c9
-rw-r--r--pr/tests/servr_ku.c9
-rw-r--r--pr/tests/servr_uk.c9
-rw-r--r--pr/tests/servr_uu.c9
-rw-r--r--pr/tests/vercheck.c8
35 files changed, 912 insertions, 615 deletions
diff --git a/admin/repackage.sh b/admin/repackage.sh
index d25b15a5..fcdce44f 100755
--- a/admin/repackage.sh
+++ b/admin/repackage.sh
@@ -64,10 +64,10 @@
#
# ------------------------------------------------------------------
-FROMTOP=/share/builds/components/nspr20/v4.6
-TOTOP=./v4.6
-NSPRDIR=nspr-4.6
-SOURCETAG=NSPR_4_6_RTM
+FROMTOP=/share/builds/components/nspr20/v4.6.1
+TOTOP=./v4.6.1
+NSPRDIR=nspr-4.6.1
+SOURCETAG=NSPR_4_6_1_RTM
#
# enumerate Unix object directories on /s/b/c
diff --git a/configure b/configure
index b5b385b9..bc9233d1 100755
--- a/configure
+++ b/configure
@@ -40,8 +40,9 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-mdupdate Enable use of certain compilers' mdupdate feature"
ac_help="$ac_help
- --enable-macos-target=VER (default=10.1)
- Set the minimum MacOS version needed at runtime"
+ --enable-macos-target=VER
+ Set the minimum MacOS version needed at runtime
+ [10.1 for ppc, 10.4 for x86]"
ac_help="$ac_help
--enable-strip Enable stripping of shared libs and programs"
ac_help="$ac_help
@@ -51,9 +52,11 @@ ac_help="$ac_help
ac_help="$ac_help
--enable-nspr-threads Build using classic nspr threads"
ac_help="$ac_help
- --with-bthreads Use system bthreads library as thread subsystem (BeOS only)"
+ --with-bthreads Use system bthreads library as thread subsystem
+ (BeOS only)"
ac_help="$ac_help
- --with-native-threads Use native system threads as thread subsystem (Solaris only)"
+ --with-native-threads Use native system threads as thread subsystem
+ (Solaris only)"
ac_help="$ac_help
--enable-cplus Enable some c++ api routines"
ac_help="$ac_help
@@ -618,7 +621,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:622: checking host system type" >&5
+echo "configure:625: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -639,7 +642,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:643: checking target system type" >&5
+echo "configure:646: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -657,7 +660,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:661: checking build system type" >&5
+echo "configure:664: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -682,7 +685,7 @@ test "$host_alias" != "$target_alias" &&
MOD_MAJOR_VERSION=4
MOD_MINOR_VERSION=6
-MOD_PATCH_VERSION=0
+MOD_PATCH_VERSION=1
NSPR_MODNAME=nspr20
_HAVE_PTHREADS=
USE_PTHREADS=
@@ -693,7 +696,7 @@ USE_64=
USE_CPLUS=
USE_IPV6=
USE_MDUPDATE=
-MACOS_DEPLOYMENT_TARGET=
+_MACOSX_DEPLOYMENT_TARGET=
_OPTIMIZE_FLAGS=-O
_DEBUG_FLAGS=-g
MOZ_DEBUG=1
@@ -724,7 +727,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:728: checking for $ac_word" >&5
+echo "configure:731: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -923,9 +926,7 @@ fi
# Check whether --enable-macos-target or --disable-macos-target was given.
if test "${enable_macos_target+set}" = set; then
enableval="$enable_macos_target"
- MACOS_DEPLOYMENT_TARGET_STR=$enableval
-else
- MACOS_DEPLOYMENT_TARGET_STR=10.1
+ _MACOSX_DEPLOYMENT_TARGET=$enableval
fi
@@ -1026,7 +1027,7 @@ if test -z "$SKIP_PATH_CHECKS"; then
# Extract the first word of "$WHOAMI whoami", so it can be a program name with args.
set dummy $WHOAMI whoami; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1030: checking for $ac_word" >&5
+echo "configure:1031: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WHOAMI'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1097,13 +1098,13 @@ if test "$target" != "$host"; then
_SAVE_LDFLAGS="$LDFLAGS"
echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
-echo "configure:1101: checking for $host compiler" >&5
+echo "configure:1102: checking for $host compiler" >&5
for ac_prog in $HOST_CC gcc cc /usr/ucb/cc
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1107: checking for $ac_word" >&5
+echo "configure:1108: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_HOST_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1149,16 +1150,16 @@ test -n "$HOST_CC" || HOST_CC=""""
LDFLAGS="$HOST_LDFLAGS"
echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1153: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
+echo "configure:1154: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
cat > conftest.$ac_ext <<EOF
-#line 1155 "configure"
+#line 1156 "configure"
#include "confdefs.h"
int main() {
return(0);
; return 0; }
EOF
-if { (eval echo configure:1162: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_prog_host_cc_works=1 echo "$ac_t""yes" 1>&6
else
@@ -1178,7 +1179,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1182: checking for $ac_word" >&5
+echo "configure:1183: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1212,7 +1213,7 @@ test -n "$CC" || CC="echo"
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1216: checking for $ac_word" >&5
+echo "configure:1217: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1242,7 +1243,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1246: checking for $ac_word" >&5
+echo "configure:1247: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1293,7 +1294,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1297: checking for $ac_word" >&5
+echo "configure:1298: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1325,7 +1326,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1329: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1330: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1336,12 +1337,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 1340 "configure"
+#line 1341 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:1345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1367,12 +1368,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1371: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1372: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:1376: checking whether we are using GNU C" >&5
+echo "configure:1377: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1381,7 +1382,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1385: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -1400,7 +1401,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:1404: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1405: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1436,7 +1437,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1440: checking for $ac_word" >&5
+echo "configure:1441: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1472,7 +1473,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1476: checking for $ac_word" >&5
+echo "configure:1477: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1504,7 +1505,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1508: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1509: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1515,12 +1516,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 1519 "configure"
+#line 1520 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:1524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1546,12 +1547,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1550: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1551: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1555: checking whether we are using GNU C++" >&5
+echo "configure:1556: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1560,7 +1561,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1565: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1579,7 +1580,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1583: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1584: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1615,7 +1616,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1619: checking for $ac_word" >&5
+echo "configure:1620: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1650,7 +1651,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1654: checking for $ac_word" >&5
+echo "configure:1655: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1685,7 +1686,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1689: checking for $ac_word" >&5
+echo "configure:1690: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1720,7 +1721,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1724: checking for $ac_word" >&5
+echo "configure:1725: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1755,7 +1756,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1759: checking for $ac_word" >&5
+echo "configure:1760: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1790,7 +1791,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1794: checking for $ac_word" >&5
+echo "configure:1795: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1827,7 +1828,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1831: checking for $ac_word" >&5
+echo "configure:1832: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CXX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1859,7 +1860,7 @@ test -n "$CXX" || CXX="gcc"
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1863: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1864: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
ac_ext=C
# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -1870,12 +1871,12 @@ cross_compiling=$ac_cv_prog_cxx_cross
cat > conftest.$ac_ext << EOF
-#line 1874 "configure"
+#line 1875 "configure"
#include "confdefs.h"
int main(){return(0);}
EOF
-if { (eval echo configure:1879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cxx_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -1901,12 +1902,12 @@ if test $ac_cv_prog_cxx_works = no; then
{ echo "configure: error: installation or configuration problem: C++ compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:1905: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1906: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cxx_cross" 1>&6
cross_compiling=$ac_cv_prog_cxx_cross
echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
-echo "configure:1910: checking whether we are using GNU C++" >&5
+echo "configure:1911: checking whether we are using GNU C++" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1915,7 +1916,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gxx=yes
else
ac_cv_prog_gxx=no
@@ -1934,7 +1935,7 @@ ac_test_CXXFLAGS="${CXXFLAGS+set}"
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=
echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
-echo "configure:1938: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1939: checking whether ${CXX-g++} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1971,7 +1972,7 @@ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1975: checking for $ac_word" >&5
+echo "configure:1976: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2001,7 +2002,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2005: checking for $ac_word" >&5
+echo "configure:2006: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2052,7 +2053,7 @@ fi
# Extract the first word of "cl", so it can be a program name with args.
set dummy cl; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2056: checking for $ac_word" >&5
+echo "configure:2057: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2084,7 +2085,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2088: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2089: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -2095,12 +2096,12 @@ cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext << EOF
-#line 2099 "configure"
+#line 2100 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:2104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -2126,12 +2127,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:2130: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2131: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:2135: checking whether we are using GNU C" >&5
+echo "configure:2136: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2140,7 +2141,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2144: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2145: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -2159,7 +2160,7 @@ ac_test_CFLAGS="${CFLAGS+set}"
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:2163: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2164: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2192,7 +2193,7 @@ fi
fi
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2196: checking how to run the C preprocessor" >&5
+echo "configure:2197: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -2207,13 +2208,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 2211 "configure"
+#line 2212 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2217: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2218: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2224,13 +2225,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 2228 "configure"
+#line 2229 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2235: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2241,13 +2242,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
-#line 2245 "configure"
+#line 2246 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2252: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@@ -2274,7 +2275,7 @@ echo "$ac_t""$CPP" 1>&6
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2278: checking for $ac_word" >&5
+echo "configure:2279: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2306,7 +2307,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2310: checking for $ac_word" >&5
+echo "configure:2311: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AS'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2347,7 +2348,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2351: checking for $ac_word" >&5
+echo "configure:2352: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2388,7 +2389,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2392: checking for $ac_word" >&5
+echo "configure:2393: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_LD'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2429,7 +2430,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2433: checking for $ac_word" >&5
+echo "configure:2434: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_STRIP'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2470,7 +2471,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2474: checking for $ac_word" >&5
+echo "configure:2475: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_WINDRES'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2532,7 +2533,7 @@ else
fi
echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
-echo "configure:2536: checking for gcc -pipe support" >&5
+echo "configure:2537: checking for gcc -pipe support" >&5
if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
echo '#include <stdio.h>' > dummy-hello.c
echo 'int main() { printf("Hello World\n"); return 0; }' >> dummy-hello.c
@@ -2547,14 +2548,14 @@ if test -n "$GNU_CC" && test -n "$GNU_CXX" && test -n "$GNU_AS"; then
_SAVE_CFLAGS=$CFLAGS
CFLAGS="$CFLAGS -pipe"
cat > conftest.$ac_ext <<EOF
-#line 2551 "configure"
+#line 2552 "configure"
#include "confdefs.h"
#include <stdio.h>
int main() {
printf("Hello World\n");
; return 0; }
EOF
-if { (eval echo configure:2558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2559: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
_res_gcc_pipe="yes"
else
@@ -2581,7 +2582,7 @@ fi
if test "$GNU_CC"; then
echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
-echo "configure:2585: checking for visibility(hidden) attribute" >&5
+echo "configure:2586: checking for visibility(hidden) attribute" >&5
if eval "test \"`echo '$''{'ac_cv_visibility_hidden'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2605,7 +2606,7 @@ echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
EOF
echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
-echo "configure:2609: checking for visibility pragma support" >&5
+echo "configure:2610: checking for visibility pragma support" >&5
if eval "test \"`echo '$''{'ac_cv_visibility_pragma'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2658,7 +2659,7 @@ do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:2662: checking for $ac_word" >&5
+echo "configure:2663: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -2793,10 +2794,6 @@ OS_2)
OS_ARCH=OS2
OS_TARGET=OS2
;;
-WINCE)
- OS_ARCH=WINCE
- OS_TARGET=WINCE
- ;;
esac
#
@@ -2833,13 +2830,10 @@ Windows_NT)
CPU_ARCH=x86
fi
;;
-CYGWIN32_NT|CYGWIN_NT*|MINGW*_NT*)
+CYGWIN_NT*|MINGW*_NT*)
#
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
# the uname.exe in the Cygwin tools.
-# Prior to the Beta 20 release, Cygwin was called GNU-Win32.
-# If uname -s returns "CYGWIN32/NT", we assume that we are using
-# the uname.exe in the GNU-Win32 tools.
# If uname -s returns MINGW32_NT-5.1, we assume that we are using
# the uname.exe in the MSYS tools.
#
@@ -2911,17 +2905,17 @@ EOF
DSO_LDOPTS='-brtl -bnortllib -bM:SRE -bnoentry -bexpall -blibpath:/usr/lib:/lib'
ac_safe=`echo "sys/atomic_op.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for sys/atomic_op.h""... $ac_c" 1>&6
-echo "configure:2915: checking for sys/atomic_op.h" >&5
+echo "configure:2909: checking for sys/atomic_op.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 2920 "configure"
+#line 2914 "configure"
#include "confdefs.h"
#include <sys/atomic_op.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2925: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2919: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -3078,7 +3072,7 @@ EOF
_DEBUG_FLAGS='-gdwarf-2 -O0'
MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
-echo "configure:3082: checking for gethostbyaddr in -lbind" >&5
+echo "configure:3076: checking for gethostbyaddr in -lbind" >&5
ac_lib_var=`echo bind'_'gethostbyaddr | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -3086,7 +3080,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lbind $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 3090 "configure"
+#line 3084 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -3097,7 +3091,7 @@ int main() {
gethostbyaddr()
; return 0; }
EOF
-if { (eval echo configure:3101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -3313,23 +3307,18 @@ EOF
OS_TARGET=MacOSX
-
- MACOS_VERSION_MAJOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 1`
- MACOS_VERSION_MINOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 2`
- MACOS_VERSION_MICRO=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 3`
- if test -z "$MACOS_VERSION_MINOR"; then
- MACOS_VERSION_MINOR=0
- fi
- if test -z "$MACOS_VERSION_MICRO"; then
- MACOS_VERSION_MICRO=0
+ if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
+ export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
+ elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
+ case "${target_cpu}" in
+ powerpc*)
+ export MACOSX_DEPLOYMENT_TARGET=10.1
+ ;;
+ i*86*)
+ export MACOSX_DEPLOYMENT_TARGET=10.4
+ ;;
+ esac
fi
- MACOS_DEPLOYMENT_TARGET=`printf "%02d%02d%02d" "$MACOS_VERSION_MAJOR" "$MACOS_VERSION_MINOR" "$MACOS_VERSION_MICRO"`
- cat >> confdefs.h <<EOF
-#define MACOS_DEPLOYMENT_TARGET $MACOS_DEPLOYMENT_TARGET
-EOF
-
-
- export MACOSX_DEPLOYMENT_TARGET="$MACOS_VERSION_MAJOR.$MACOS_VERSION_MINOR"
fi
# do the right thing for SDK support
@@ -3851,7 +3840,17 @@ EOF
PR_MD_ASFILES=os_Linux_ia64.s
;;
x86_64)
- PR_MD_ASFILES=os_Linux_x86_64.s
+ if test -n "$USE_64"; then
+ PR_MD_ASFILES=os_Linux_x86_64.s
+ else
+ cat >> confdefs.h <<\EOF
+#define i386 1
+EOF
+
+ PR_MD_ASFILES=os_Linux_x86.s
+ CC="$CC -m32"
+ CXX="$CXX -m32"
+ fi
;;
m68k)
CFLAGS="$CFLAGS -m68020-60"
@@ -4331,17 +4330,17 @@ EOF
_OPTIMIZE_FLAGS="$_OPTIMIZE_FLAGS -Olimit 4000"
ac_safe=`echo "machine/builtins.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for machine/builtins.h""... $ac_c" 1>&6
-echo "configure:4335: checking for machine/builtins.h" >&5
+echo "configure:4334: checking for machine/builtins.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4340 "configure"
+#line 4339 "configure"
#include "confdefs.h"
#include <machine/builtins.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4345: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4414,6 +4413,26 @@ EOF
PR_MD_CSRCS=qnx.c
;;
+*-riscos*)
+ cat >> confdefs.h <<\EOF
+#define XP_UNIX 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define RISCOS 1
+EOF
+
+ cat >> confdefs.h <<\EOF
+#define _PR_NEED_H_ERRNO 1
+EOF
+
+ USE_PTHREADS=1
+ MDCPUCFG_H=_riscos.cfg
+ PR_MD_CSRCS=riscos.c
+ DLL_SUFFIX=a
+ LD="/home/riscos/env/ro-ar cr"
+ ;;
+
*-*-sco*)
cat >> confdefs.h <<\EOF
#define XP_UNIX 1
@@ -4883,7 +4902,7 @@ case $target in
;;
*)
echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:4887: checking for dlopen in -ldl" >&5
+echo "configure:4906: checking for dlopen in -ldl" >&5
ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-%__p_%'`
if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@@ -4891,7 +4910,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-ldl $LIBS"
cat > conftest.$ac_ext <<EOF
-#line 4895 "configure"
+#line 4914 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@@ -4902,7 +4921,7 @@ int main() {
dlopen()
; return 0; }
EOF
-if { (eval echo configure:4906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:4925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@@ -4919,17 +4938,17 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
echo "$ac_t""yes" 1>&6
ac_safe=`echo "dlfcn.h" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for dlfcn.h""... $ac_c" 1>&6
-echo "configure:4923: checking for dlfcn.h" >&5
+echo "configure:4942: checking for dlfcn.h" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 4928 "configure"
+#line 4947 "configure"
#include "confdefs.h"
#include <dlfcn.h>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4933: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4952: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -4962,13 +4981,13 @@ esac
if test $ac_cv_prog_gcc = yes; then
echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:4966: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:4985: checking whether ${CC-cc} needs -traditional" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_pattern="Autoconf.*'x'"
cat > conftest.$ac_ext <<EOF
-#line 4972 "configure"
+#line 4991 "configure"
#include "confdefs.h"
#include <sgtty.h>
Autoconf TIOCGETP
@@ -4986,7 +5005,7 @@ rm -f conftest*
if test $ac_cv_prog_gcc_traditional = no; then
cat > conftest.$ac_ext <<EOF
-#line 4990 "configure"
+#line 5009 "configure"
#include "confdefs.h"
#include <termio.h>
Autoconf TCGETA
@@ -5010,12 +5029,12 @@ fi
for ac_func in lchown strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5014: checking for $ac_func" >&5
+echo "configure:5033: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 5019 "configure"
+#line 5038 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -5038,7 +5057,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:5042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5061: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -5079,7 +5098,7 @@ hpux*)
if test -z "$GNU_CC"; then
echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:5083: checking for +Olit support" >&5
+echo "configure:5102: checking for +Olit support" >&5
if eval "test \"`echo '$''{'ac_cv_hpux_usable_olit_option'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -5113,7 +5132,7 @@ esac
echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5117: checking for pthread_create in -lpthreads" >&5
+echo "configure:5136: checking for pthread_create in -lpthreads" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5135,7 +5154,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5139: checking for pthread_create in -lpthread" >&5
+echo "configure:5158: checking for pthread_create in -lpthread" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5157,7 +5176,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5161: checking for pthread_create in -lc_r" >&5
+echo "configure:5180: checking for pthread_create in -lc_r" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5179,7 +5198,7 @@ echo "
echo "$ac_t""no" 1>&6
echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5183: checking for pthread_create in -lc" >&5
+echo "configure:5202: checking for pthread_create in -lc" >&5
echo "
#include <pthread.h>
void *foo(void *v) { return v; }
@@ -5331,7 +5350,7 @@ if test -n "$USE_PTHREADS"; then
rm -f conftest*
ac_cv_have_dash_pthread=no
echo $ac_n "checking whether ${CC-cc} accepts -pthread""... $ac_c" 1>&6
-echo "configure:5335: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5354: checking whether ${CC-cc} accepts -pthread" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthread -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -5354,7 +5373,7 @@ echo "configure:5335: checking whether ${CC-cc} accepts -pthread" >&5
ac_cv_have_dash_pthreads=no
if test "$ac_cv_have_dash_pthread" = "no"; then
echo $ac_n "checking whether ${CC-cc} accepts -pthreads""... $ac_c" 1>&6
-echo "configure:5358: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5377: checking whether ${CC-cc} accepts -pthreads" >&5
echo 'int main() { return 0; }' | cat > conftest.c
${CC-cc} -pthreads -o conftest conftest.c > conftest.out 2>&1
if test $? -eq 0; then
@@ -5614,9 +5633,11 @@ EOF
PR_MD_ASFILES=os_SunOS_x86.s
fi
else
- PR_MD_ASFILES=os_SunOS.s
if test -n "$USE_64"; then
- PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS_sparcv9.s"
+ PR_MD_ASFILES=os_SunOS_sparcv9.s
+ fi
+ if test -n "$USE_NATIVE_THREADS"; then
+ PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS.s"
fi
fi
fi
@@ -5768,7 +5789,6 @@ esac
-
MAKEFILES="
Makefile
config/Makefile
@@ -6035,7 +6055,6 @@ s%@OS_TARGET@%$OS_TARGET%g
s%@OS_ARCH@%$OS_ARCH%g
s%@OS_RELEASE@%$OS_RELEASE%g
s%@OS_TEST@%$OS_TEST%g
-s%@MACOS_DEPLOYMENT_TARGET@%$MACOS_DEPLOYMENT_TARGET%g
s%@MACOSX_DEPLOYMENT_TARGET@%$MACOSX_DEPLOYMENT_TARGET%g
s%@DEFINES@%$DEFINES%g
s%@AR_FLAGS@%$AR_FLAGS%g
diff --git a/configure.in b/configure.in
index 76c06f04..99e472af 100644
--- a/configure.in
+++ b/configure.in
@@ -45,7 +45,7 @@ dnl = Defaults
dnl ========================================================
MOD_MAJOR_VERSION=4
MOD_MINOR_VERSION=6
-MOD_PATCH_VERSION=0
+MOD_PATCH_VERSION=1
NSPR_MODNAME=nspr20
_HAVE_PTHREADS=
USE_PTHREADS=
@@ -56,7 +56,7 @@ USE_64=
USE_CPLUS=
USE_IPV6=
USE_MDUPDATE=
-MACOS_DEPLOYMENT_TARGET=
+_MACOSX_DEPLOYMENT_TARGET=
_OPTIMIZE_FLAGS=-O
_DEBUG_FLAGS=-g
MOZ_DEBUG=1
@@ -227,10 +227,10 @@ AC_ARG_ENABLE(mdupdate,
fi ])
AC_ARG_ENABLE(macos-target,
- [ --enable-macos-target=VER (default=10.1)
- Set the minimum MacOS version needed at runtime],
- [MACOS_DEPLOYMENT_TARGET_STR=$enableval],
- [MACOS_DEPLOYMENT_TARGET_STR=10.1])
+ [ --enable-macos-target=VER
+ Set the minimum MacOS version needed at runtime
+ [10.1 for ppc, 10.4 for x86]],
+ [_MACOSX_DEPLOYMENT_TARGET=$enableval])
dnl ========================================================
dnl =
@@ -656,10 +656,6 @@ OS_2)
OS_ARCH=OS2
OS_TARGET=OS2
;;
-WINCE)
- OS_ARCH=WINCE
- OS_TARGET=WINCE
- ;;
esac
#
@@ -696,13 +692,10 @@ Windows_NT)
CPU_ARCH=x86
fi
;;
-CYGWIN32_NT|CYGWIN_NT*|MINGW*_NT*)
+CYGWIN_NT*|MINGW*_NT*)
#
# If uname -s returns "CYGWIN_NT-4.0", we assume that we are using
# the uname.exe in the Cygwin tools.
-# Prior to the Beta 20 release, Cygwin was called GNU-Win32.
-# If uname -s returns "CYGWIN32/NT", we assume that we are using
-# the uname.exe in the GNU-Win32 tools.
# If uname -s returns MINGW32_NT-5.1, we assume that we are using
# the uname.exe in the MSYS tools.
#
@@ -950,23 +943,24 @@ case "$target" in
AC_DEFINE(XP_MACOSX)
OS_TARGET=MacOSX
- dnl The C preprocessor can only handle integers in comparisons, so
- dnl convert the version to the form AABBCC where AA=major release,
- dnl BB=minor release, and CC=point/micro release.
-
- MACOS_VERSION_MAJOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 1`
- MACOS_VERSION_MINOR=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 2`
- MACOS_VERSION_MICRO=`echo $MACOS_DEPLOYMENT_TARGET_STR | cut -d . -f 3`
- if test -z "$MACOS_VERSION_MINOR"; then
- MACOS_VERSION_MINOR=0
+ if test -n "$_MACOSX_DEPLOYMENT_TARGET" ; then
+ dnl Use the specified value
+ export MACOSX_DEPLOYMENT_TARGET=$_MACOSX_DEPLOYMENT_TARGET
+ elif test -z "$MACOSX_DEPLOYMENT_TARGET" ; then
+ dnl No value specified on the command line or in the environment,
+ dnl use the lesser of the library's minimum or the architecture's
+ dnl minimum.
+ case "${target_cpu}" in
+ powerpc*)
+ dnl Architecture minimum 10.1
+ export MACOSX_DEPLOYMENT_TARGET=10.1
+ ;;
+ i*86*)
+ dnl Architecture minimum 10.4
+ export MACOSX_DEPLOYMENT_TARGET=10.4
+ ;;
+ esac
fi
- if test -z "$MACOS_VERSION_MICRO"; then
- MACOS_VERSION_MICRO=0
- fi
- MACOS_DEPLOYMENT_TARGET=`printf "%02d%02d%02d" "$MACOS_VERSION_MAJOR" "$MACOS_VERSION_MINOR" "$MACOS_VERSION_MICRO"`
- AC_DEFINE_UNQUOTED(MACOS_DEPLOYMENT_TARGET, $MACOS_DEPLOYMENT_TARGET)
-
- export MACOSX_DEPLOYMENT_TARGET="$MACOS_VERSION_MAJOR.$MACOS_VERSION_MINOR"
fi
# do the right thing for SDK support
@@ -1338,7 +1332,14 @@ case "$target" in
PR_MD_ASFILES=os_Linux_ia64.s
;;
x86_64)
- PR_MD_ASFILES=os_Linux_x86_64.s
+ if test -n "$USE_64"; then
+ PR_MD_ASFILES=os_Linux_x86_64.s
+ else
+ AC_DEFINE(i386)
+ PR_MD_ASFILES=os_Linux_x86.s
+ CC="$CC -m32"
+ CXX="$CXX -m32"
+ fi
;;
m68k)
CFLAGS="$CFLAGS -m68020-60"
@@ -1692,6 +1693,17 @@ mips-sony-newsos*)
PR_MD_CSRCS=qnx.c
;;
+*-riscos*)
+ AC_DEFINE(XP_UNIX)
+ AC_DEFINE(RISCOS)
+ AC_DEFINE(_PR_NEED_H_ERRNO)
+ USE_PTHREADS=1
+ MDCPUCFG_H=_riscos.cfg
+ PR_MD_CSRCS=riscos.c
+ DLL_SUFFIX=a
+ LD="/home/riscos/env/ro-ar cr"
+ ;;
+
*-*-sco*)
AC_DEFINE(XP_UNIX)
AC_DEFINE(SCO)
@@ -2226,7 +2238,8 @@ AC_ARG_ENABLE(nspr-threads,
case "$target" in
*-beos*)
AC_ARG_WITH(bthreads,
- [ --with-bthreads Use system bthreads library as thread subsystem (BeOS only)],
+ [ --with-bthreads Use system bthreads library as thread subsystem
+ (BeOS only)],
[ if test "$withval" = "yes"; then
USE_BTHREADS=1
USE_USER_PTHREADS=
@@ -2236,7 +2249,8 @@ case "$target" in
*-solaris*)
AC_ARG_WITH(native-threads,
- [ --with-native-threads Use native system threads as thread subsystem (Solaris only)],
+ [ --with-native-threads Use native system threads as thread subsystem
+ (Solaris only)],
[ if test "$withval" = "yes"; then
USE_NATIVE_THREADS=1
USE_USER_PTHREADS=
@@ -2475,9 +2489,11 @@ case "$target" in
PR_MD_ASFILES=os_SunOS_x86.s
fi
else
- PR_MD_ASFILES=os_SunOS.s
if test -n "$USE_64"; then
- PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS_sparcv9.s"
+ PR_MD_ASFILES=os_SunOS_sparcv9.s
+ fi
+ if test -n "$USE_NATIVE_THREADS"; then
+ PR_MD_ASFILES="$PR_MD_ASFILES os_SunOS.s"
fi
fi
fi
@@ -2595,7 +2611,6 @@ AC_SUBST(OS_TARGET)
AC_SUBST(OS_ARCH)
AC_SUBST(OS_RELEASE)
AC_SUBST(OS_TEST)
-AC_SUBST(MACOS_DEPLOYMENT_TARGET)
AC_SUBST(MACOSX_DEPLOYMENT_TARGET)
AC_SUBST(DEFINES)
diff --git a/pkg/linux/Makefile.in b/pkg/linux/Makefile.in
index 473a616c..38a5eb23 100644
--- a/pkg/linux/Makefile.in
+++ b/pkg/linux/Makefile.in
@@ -47,7 +47,7 @@ srcdir = @srcdir@
VPATH = @srcdir@
NAME = sun-nspr
-RELEASE = 2
+RELEASE = 1
TOPDIR = /usr/src/redhat
VERSION = `grep PR_VERSION $(dist_includedir)/prinit.h \
| sed -e 's/"$$//' -e 's/.*"//' -e 's/ .*//'`
@@ -56,12 +56,17 @@ SPECFILE = $(NAME).spec
include $(MOD_DEPTH)/config/autoconf.mk
+# Force i386 for non 64 bit build
+ifneq ($(USE_64),1)
+ RPMTARGET = "--target=i386"
+endif
+
publish:
$(MAKE) clean
mkdir -p SOURCES SRPMS RPMS BUILD
- (cd $(MOD_DEPTH)/../../dist/$(RELEASE_OBJDIR_NAME)/lib && tar cphf - .) \
+ (cd $(dist_libdir) && tar cphf - .) \
| (mkdir -p opt/sun/private/lib && cd opt/sun/private/lib && tar xvfBp -)
- (cd $(MOD_DEPTH)/../../dist/$(RELEASE_OBJDIR_NAME)/include && tar cphf - .) \
+ (cd $(dist_includedir) && tar cphf - .) \
| (mkdir -p opt/sun/private/include/nspr && cd opt/sun/private/include/nspr && tar xvfBp -)
tar czvf SOURCES/$(NAME)-$(VERSION).tar.gz opt
echo "%define name $(NAME)" >$(SPECFILE)
@@ -69,8 +74,9 @@ publish:
echo "%define release $(RELEASE)" >>$(SPECFILE)
echo "%define buildroot `pwd`/$(NAME)-root" >>$(SPECFILE)
echo "%define _topdir `pwd`" >>$(SPECFILE)
+ echo "%define _unpackaged_files_terminate_build 0" >>$(SPECFILE)
cat $(srcdir)/$(NAME).spec >>$(SPECFILE)
- rpm -ba $(SPECFILE)
+ rpmbuild $(RPMTARGET) -bb $(SPECFILE)
clean:
rm -rf $(TOPDIR)/BUILD/$(NAME)
diff --git a/pr/include/md/_darwin.h b/pr/include/md/_darwin.h
index b5e8d04e..6f409e36 100644
--- a/pr/include/md/_darwin.h
+++ b/pr/include/md/_darwin.h
@@ -42,6 +42,10 @@
#include <sys/syscall.h>
+#ifdef XP_MACOSX
+#include <AvailabilityMacros.h>
+#endif
+
#define PR_LINKER_ARCH "darwin"
#define _PR_SI_SYSNAME "DARWIN"
#ifdef i386
@@ -77,17 +81,21 @@
* if you pass an IPv4-mapped IPv6 address to it.
*/
#define _PR_GHBA_DISALLOW_V4MAPPED
+#ifdef XP_MACOSX
+#if !defined(MAC_OS_X_VERSION_10_3) || \
+ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_3
/*
* socket(AF_INET6) fails with EPROTONOSUPPORT on Mac OS X 10.1.
* IPv6 under OS X 10.2 and below is not complete (see bug 222031).
*/
-#if MACOS_DEPLOYMENT_TARGET < 100300
#define _PR_INET6_PROBE
-#endif
+#endif /* DT < 10.3 */
+#if defined(MAC_OS_X_VERSION_10_2) && \
+ MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_2
/* Mac OS X 10.2 has inet_ntop and inet_pton. */
-#if MACOS_DEPLOYMENT_TARGET >= 100200
#define _PR_HAVE_INET_NTOP
-#endif
+#endif /* DT >= 10.2 */
+#endif /* XP_MACOSX */
#define _PR_IPV6_V6ONLY_PROBE
/* The IPV6_V6ONLY socket option is not defined on Mac OS X 10.1. */
#ifndef IPV6_V6ONLY
diff --git a/pr/include/md/_linux.cfg b/pr/include/md/_linux.cfg
index 465c64ea..776c21e0 100644
--- a/pr/include/md/_linux.cfg
+++ b/pr/include/md/_linux.cfg
@@ -48,7 +48,53 @@
#define PR_AF_INET6 10 /* same as AF_INET6 */
-#ifdef __powerpc__
+#ifdef __powerpc64__
+
+#undef IS_LITTLE_ENDIAN
+#define IS_BIG_ENDIAN 1
+#define IS_64
+
+#define PR_BYTES_PER_BYTE 1
+#define PR_BYTES_PER_SHORT 2
+#define PR_BYTES_PER_INT 4
+#define PR_BYTES_PER_INT64 8
+#define PR_BYTES_PER_LONG 8
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 8
+#define PR_BYTES_PER_DWORD 8
+
+#define PR_BITS_PER_BYTE 8
+#define PR_BITS_PER_SHORT 16
+#define PR_BITS_PER_INT 32
+#define PR_BITS_PER_INT64 64
+#define PR_BITS_PER_LONG 64
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 64
+
+#define PR_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 6
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 6
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 8
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_DOUBLE 8
+#define PR_ALIGN_OF_POINTER 8
+#define PR_ALIGN_OF_WORD 8
+
+#define PR_BYTES_PER_WORD_LOG2 3
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#elif defined(__powerpc__)
#undef IS_LITTLE_ENDIAN
#define IS_BIG_ENDIAN 1
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
index 96e8f1c3..92a5f38a 100644
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -46,7 +46,9 @@
#define PR_LINKER_ARCH "linux"
#define _PR_SI_SYSNAME "LINUX"
-#ifdef __powerpc__
+#ifdef __powerpc64__
+#define _PR_SI_ARCHITECTURE "ppc64"
+#elif defined(__powerpc__)
#define _PR_SI_ARCHITECTURE "ppc"
#elif defined(__alpha)
#define _PR_SI_ARCHITECTURE "alpha"
diff --git a/pr/include/md/_pth.h b/pr/include/md/_pth.h
index eb5c5dde..aadb45e0 100644
--- a/pr/include/md/_pth.h
+++ b/pr/include/md/_pth.h
@@ -146,7 +146,7 @@
|| defined(HPUX) || defined(LINUX) || defined(FREEBSD) \
|| defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \
|| defined(VMS) || defined(NTO) || defined(DARWIN) \
- || defined(UNIXWARE)
+ || defined(UNIXWARE) || defined(RISCOS)
#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)
@@ -259,7 +259,8 @@
#define PT_PRIO_MIN 0
#define PT_PRIO_MAX 31
#elif defined(NETBSD) \
- || defined(BSDI) || defined(DARWIN) || defined(UNIXWARE) /* XXX */
+ || defined(BSDI) || defined(DARWIN) || defined(UNIXWARE) \
+ || defined(RISCOS) /* XXX */
#define PT_PRIO_MIN 0
#define PT_PRIO_MAX 126
#else
@@ -293,7 +294,7 @@ extern int (*_PT_aix_yield_fcn)();
#elif defined(HPUX) || defined(LINUX) || defined(SOLARIS) \
|| defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
|| defined(BSDI) || defined(NTO) || defined(DARWIN) \
- || defined(UNIXWARE)
+ || defined(UNIXWARE) || defined(RISCOS)
#define _PT_PTHREAD_YIELD() sched_yield()
#else
#error "Need to define _PT_PTHREAD_YIELD for this platform"
diff --git a/pr/include/md/_riscos.cfg b/pr/include/md/_riscos.cfg
new file mode 100644
index 00000000..86b88eb5
--- /dev/null
+++ b/pr/include/md/_riscos.cfg
@@ -0,0 +1,141 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nspr_cpucfg___
+#define nspr_cpucfg___
+
+#ifndef XP_UNIX
+#define XP_UNIX
+#endif
+
+#ifndef RISCOS
+#define RISCOS
+#endif
+
+#define IS_LITTLE_ENDIAN 1
+#undef IS_BIG_ENDIAN
+#define HAVE_LONG_LONG
+#undef HAVE_ALIGNED_DOUBLES
+#undef HAVE_ALIGNED_LONGLONGS
+
+#define PR_BYTES_PER_BYTE 1
+#define PR_BYTES_PER_SHORT 2
+#define PR_BYTES_PER_INT 4
+#define PR_BYTES_PER_INT64 8
+#define PR_BYTES_PER_LONG 4
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 4
+#define PR_BYTES_PER_DWORD 8
+
+#define PR_BITS_PER_BYTE 8
+#define PR_BITS_PER_SHORT 16
+#define PR_BITS_PER_INT 32
+#define PR_BITS_PER_INT64 64
+#define PR_BITS_PER_LONG 32
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 32
+
+#define PR_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 5
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 5
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 4
+#define PR_ALIGN_OF_INT64 4
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_DOUBLE 4
+#define PR_ALIGN_OF_POINTER 4
+#define PR_ALIGN_OF_WORD 4
+
+#define PR_BYTES_PER_WORD_LOG2 2
+#define PR_BYTES_PER_DWORD_LOG2 3
+#define PR_WORDS_PER_DWORD_LOG2 1
+
+#ifndef NO_NSPR_10_SUPPORT
+
+#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
+#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
+#define BYTES_PER_INT PR_BYTES_PER_INT
+#define BYTES_PER_INT64 PR_BYTES_PER_INT64
+#define BYTES_PER_LONG PR_BYTES_PER_LONG
+#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
+#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
+#define BYTES_PER_WORD PR_BYTES_PER_WORD
+#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
+
+#define BITS_PER_BYTE PR_BITS_PER_BYTE
+#define BITS_PER_SHORT PR_BITS_PER_SHORT
+#define BITS_PER_INT PR_BITS_PER_INT
+#define BITS_PER_INT64 PR_BITS_PER_INT64
+#define BITS_PER_LONG PR_BITS_PER_LONG
+#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
+#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
+#define BITS_PER_WORD PR_BITS_PER_WORD
+
+#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
+#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
+#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
+#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
+#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
+#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
+#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
+#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
+
+#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
+#define ALIGN_OF_INT PR_ALIGN_OF_INT
+#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
+#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
+#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
+#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
+#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
+#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
+
+#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
+#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
+#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
+
+#endif /* NO_NSPR_10_SUPPORT */
+
+#endif /* nspr_cpucfg___ */
diff --git a/pr/include/md/_riscos.h b/pr/include/md/_riscos.h
new file mode 100644
index 00000000..5a0309eb
--- /dev/null
+++ b/pr/include/md/_riscos.h
@@ -0,0 +1,209 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Peter Naulls <peter@chocky.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#ifndef nspr_riscos_defs_h___
+#define nspr_riscos_defs_h___
+
+/*
+** Internal configuration macros
+*/
+#define PR_LINKER_ARCH "riscos"
+#define _PR_SI_SYSNAME "RISCOS"
+#define _PR_SI_ARCHITECTURE "arm"
+#define PR_DLL_SUFFIX ".a"
+
+#define _PR_POLL_AVAILABLE
+#define _PR_USE_POLL
+#define _PR_HAVE_SOCKADDR_LEN
+#undef HAVE_BSD_FLOCK
+#define _PR_NO_LARGE_FILES
+#define _PR_STAT_HAS_ONLY_ST_ATIME
+#define _PR_HAVE_POSIX_SEMAPHORES
+
+#include <sys/select.h>
+#include <sys/poll.h>
+#include <kernel.h>
+
+
+#undef HAVE_STACK_GROWING_UP
+#undef HAVE_DLL
+#undef USE_DLFCN
+#define NEED_STRFTIME_LOCK
+#define NEED_TIME_R
+#define PT_NO_SIGTIMEDWAIT
+
+#ifndef HAVE_STRERROR
+#define HAVE_STRERROR
+#endif
+
+#define USE_SETJMP
+
+#include <setjmp.h>
+
+#define _SETJMP setjmp
+#define _LONGJMP longjmp
+#define _PR_CONTEXT_TYPE jmp_buf
+#define _PR_NUM_GCREGS _JBLEN
+#define _MD_GET_SP(_t) (_t)->md.context[7]
+
+#define CONTEXT(_th) ((_th)->md.context)
+
+
+/*
+** Initialize the thread context preparing it to execute _main.
+*/
+#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
+{ \
+ *status = PR_TRUE; \
+ if(_SETJMP(CONTEXT(_thread))) (*_main)(); \
+ _MD_GET_SP(_thread) = (int) ((_sp) - 128); \
+}
+
+#define _MD_SWITCH_CONTEXT(_thread) \
+ if (!_SETJMP(CONTEXT(_thread))) { \
+ (_thread)->md.errcode = errno; \
+ _PR_Schedule(); \
+ }
+
+/*
+** Restore a thread context, saved by _MD_SWITCH_CONTEXT
+*/
+#define _MD_RESTORE_CONTEXT(_thread) \
+{ \
+ errno = (_thread)->md.errcode; \
+ _MD_SET_CURRENT_THREAD(_thread); \
+ _LONGJMP(CONTEXT(_thread), 1); \
+}
+
+/*
+** Machine-dependent (MD) data structures.
+*/
+struct _MDThread {
+ _PR_CONTEXT_TYPE context;
+ int id;
+ int errcode;
+};
+
+struct _MDThreadStack {
+ PRInt8 notused;
+};
+
+struct _MDLock {
+ PRInt8 notused;
+};
+
+struct _MDSemaphore {
+ PRInt8 notused;
+};
+
+struct _MDCVar {
+ PRInt8 notused;
+};
+
+struct _MDSegment {
+ PRInt8 notused;
+};
+
+/*
+** md-specific cpu structure field
+*/
+#define _PR_MD_MAX_OSFD FD_SETSIZE
+
+struct _MDCPU_Unix {
+ PRCList ioQ;
+ PRUint32 ioq_timeout;
+ PRInt32 ioq_max_osfd;
+ PRInt32 ioq_osfd_cnt;
+#ifndef _PR_USE_POLL
+ fd_set fd_read_set, fd_write_set, fd_exception_set;
+ PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD], fd_write_cnt[_PR_MD_MAX_OSFD], fd_exception_cnt[_PR_MD_MAX_OSFD];
+#else
+ struct pollfd *ioq_pollfds;
+ int ioq_pollfds_size;
+#endif
+};
+
+#define _PR_IOQ(_cpu) /* */ ((_cpu)->md.md_unix.ioQ)
+#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu))
+#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set)
+#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt)
+#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set)
+#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt)
+#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set)
+#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt)
+#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout)
+#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd)
+#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt)
+#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds)
+#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size)
+
+#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32
+
+struct _MDCPU {
+ struct _MDCPU_Unix md_unix;
+};
+
+#define _MD_INIT_LOCKS()
+#define _MD_NEW_LOCK(lock) PR_SUCCESS
+#define _MD_FREE_LOCK(lock)
+#define _MD_LOCK(lock)
+#define _MD_UNLOCK(lock)
+#define _MD_INIT_IO()
+#define _MD_IOQ_LOCK()
+#define _MD_IOQ_UNLOCK()
+
+#define _MD_GET_INTERVAL _PR_UNIX_GetInterval
+#define _MD_INTERVAL_PER_SEC _PR_UNIX_TicksPerSecond
+#define _MD_EARLY_INIT _MD_EarlyInit
+#define _MD_FINAL_INIT _PR_UnixInit
+#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu)
+#define _MD_INIT_THREAD _MD_InitializeThread
+#define _MD_EXIT_THREAD(thread)
+#define _MD_SUSPEND_THREAD(thread)
+#define _MD_RESUME_THREAD(thread)
+#define _MD_CLEAN_THREAD(_thread)
+
+/*
+** We wrapped the select() call. _MD_SELECT refers to the built-in,
+** unwrapped version.
+*/
+#include <sys/time.h>
+#include <sys/types.h>
+#include <sys/select.h>
+#define _MD_SELECT select
+
+#endif /* nspr_riscos_defs_h___ */
diff --git a/pr/include/md/_win95.h b/pr/include/md/_win95.h
index 4e61fdf3..cd26bd63 100644
--- a/pr/include/md/_win95.h
+++ b/pr/include/md/_win95.h
@@ -72,6 +72,22 @@ struct addrinfo {
struct addrinfo *ai_next;
};
#endif
+#define _PR_HAVE_MD_SOCKADDR_IN6
+/* isomorphic to struct in6_addr on Windows */
+struct _md_in6_addr {
+ union {
+ PRUint8 _S6_u8[16];
+ PRUint16 _S6_u16[8];
+ } _S6_un;
+};
+/* isomorphic to struct sockaddr_in6 on Windows */
+struct _md_sockaddr_in6 {
+ PRInt16 sin6_family;
+ PRUint16 sin6_port;
+ PRUint32 sin6_flowinfo;
+ struct _md_in6_addr sin6_addr;
+ PRUint32 sin6_scope_id;
+};
#endif
#define _PR_HAVE_THREADSAFE_GETHOST
#define _PR_HAVE_ATOMIC_OPS
diff --git a/pr/include/md/_winnt.h b/pr/include/md/_winnt.h
index 36cbcfae..0e6ce819 100644
--- a/pr/include/md/_winnt.h
+++ b/pr/include/md/_winnt.h
@@ -87,6 +87,22 @@ struct addrinfo {
struct addrinfo *ai_next;
};
#endif
+#define _PR_HAVE_MD_SOCKADDR_IN6
+/* isomorphic to struct in6_addr on Windows */
+struct _md_in6_addr {
+ union {
+ PRUint8 _S6_u8[16];
+ PRUint16 _S6_u16[8];
+ } _S6_un;
+};
+/* isomorphic to struct sockaddr_in6 on Windows */
+struct _md_sockaddr_in6 {
+ PRInt16 sin6_family;
+ PRUint16 sin6_port;
+ PRUint32 sin6_flowinfo;
+ struct _md_in6_addr sin6_addr;
+ PRUint32 sin6_scope_id;
+};
#endif
#define _PR_HAVE_THREADSAFE_GETHOST
#define _PR_HAVE_ATOMIC_OPS
diff --git a/pr/include/md/prosdep.h b/pr/include/md/prosdep.h
index 93496520..3e141d02 100644
--- a/pr/include/md/prosdep.h
+++ b/pr/include/md/prosdep.h
@@ -138,6 +138,9 @@ PR_BEGIN_EXTERN_C
#elif defined(NTO)
#include "md/_nto.h"
+#elif defined(RISCOS)
+#include "md/_riscos.h"
+
#else
#error unknown Unix flavor
diff --git a/pr/include/prinit.h b/pr/include/prinit.h
index 70b4567d..e7ca7bce 100644
--- a/pr/include/prinit.h
+++ b/pr/include/prinit.h
@@ -63,11 +63,11 @@ PR_BEGIN_EXTERN_C
** The format of the version string is
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
*/
-#define PR_VERSION "4.6"
+#define PR_VERSION "4.6.1 Beta"
#define PR_VMAJOR 4
#define PR_VMINOR 6
-#define PR_VPATCH 0
-#define PR_BETA PR_FALSE
+#define PR_VPATCH 1
+#define PR_BETA PR_TRUE
/*
** PRVersionCheck
diff --git a/pr/include/private/primpl.h b/pr/include/private/primpl.h
index 07d4a3ed..eebcb841 100644
--- a/pr/include/private/primpl.h
+++ b/pr/include/private/primpl.h
@@ -1409,7 +1409,7 @@ extern PRUintn _PR_NetAddrSize(const PRNetAddr* addr);
#define PR_NETADDR_SIZE(_addr) \
((_addr)->raw.family == PR_AF_INET \
? sizeof((_addr)->inet) \
- : sizeof(struct _md_sockaddr_in6)
+ : sizeof(struct _md_sockaddr_in6))
#endif /* defined(XP_UNIX) */
#else
diff --git a/pr/include/prlink.h b/pr/include/prlink.h
index 06fb1b35..b2eb5141 100644
--- a/pr/include/prlink.h
+++ b/pr/include/prlink.h
@@ -125,8 +125,8 @@ NSPR_API(PRLibrary*) PR_LoadLibrary(const char *name);
typedef enum PRLibSpecType {
PR_LibSpec_Pathname,
- PR_LibSpec_MacNamedFragment,
- PR_LibSpec_MacIndexedFragment
+ PR_LibSpec_MacNamedFragment, /* obsolete (for Mac OS Classic) */
+ PR_LibSpec_MacIndexedFragment /* obsolete (for Mac OS Classic) */
} PRLibSpecType;
struct FSSpec; /* Mac OS FSSpec */
@@ -141,13 +141,13 @@ typedef struct PRLibSpec {
struct {
const struct FSSpec *fsspec;
const char *name;
- } mac_named_fragment;
+ } mac_named_fragment; /* obsolete (for Mac OS Classic) */
/* if type is PR_LibSpec_MacIndexedFragment */
struct {
const struct FSSpec *fsspec;
PRUint32 index;
- } mac_indexed_fragment;
+ } mac_indexed_fragment; /* obsolete (for Mac OS Classic) */
} value;
} PRLibSpec;
diff --git a/pr/include/prthread.h b/pr/include/prthread.h
index 7c44feb2..dba1c9b8 100644
--- a/pr/include/prthread.h
+++ b/pr/include/prthread.h
@@ -44,7 +44,7 @@
** is not guaranteed, so programming using priority based synchronization
** is a no-no.
**
-** NSPR threads are scheduled based loosly on their client set priority.
+** NSPR threads are scheduled based loosely on their client set priority.
** In general, a thread of a higher priority has a statistically better
** chance of running relative to threads of lower priority. However,
** NSPR uses multiple strategies to provide execution vehicles for thread
diff --git a/pr/src/io/prprf.c b/pr/src/io/prprf.c
index b7ac9812..cd5760a9 100644
--- a/pr/src/io/prprf.c
+++ b/pr/src/io/prprf.c
@@ -394,7 +394,7 @@ static int cvt_s(SprintfState *ss, const char *s, int width, int prec,
}
/*
-** BiuldArgArray stands for Numbered Argument list Sprintf
+** BuildArgArray stands for Numbered Argument list Sprintf
** for example,
** fmp = "%4$i, %2$d, %3s, %1d";
** the number must start from 1, and no gap among them
@@ -410,7 +410,7 @@ static struct NumArg* BuildArgArray( const char *fmt, va_list ap, int* rv, struc
/*
** first pass:
- ** detemine how many legal % I have got, then allocate space
+ ** determine how many legal % I have got, then allocate space
*/
p = fmt;
diff --git a/pr/src/io/prscanf.c b/pr/src/io/prscanf.c
index 6fad0f70..618f184f 100644
--- a/pr/src/io/prscanf.c
+++ b/pr/src/io/prscanf.c
@@ -639,7 +639,7 @@ StringGetChar(void *stream)
return EOF;
} else {
*((char **) stream) = cPtr + 1;
- return *cPtr;
+ return (unsigned char) *cPtr;
}
}
diff --git a/pr/src/linking/prlink.c b/pr/src/linking/prlink.c
index 325decb5..55831bf7 100644
--- a/pr/src/linking/prlink.c
+++ b/pr/src/linking/prlink.c
@@ -40,13 +40,11 @@
#include <image.h>
#endif
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#ifdef XP_MACOSX
#include <CodeFragments.h>
#include <TextUtils.h>
#include <Types.h>
#include <Aliases.h>
-
-#if TARGET_CARBON
#include <CFURL.h>
#include <CFBundle.h>
#include <CFString.h>
@@ -54,14 +52,6 @@
#include <CFData.h>
#endif
-#if defined(XP_MACOSX)
-#define PStrFromCStr(src, dst) c2pstrcpy(dst, src)
-#else
-#include "macdll.h"
-#include "mdmac.h"
-#endif /* XP_MACOSX */
-#endif
-
#ifdef XP_UNIX
#ifdef USE_DLFCN
#include <dlfcn.h>
@@ -183,19 +173,12 @@ struct PRLibrary {
#endif
#endif
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#ifdef XP_MACOSX
CFragConnectionID connection;
-
-#if TARGET_CARBON
CFBundleRef bundle;
-#endif
-
Ptr main;
-
-#if defined(XP_MACOSX)
CFMutableDictionaryRef wrappers;
const struct mach_header* image;
-#endif /* XP_MACOSX */
#endif
#ifdef XP_UNIX
@@ -220,12 +203,6 @@ static PRMonitor *pr_linker_lock;
static char* _pr_currentLibPath = NULL;
static PRLibrary *pr_LoadLibraryByPathname(const char *name, PRIntn flags);
-#ifdef XP_MAC
-static PRLibrary *pr_Mac_LoadNamedFragment(const FSSpec *fileSpec,
- const char* fragmentName);
-static PRLibrary *pr_Mac_LoadIndexedFragment(const FSSpec *fileSpec,
- PRUint32 fragIndex);
-#endif /* XP_MAC */
/************************************************************************/
@@ -262,9 +239,7 @@ static void DLLErrorInternal(PRIntn oserr)
void _PR_InitLinker(void)
{
-#if !defined(XP_MAC) && !defined(XP_BEOS)
- PRLibrary *lm;
-#endif
+ PRLibrary *lm = NULL;
#if defined(XP_UNIX)
void *h;
#endif
@@ -331,9 +306,10 @@ void _PR_InitLinker(void)
#endif /* HAVE_DLL */
#endif /* XP_UNIX */
-#if !defined(XP_MAC) && !defined(XP_BEOS)
- PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Loaded library %s (init)", lm?lm->name:"NULL"));
-#endif
+ if (lm) {
+ PR_LOG(_pr_linker_lm, PR_LOG_MIN,
+ ("Loaded library %s (init)", lm->name));
+ }
PR_ExitMonitor(pr_linker_lock);
}
@@ -440,25 +416,6 @@ PR_GetLibraryPath(void)
ev = strdup(ev);
#endif
-#ifdef XP_MAC
- {
- char *p;
- int len;
-
- ev = getenv("LD_LIBRARY_PATH");
-
- if (!ev)
- ev = "";
-
- len = strlen(ev) + 1; /* +1 for the null */
- p = (char*) malloc(len);
- if (p) {
- strcpy(p, ev);
- }
- ev = p;
- }
-#endif
-
#if defined(XP_UNIX) || defined(XP_BEOS)
#if defined(USE_DLFCN) || defined(USE_MACH_DYLD) || defined(XP_BEOS)
{
@@ -532,13 +489,6 @@ PR_GetLibraryName(const char *path, const char *lib)
}
}
#endif /* XP_PC */
-#ifdef XP_MAC
- if (path) {
- fullname = PR_smprintf("%s%s", path, lib);
- } else {
- fullname = PR_smprintf("%s", lib);
- }
-#endif
#if defined(XP_UNIX) || defined(XP_BEOS)
if (strstr(lib, PR_DLL_SUFFIX) == NULL)
{
@@ -606,16 +556,6 @@ PR_LoadLibraryWithFlags(PRLibSpec libSpec, PRIntn flags)
switch (libSpec.type) {
case PR_LibSpec_Pathname:
return pr_LoadLibraryByPathname(libSpec.value.pathname, flags);
-#ifdef XP_MAC
- case PR_LibSpec_MacNamedFragment:
- return pr_Mac_LoadNamedFragment(
- libSpec.value.mac_named_fragment.fsspec,
- libSpec.value.mac_named_fragment.name);
- case PR_LibSpec_MacIndexedFragment:
- return pr_Mac_LoadIndexedFragment(
- libSpec.value.mac_indexed_fragment.fsspec,
- libSpec.value.mac_indexed_fragment.index);
-#endif /* XP_MAC */
default:
PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0);
return NULL;
@@ -657,9 +597,8 @@ pr_LoadMachDyldModule(const char *name)
}
#endif
-#if defined(XP_MAC) || defined(XP_MACOSX)
-
#ifdef XP_MACOSX
+
static void* TV2FP(CFMutableDictionaryRef dict, const char* name, void *tvp)
{
static uint32 glue[6] = { 0x3D800000, 0x618C0000, 0x800C0000, 0x804C0004, 0x7C0903A6, 0x4E800420 };
@@ -693,7 +632,6 @@ static void* TV2FP(CFMutableDictionaryRef dict, const char* name, void *tvp)
return newGlue;
}
-#endif
/*
** macLibraryLoadProc is a function definition for a Mac shared library
@@ -709,117 +647,47 @@ static PRStatus
pr_LoadViaCFM(const char *name, PRLibrary *lm)
{
OSErr err;
- char cName[64];
Str255 errName;
-
-#if !defined(XP_MACOSX)
- Str255 pName;
+ FSRef ref;
+ FSSpec fileSpec;
+ Boolean tempUnusedBool;
+
/*
- * Algorithm: The "name" passed in could be either a shared
- * library name that we should look for in the normal library
- * search paths, or a full path name to a specific library on
- * disk. Since the full path will always contain a ":"
- * (shortest possible path is "Volume:File"), and since a
- * library name can not contain a ":", we can test for the
- * presence of a ":" to see which type of library we should load.
- * or its a full UNIX path which we for now assume is Java
- * enumerating all the paths (see below)
+ * Make an FSSpec from the path name and call GetDiskFragment.
*/
- if (strchr(name, PR_PATH_SEPARATOR) == NULL) {
- if (strchr(name, PR_DIRECTORY_SEPARATOR) == NULL) {
- /*
- * The name did not contain a ":", so it must be a
- * library name. Convert the name to a Pascal string
- * and try to find the library.
- */
- } else {
- /*
- * name contained a "/" which means we need to suck off
- * the last part of the path and pass that on the
- * NSGetSharedLibrary. this may not be what we really
- * want to do .. because Java could be iterating through
- * the whole LD path, and we'll find it if it's anywhere
- * on that path -- it appears that's what UNIX and the
- * PC do too...so we'll emulate but it could be wrong.
- */
- name = strrchr(name, PR_DIRECTORY_SEPARATOR) + 1;
- }
- PStrFromCStr(name, pName);
-
- /*
- * beard: NSGetSharedLibrary was so broken that I just decided to
- * use GetSharedLibrary for now. This will need to change for
- * plugins, but those should go in the Extensions folder anyhow.
- */
- err = GetSharedLibrary(pName, kCompiledCFragArch, kReferenceCFrag,
- &lm->connection, &lm->main, errName);
- if (err != noErr)
- return PR_FAILURE;
- }
- else
-#endif
- {
- /*
- * The name did contain a ":", so it must be a full path name.
- * Now we have to do a lot of work to convert the path name to
- * an FSSpec (silly, since we were probably just called from the
- * MacFE plug-in code that already knew the FSSpec and converted
- * it to a full path just to pass to us). Make an FSSpec from
- * the full path and call GetDiskFragment.
- */
- FSSpec fileSpec;
- Boolean tempUnusedBool;
-
-#if defined(XP_MACOSX)
- {
- /* Use direct conversion of POSIX path to FSRef to FSSpec. */
- FSRef ref;
- err = FSPathMakeRef((const UInt8*)name, &ref, NULL);
- if (err == noErr)
- err = FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL,
- &fileSpec, NULL);
- }
-#else
- PStrFromCStr(name, pName);
- err = FSMakeFSSpec(0, 0, pName, &fileSpec);
-#endif
- if (err != noErr)
- return PR_FAILURE;
-
- /* Resolve an alias if this was one */
- err = ResolveAliasFile(&fileSpec, true, &tempUnusedBool,
- &tempUnusedBool);
- if (err != noErr)
- return PR_FAILURE;
+ /* Use direct conversion of POSIX path to FSRef to FSSpec. */
+ err = FSPathMakeRef((const UInt8*)name, &ref, NULL);
+ if (err != noErr)
+ return PR_FAILURE;
+ err = FSGetCatalogInfo(&ref, kFSCatInfoNone, NULL, NULL,
+ &fileSpec, NULL);
+ if (err != noErr)
+ return PR_FAILURE;
- /* Finally, try to load the library */
- err = GetDiskFragment(&fileSpec, 0, kCFragGoesToEOF, fileSpec.name,
- kLoadCFrag, &lm->connection, &lm->main, errName);
+ /* Resolve an alias if this was one */
+ err = ResolveAliasFile(&fileSpec, true, &tempUnusedBool,
+ &tempUnusedBool);
+ if (err != noErr)
+ return PR_FAILURE;
-#if TARGET_CARBON
- p2cstrcpy(cName, fileSpec.name);
-#else
- memcpy(cName, fileSpec.name + 1, fileSpec.name[0]);
- cName[fileSpec.name[0]] = '\0';
-#endif
+ /* Finally, try to load the library */
+ err = GetDiskFragment(&fileSpec, 0, kCFragGoesToEOF, fileSpec.name,
+ kLoadCFrag, &lm->connection, &lm->main, errName);
-#ifdef XP_MACOSX
- if (err == noErr && lm->connection) {
- /*
- * if we're a mach-o binary, need to wrap all CFM function
- * pointers. need a hash-table of already seen function
- * pointers, etc.
- */
- lm->wrappers = CFDictionaryCreateMutable(NULL, 16,
- &kCFTypeDictionaryKeyCallBacks,
- &kCFTypeDictionaryValueCallBacks);
- if (lm->wrappers) {
- lm->main = TV2FP(lm->wrappers, "main", lm->main);
- } else
- err = memFullErr;
- }
-#endif
+ if (err == noErr && lm->connection) {
+ /*
+ * if we're a mach-o binary, need to wrap all CFM function
+ * pointers. need a hash-table of already seen function
+ * pointers, etc.
+ */
+ lm->wrappers = CFDictionaryCreateMutable(NULL, 16,
+ &kCFTypeDictionaryKeyCallBacks,
+ &kCFTypeDictionaryValueCallBacks);
+ if (lm->wrappers) {
+ lm->main = TV2FP(lm->wrappers, "main", lm->main);
+ } else
+ err = memFullErr;
}
return (err == noErr) ? PR_SUCCESS : PR_FAILURE;
}
@@ -830,14 +698,11 @@ pr_LoadViaCFM(const char *name, PRLibrary *lm)
** deallocate.
*/
-#if TARGET_CARBON
static PRStatus
pr_LoadCFBundle(const char *name, PRLibrary *lm)
{
CFURLRef bundleURL;
CFBundleRef bundle = NULL;
-
-#ifdef XP_MACOSX
char pathBuf[PATH_MAX];
const char *resolvedPath;
CFStringRef pathRef;
@@ -857,34 +722,11 @@ pr_LoadCFBundle(const char *name, PRLibrary *lm)
}
CFRelease(pathRef);
}
-#else
- OSErr err;
- Str255 pName;
- FSSpec fsSpec;
- FSRef fsRef;
-
- if ((UInt32)(CFURLCreateFromFSRef) == kUnresolvedCFragSymbolAddress)
- return PR_FAILURE;
- PStrFromCStr(name, pName);
- err = FSMakeFSSpec(0, 0, pName, &fsSpec);
- if (err != noErr)
- return PR_FAILURE;
- err = FSpMakeFSRef(&fsSpec, &fsRef);
- if (err != noErr)
- return PR_FAILURE;
- bundleURL = CFURLCreateFromFSRef(NULL, &fsRef);
- if (bundleURL) {
- bundle = CFBundleCreate(NULL, bundleURL);
- CFRelease(bundleURL);
- }
-#endif
lm->bundle = bundle;
return (bundle != NULL) ? PR_SUCCESS : PR_FAILURE;
}
-#endif
-#ifdef XP_MACOSX
static PRStatus
pr_LoadViaDyld(const char *name, PRLibrary *lm)
{
@@ -899,9 +741,8 @@ pr_LoadViaDyld(const char *name, PRLibrary *lm)
}
return (lm->dlh != NULL || lm->image != NULL) ? PR_SUCCESS : PR_FAILURE;
}
-#endif
-#endif /* defined(XP_MAC) || defined(XP_MACOSX) */
+#endif /* XP_MACOSX */
/*
** Dynamically load a library. Only load libraries once, so scan the load
@@ -965,19 +806,13 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
}
#endif /* WIN32 || WIN16 */
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#ifdef XP_MACOSX
{
int i;
PRStatus status;
static const macLibraryLoadProc loadProcs[] = {
-#if defined(XP_MACOSX)
pr_LoadViaDyld, pr_LoadCFBundle, pr_LoadViaCFM
-#elif TARGET_CARBON
- pr_LoadViaCFM, pr_LoadCFBundle
-#else
- pr_LoadViaCFM
-#endif
};
for (i = 0; i < sizeof(loadProcs) / sizeof(loadProcs[0]); i++) {
@@ -1165,136 +1000,6 @@ pr_LoadLibraryByPathname(const char *name, PRIntn flags)
return result;
}
-
-#ifdef XP_MAC
-
-static PRLibrary*
-pr_Mac_LoadNamedFragment(const FSSpec *fileSpec, const char* fragmentName)
-{
- PRLibrary* newLib = NULL;
- PRLibrary* result;
- FSSpec resolvedSpec = *fileSpec;
- CFragConnectionID connectionID = 0;
- Boolean isFolder, wasAlias;
- OSErr err = noErr;
-
- if (!_pr_initialized) _PR_ImplicitInitialization();
-
- /* See if library is already loaded */
- PR_EnterMonitor(pr_linker_lock);
-
- result = pr_UnlockedFindLibrary(fragmentName);
- if (result != NULL) goto unlock;
-
- newLib = PR_NEWZAP(PRLibrary);
- if (newLib == NULL) goto unlock;
- newLib->staticTable = NULL;
-
-
- /* Resolve an alias if this was one */
- err = ResolveAliasFile(&resolvedSpec, true, &isFolder, &wasAlias);
- if (err != noErr)
- goto unlock;
-
- if (isFolder)
- {
- err = fnfErr;
- goto unlock;
- }
-
- /* Finally, try to load the library */
- err = NSLoadNamedFragment(&resolvedSpec, fragmentName, &connectionID);
- if (err != noErr)
- goto unlock;
-
- newLib->name = strdup(fragmentName);
- newLib->connection = connectionID;
- newLib->next = pr_loadmap;
- pr_loadmap = newLib;
-
- result = newLib; /* success */
- PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Loaded library %s (load lib)", newLib->name));
-
-unlock:
- if (result == NULL) {
- if (newLib != NULL)
- PR_DELETE(newLib);
- PR_SetError(PR_LOAD_LIBRARY_ERROR, _MD_ERRNO());
- DLLErrorInternal(_MD_ERRNO()); /* sets error text */
- }
- PR_ExitMonitor(pr_linker_lock);
- return result;
-}
-
-
-static PRLibrary*
-pr_Mac_LoadIndexedFragment(const FSSpec *fileSpec, PRUint32 fragIndex)
-{
- PRLibrary* newLib = NULL;
- PRLibrary* result;
- FSSpec resolvedSpec = *fileSpec;
- char* fragmentName = NULL;
- UInt32 fragOffset, fragLength;
- CFragConnectionID connectionID = 0;
- Boolean isFolder, wasAlias;
- OSErr err = noErr;
-
- if (!_pr_initialized) _PR_ImplicitInitialization();
-
- /* See if library is already loaded */
- PR_EnterMonitor(pr_linker_lock);
-
- /* Resolve an alias if this was one */
- err = ResolveAliasFile(&resolvedSpec, true, &isFolder, &wasAlias);
- if (err != noErr)
- goto unlock;
-
- if (isFolder)
- {
- err = fnfErr;
- goto unlock;
- }
- err = GetIndexedFragmentOffsets(&resolvedSpec, fragIndex, &fragOffset, &fragLength, &fragmentName);
- if (err != noErr) goto unlock;
-
- result = pr_UnlockedFindLibrary(fragmentName);
- free(fragmentName);
- fragmentName = NULL;
- if (result != NULL) goto unlock;
-
- newLib = PR_NEWZAP(PRLibrary);
- if (newLib == NULL) goto unlock;
- newLib->staticTable = NULL;
-
- /* Finally, try to load the library */
- err = NSLoadIndexedFragment(&resolvedSpec, fragIndex, &fragmentName, &connectionID);
- if (err != noErr) {
- PR_DELETE(newLib);
- goto unlock;
- }
-
- newLib->name = fragmentName; /* was malloced in NSLoadIndexedFragment */
- newLib->connection = connectionID;
- newLib->next = pr_loadmap;
- pr_loadmap = newLib;
-
- result = newLib; /* success */
- PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Loaded library %s (load lib)", newLib->name));
-
-unlock:
- if (result == NULL) {
- if (newLib != NULL)
- PR_DELETE(newLib);
- PR_SetError(PR_LOAD_LIBRARY_ERROR, _MD_ERRNO());
- DLLErrorInternal(_MD_ERRNO()); /* sets error text */
- }
- PR_ExitMonitor(pr_linker_lock);
- return result;
-}
-
-
-#endif
-
/*
** Unload a shared library which was loaded via PR_LoadLibrary
*/
@@ -1344,20 +1049,16 @@ PR_UnloadLibrary(PRLibrary *lib)
}
#endif /* XP_PC */
-#if defined(XP_MAC) || defined(XP_MACOSX)
+#ifdef XP_MACOSX
/* Close the connection */
if (lib->connection)
CloseConnection(&(lib->connection));
-#if TARGET_CARBON
if (lib->bundle)
CFRelease(lib->bundle);
-#endif
-#if defined(XP_MACOSX)
if (lib->wrappers)
CFRelease(lib->wrappers);
/* No way to unload an image (lib->image) */
#endif
-#endif
/* unlink from library search list */
if (pr_loadmap == lib)
@@ -1447,13 +1148,9 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
f = GetProcAddress(lm->dlh, name);
#endif /* WIN32 || WIN16 */
-#if defined(XP_MAC) || defined(XP_MACOSX)
-#if defined(NEED_LEADING_UNDERSCORE)
+#ifdef XP_MACOSX
+/* add this offset to skip the leading underscore in name */
#define SYM_OFFSET 1
-#else
-#define SYM_OFFSET 0
-#endif
-#if TARGET_CARBON
if (lm->bundle) {
CFStringRef nameRef = CFStringCreateWithCString(NULL, name + SYM_OFFSET, kCFStringEncodingASCII);
if (nameRef) {
@@ -1461,7 +1158,6 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
CFRelease(nameRef);
}
}
-#endif
if (lm->connection) {
Ptr symAddr;
CFragSymbolClass symClass;
@@ -1469,24 +1165,17 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
PR_LOG(_pr_linker_lm, PR_LOG_MIN, ("Looking up symbol: %s", name + SYM_OFFSET));
- PStrFromCStr(name + SYM_OFFSET, pName);
+ c2pstrcpy(pName, name + SYM_OFFSET);
-#if defined(XP_MACOSX)
f = (FindSymbol(lm->connection, pName, &symAddr, &symClass) == noErr) ? symAddr : NULL;
-#else
- f = (NSFindSymbol(lm->connection, pName, &symAddr, &symClass) == noErr) ? symAddr : NULL;
-#endif
-#if defined(XP_MACOSX)
/* callers expect mach-o function pointers, so must wrap tvectors with glue. */
if (f && symClass == kTVectorCFragSymbol) {
f = TV2FP(lm->wrappers, name + SYM_OFFSET, f);
}
-#endif
if (f == NULL && strcmp(name + SYM_OFFSET, "main") == 0) f = lm->main;
}
-#if defined(XP_MACOSX)
if (lm->image) {
NSSymbol symbol;
symbol = NSLookupSymbolInImage(lm->image, name,
@@ -1497,9 +1186,8 @@ pr_FindSymbolInLib(PRLibrary *lm, const char *name)
else
f = NULL;
}
-#endif
#undef SYM_OFFSET
-#endif /* XP_MAC */
+#endif /* XP_MACOSX */
#ifdef XP_BEOS
if( B_NO_ERROR != get_image_symbol( (image_id)lm->dlh, name, B_SYMBOL_TYPE_TEXT, &f ) ) {
@@ -1670,11 +1358,7 @@ PR_LoadStaticLibrary(const char *name, const PRStaticLinkTable *slt)
lm->name = strdup(name);
lm->refCount = 1;
-#if defined(XP_MAC)
- lm->connection = pr_exe_loadmap ? pr_exe_loadmap->connection : 0;
-#else
lm->dlh = pr_exe_loadmap ? pr_exe_loadmap->dlh : 0;
-#endif
lm->staticTable = slt;
lm->next = pr_loadmap;
pr_loadmap = lm;
diff --git a/pr/src/malloc/prmem.c b/pr/src/malloc/prmem.c
index 59077c24..73fa59bc 100644
--- a/pr/src/malloc/prmem.c
+++ b/pr/src/malloc/prmem.c
@@ -115,6 +115,8 @@ _PR_DestroyZones(void)
** its address.
*/
+#ifdef HAVE_DLL
+
#ifdef USE_DLFCN
#include <dlfcn.h>
@@ -163,6 +165,17 @@ pr_FindSymbolInProg(const char *name)
#endif
+#else /* !defined(HAVE_DLL) */
+
+static void *
+pr_FindSymbolInProg(const char *name)
+{
+ /* can't be implemented */
+ return NULL;
+}
+
+#endif /* HAVE_DLL */
+
void
_PR_InitZones(void)
{
diff --git a/pr/src/md/unix/riscos.c b/pr/src/md/unix/riscos.c
new file mode 100644
index 00000000..eee94d3d
--- /dev/null
+++ b/pr/src/md/unix/riscos.c
@@ -0,0 +1,120 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Netscape Portable Runtime (NSPR).
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Peter Naulls <peter@chocky.org>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
+
+#include "primpl.h"
+
+void _MD_EarlyInit(void)
+{
+}
+
+PRWord *_MD_HomeGCRegisters(PRThread *t, int isCurrent, int *np)
+{
+#ifndef _PR_PTHREADS
+ if (isCurrent) {
+ (void) setjmp(CONTEXT(t));
+ }
+ *np = sizeof(CONTEXT(t)) / sizeof(PRWord);
+ return (PRWord *) CONTEXT(t);
+#else
+ *np = 0;
+ return NULL;
+#endif
+}
+
+#ifdef _PR_PTHREADS
+
+void _MD_CleanupBeforeExit(void)
+{
+}
+
+#else /* ! _PR_PTHREADS */
+
+void
+_MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri)
+{
+ return;
+}
+
+PRStatus
+_MD_InitializeThread(PRThread *thread)
+{
+ /*
+ * set the pointers to the stack-pointer and frame-pointer words in the
+ * context structure; this is for debugging use.
+ */
+ thread->md.sp = _MD_GET_SP_PTR(thread);
+ thread->md.fp = _MD_GET_FP_PTR(thread);
+ return PR_SUCCESS;
+}
+
+PRStatus
+_MD_WAIT(PRThread *thread, PRIntervalTime ticks)
+{
+ PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
+ _PR_MD_SWITCH_CONTEXT(thread);
+ return PR_SUCCESS;
+}
+
+PRStatus
+_MD_WAKEUP_WAITER(PRThread *thread)
+{
+ if (thread) {
+ PR_ASSERT(!(thread->flags & _PR_GLOBAL_SCOPE));
+ }
+ return PR_SUCCESS;
+}
+
+/* These functions should not be called for RISC OS */
+void
+_MD_YIELD(void)
+{
+ PR_NOT_REACHED("_MD_YIELD should not be called for RISC OS.");
+}
+
+PRStatus
+_MD_CREATE_THREAD(
+ PRThread *thread,
+ void (*start) (void *),
+ PRThreadPriority priority,
+ PRThreadScope scope,
+ PRThreadState state,
+ PRUint32 stackSize)
+{
+ PR_NOT_REACHED("_MD_CREATE_THREAD should not be called for RISC OS.");
+ return PR_FAILURE;
+}
+#endif /* ! _PR_PTHREADS */
diff --git a/pr/src/md/unix/unix.c b/pr/src/md/unix/unix.c
index eb73f053..0776bf1a 100644
--- a/pr/src/md/unix/unix.c
+++ b/pr/src/md/unix/unix.c
@@ -75,7 +75,7 @@
#define _PRSockLen_t int
#elif (defined(AIX) && !defined(AIX4_1)) || defined(FREEBSD) \
|| defined(NETBSD) || defined(OPENBSD) || defined(UNIXWARE) \
- || defined(DGUX) || defined(VMS) || defined(NTO)
+ || defined(DGUX) || defined(VMS) || defined(NTO) || defined(RISCOS)
#define _PRSockLen_t size_t
#else
#error "Cannot determine architecture"
diff --git a/pr/src/md/unix/uxrng.c b/pr/src/md/unix/uxrng.c
index 9099c5ff..9e912277 100644
--- a/pr/src/md/unix/uxrng.c
+++ b/pr/src/md/unix/uxrng.c
@@ -298,7 +298,7 @@ GetHighResClock(void *buf, size_t maxbytes)
return 0;
}
#elif defined(SCO) || defined(UNIXWARE) || defined(BSDI) || defined(NTO) \
- || defined(QNX) || defined(DARWIN)
+ || defined(QNX) || defined(DARWIN) || defined(RISCOS)
#include <sys/times.h>
static size_t
diff --git a/pr/src/misc/prdtoa.c b/pr/src/misc/prdtoa.c
index 3f06feaf..b7432a2f 100644
--- a/pr/src/misc/prdtoa.c
+++ b/pr/src/misc/prdtoa.c
@@ -328,10 +328,11 @@ static double private_mem[PRIVATE_mem], *pmem_next = private_mem;
* to allow 10.2 builds to run on 10.1, since we can't use fesetround()
* (which does not exist on 10.1 either).
*/
-#if defined(MACOS_DEPLOYMENT_TARGET) && (MACOS_DEPLOYMENT_TARGET < 100200)
+#if defined(XP_MACOSX) && (!defined(MAC_OS_X_VERSION_10_2) || \
+ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2)
#undef FLT_ROUNDS
#define FLT_ROUNDS 1
-#endif
+#endif /* DT < 10.2 */
#endif /* Bad_float_h */
#ifndef __MATH_H__
diff --git a/pr/src/misc/prnetdb.c b/pr/src/misc/prnetdb.c
index edccde85..63b21070 100644
--- a/pr/src/misc/prnetdb.c
+++ b/pr/src/misc/prnetdb.c
@@ -188,8 +188,8 @@ static PRBool _pr_have_inet6_if = PR_FALSE;
#if defined(AIX) \
|| (defined(DARWIN) && (!defined(HAVE_GETIFADDRS) \
- || (defined(MACOS_DEPLOYMENT_TARGET) \
- && MACOS_DEPLOYMENT_TARGET < 100200)))
+ || (defined(XP_MACOSX) && (!defined(MAC_OS_X_VERSION_10_2) || \
+ MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_2))))
/*
* Use SIOCGIFCONF ioctl on platforms that don't have routing
diff --git a/pr/src/misc/prsystem.c b/pr/src/misc/prsystem.c
index d0775d34..f931e3af 100644
--- a/pr/src/misc/prsystem.c
+++ b/pr/src/misc/prsystem.c
@@ -255,6 +255,8 @@ PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void )
}
#elif defined(IRIX)
numCpus = sysconf( _SC_NPROC_ONLN );
+#elif defined(RISCOS)
+ numCpus = 1;
#elif defined(XP_UNIX)
numCpus = sysconf( _SC_NPROCESSORS_ONLN );
#else
diff --git a/pr/src/pthreads/ptio.c b/pr/src/pthreads/ptio.c
index 1479846d..7a4ce96f 100644
--- a/pr/src/pthreads/ptio.c
+++ b/pr/src/pthreads/ptio.c
@@ -199,17 +199,6 @@ static ssize_t (*pt_aix_sendfile_fptr)() = NULL;
static PRBool _pr_ipv6_v6only_on_by_default;
#endif
-#if defined(SOLARIS)
-#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(UNIXWARE) || defined(NETBSD)
-#define _PRSockOptVal_t void *
-#else
-#error "Cannot determine architecture"
-#endif
-
#if (defined(HPUX) && !defined(HPUX10_30) && !defined(HPUX11))
#define _PRSelectFdSetArg_t int *
#elif defined(AIX4_1)
@@ -219,7 +208,7 @@ static PRBool _pr_ipv6_v6only_on_by_default;
|| defined(HPUX10_30) || defined(HPUX11) || defined(LINUX) \
|| defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
|| defined(BSDI) || defined(VMS) || defined(NTO) || defined(DARWIN) \
- || defined(UNIXWARE)
+ || defined(UNIXWARE) || defined(RISCOS)
#define _PRSelectFdSetArg_t fd_set *
#else
#error "Cannot determine architecture"
@@ -3243,7 +3232,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(UNIXWARE)
+ || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS)
#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 4cd70dcc..c8b41c11 100644
--- a/pr/src/pthreads/ptthread.c
+++ b/pr/src/pthreads/ptthread.c
@@ -248,11 +248,11 @@ static void *_pt_root(void *arg)
/*
* Here we set the pthread's backpointer to the PRThread to NULL.
- * Otherwise the desctructor would get called eagerly as the thread
+ * Otherwise the destructor would get called eagerly as the thread
* returns to the pthread runtime. The joining thread would them be
* the proud possessor of a dangling reference. However, this is the
* last chance to delete the object if the thread is detached, so
- * just let the destuctor do the work.
+ * just let the destructor do the work.
*/
if (PR_FALSE == detached)
{
@@ -1233,7 +1233,8 @@ static void suspend_signal_handler(PRIntn sig)
while (me->suspend & PT_THREAD_SUSPENDED)
{
#if !defined(FREEBSD) && !defined(NETBSD) && !defined(OPENBSD) \
- && !defined(BSDI) && !defined(VMS) && !defined(UNIXWARE) && !defined(DARWIN) /*XXX*/
+ && !defined(BSDI) && !defined(VMS) && !defined(UNIXWARE) \
+ && !defined(DARWIN) && !defined(RISCOS) /*XXX*/
PRIntn rv;
sigwait(&sigwait_set, &rv);
#endif
diff --git a/pr/tests/server_test.c b/pr/tests/server_test.c
index ffe37a5e..8bb6d99b 100644
--- a/pr/tests/server_test.c
+++ b/pr/tests/server_test.c
@@ -230,9 +230,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
- if (!WorkerThread)
+ if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
- else {
+ } else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@@ -259,11 +259,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
- if (bytesWritten != _server_data)
+ if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
- else
+ } else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
+ }
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);
diff --git a/pr/tests/servr_kk.c b/pr/tests/servr_kk.c
index a8fdf1df..9fbb9b00 100644
--- a/pr/tests/servr_kk.c
+++ b/pr/tests/servr_kk.c
@@ -196,9 +196,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
- if (!WorkerThread)
+ if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
- else {
+ } else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@@ -225,11 +225,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
- if (bytesWritten != _server_data)
+ if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
- else
+ } else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
+ }
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);
diff --git a/pr/tests/servr_ku.c b/pr/tests/servr_ku.c
index fa0a168e..ab2083d0 100644
--- a/pr/tests/servr_ku.c
+++ b/pr/tests/servr_ku.c
@@ -197,9 +197,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
- if (!WorkerThread)
+ if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
- else {
+ } else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@@ -226,11 +226,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
- if (bytesWritten != _server_data)
+ if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
- else
+ } else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
+ }
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);
diff --git a/pr/tests/servr_uk.c b/pr/tests/servr_uk.c
index 139081af..727b7b47 100644
--- a/pr/tests/servr_uk.c
+++ b/pr/tests/servr_uk.c
@@ -199,9 +199,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
- if (!WorkerThread)
+ if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
- else {
+ } else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@@ -228,11 +228,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
- if (bytesWritten != _server_data)
+ if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
- else
+ } else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
+ }
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);
diff --git a/pr/tests/servr_uu.c b/pr/tests/servr_uu.c
index 3bd1d574..020fadf6 100644
--- a/pr/tests/servr_uu.c
+++ b/pr/tests/servr_uu.c
@@ -197,9 +197,9 @@ WorkerThreadFunc(void *_listenSock)
PR_UNJOINABLE_THREAD,
THREAD_STACKSIZE);
- if (!WorkerThread)
+ if (!WorkerThread) {
if (debug_mode) printf("Error creating client thread %d\n", workerThreads);
- else {
+ } else {
PR_AtomicIncrement(&workerThreads);
if (debug_mode) DPRINTF("\tServer creates worker (%d)\n", workerThreads);
}
@@ -226,11 +226,12 @@ WorkerThreadFunc(void *_listenSock)
bytesToWrite,
0,
PR_INTERVAL_NO_TIMEOUT);
- if (bytesWritten != _server_data)
+ if (bytesWritten != _server_data) {
if (debug_mode) printf("\tError sending data to client (%d, %d)\n",
bytesWritten, PR_GetOSError());
- else
+ } else {
if (debug_mode) DPRINTF("\tServer sent %d bytes\n", bytesWritten);
+ }
PR_Close(newSock);
PR_AtomicDecrement(&workerThreadsBusy);
diff --git a/pr/tests/vercheck.c b/pr/tests/vercheck.c
index d1fdb96e..5174c0b3 100644
--- a/pr/tests/vercheck.c
+++ b/pr/tests/vercheck.c
@@ -52,14 +52,14 @@
#include <stdlib.h>
/*
- * This release (4.6) is backward compatible with the
- * 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, and 4.5.x releases. It, of course,
- * is compatible with itself.
+ * This release (4.6.1) is backward compatible with the
+ * 4.0.x, 4.1.x, 4.2.x, 4.3.x, 4.4.x, 4.5.x, and 4.6 releases.
+ * It, of course, is compatible with itself.
*/
static char *compatible_version[] = {
"4.0", "4.0.1", "4.1", "4.1.1", "4.1.2", "4.1.3",
"4.2", "4.2.1", "4.2.2", "4.3", "4.4", "4.4.1",
- "4.5", "4.5.1", PR_VERSION
+ "4.5", "4.5.1", "4.6", PR_VERSION
};
/*