Bug 86396: update NSPR to NSPR_4_8_BETA1.
authorWan-Teh Chang <wtc@google.com>
Fri, 08 May 2009 06:46:38 -0700
changeset 28127 515054a2dc431c86f588eb676aec1597be81805b
parent 28126 ab664753cc722d7fef0c741899246e801f8531a1
child 28128 c7b717f0a4043d0da5c44ffd344a80da89af908a
child 28129 4ced8b10e38bca82e6dfe1aa94561dc1fc5bdae2
push id6902
push userwtc@google.com
push dateFri, 08 May 2009 13:45:58 +0000
treeherdermozilla-central@515054a2dc43 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs86396, 491045, 476996, 485318, 485374, 427136
milestone1.9.2a1pre
Bug 86396: update NSPR to NSPR_4_8_BETA1. Also fix Bug 491045, bug 476996, bug 485318, bug 485374, bug 427136.
nsprpub/build/autoconf/config.guess
nsprpub/config/now.c
nsprpub/config/nsinstall.c
nsprpub/config/rules.mk
nsprpub/configure
nsprpub/configure.in
nsprpub/lib/ds/plarena.c
nsprpub/lib/ds/plds_symvec.opt
nsprpub/lib/ds/plhash.c
nsprpub/lib/libc/src/plc_symvec.opt
nsprpub/lib/msgc/src/macgc.c
nsprpub/lib/msgc/src/prgcapi.c
nsprpub/lib/msgc/src/prmsgc.c
nsprpub/lib/msgc/tests/gc1.c
nsprpub/lib/msgc/tests/thrashgc.c
nsprpub/lib/prstreams/prstrms.cpp
nsprpub/pr/include/md/Makefile.in
nsprpub/pr/include/md/_linux.cfg
nsprpub/pr/include/md/_linux.h
nsprpub/pr/include/md/_openvms.cfg
nsprpub/pr/include/md/_openvms.h
nsprpub/pr/include/md/_pth.h
nsprpub/pr/include/md/_unixos.h
nsprpub/pr/include/md/prosdep.h
nsprpub/pr/include/obsolete/probslet.h
nsprpub/pr/include/obsolete/protypes.h
nsprpub/pr/include/prenv.h
nsprpub/pr/include/prinet.h
nsprpub/pr/include/prinit.h
nsprpub/pr/include/private/pprio.h
nsprpub/pr/include/private/pprthred.h
nsprpub/pr/include/private/primpl.h
nsprpub/pr/include/private/prpriv.h
nsprpub/pr/include/prlink.h
nsprpub/pr/include/prtypes.h
nsprpub/pr/src/io/prfile.c
nsprpub/pr/src/io/prio.c
nsprpub/pr/src/io/prlog.c
nsprpub/pr/src/io/prmapopt.c
nsprpub/pr/src/io/prmwait.c
nsprpub/pr/src/io/prpolevt.c
nsprpub/pr/src/io/prsocket.c
nsprpub/pr/src/linking/prlink.c
nsprpub/pr/src/md/prosdep.c
nsprpub/pr/src/md/unix/openvms.c
nsprpub/pr/src/md/unix/uxproces.c
nsprpub/pr/src/md/unix/uxrng.c
nsprpub/pr/src/md/windows/ntsec.c
nsprpub/pr/src/misc/pralarm.c
nsprpub/pr/src/misc/prenv.c
nsprpub/pr/src/misc/prinit.c
nsprpub/pr/src/misc/prnetdb.c
nsprpub/pr/src/misc/prolock.c
nsprpub/pr/src/misc/prsystem.c
nsprpub/pr/src/misc/prthinfo.c
nsprpub/pr/src/misc/prtime.c
nsprpub/pr/src/nspr_symvec.opt
nsprpub/pr/src/prvrsion.c
nsprpub/pr/src/pthreads/ptio.c
nsprpub/pr/src/pthreads/ptthread.c
nsprpub/pr/src/threads/combined/prucpu.c
nsprpub/pr/src/threads/combined/prucv.c
nsprpub/pr/src/threads/combined/prulock.c
nsprpub/pr/src/threads/combined/pruthr.c
nsprpub/pr/src/threads/prcthr.c
nsprpub/pr/src/threads/prsem.c
nsprpub/pr/tests/Makefile.in
nsprpub/pr/tests/accept.c
nsprpub/pr/tests/alarm.c
nsprpub/pr/tests/cltsrv.c
nsprpub/pr/tests/concur.c
nsprpub/pr/tests/cvar.c
nsprpub/pr/tests/cvar2.c
nsprpub/pr/tests/fileio.c
nsprpub/pr/tests/inrval.c
nsprpub/pr/tests/intrio.c
nsprpub/pr/tests/intrupt.c
nsprpub/pr/tests/io_timeout.c
nsprpub/pr/tests/join.c
nsprpub/pr/tests/joinkk.c
nsprpub/pr/tests/joinku.c
nsprpub/pr/tests/joinuk.c
nsprpub/pr/tests/joinuu.c
nsprpub/pr/tests/lock.c
nsprpub/pr/tests/lockfile.c
nsprpub/pr/tests/logger.c
nsprpub/pr/tests/nbconn.c
nsprpub/pr/tests/nonblock.c
nsprpub/pr/tests/op_2long.c
nsprpub/pr/tests/op_filnf.c
nsprpub/pr/tests/op_filok.c
nsprpub/pr/tests/op_noacc.c
nsprpub/pr/tests/op_nofil.c
nsprpub/pr/tests/perf.c
nsprpub/pr/tests/poll_er.c
nsprpub/pr/tests/poll_nm.c
nsprpub/pr/tests/poll_to.c
nsprpub/pr/tests/priotest.c
nsprpub/pr/tests/provider.c
nsprpub/pr/tests/prpoll.c
nsprpub/pr/tests/ranfile.c
nsprpub/pr/tests/reinit.c
nsprpub/pr/tests/runtests.pl
nsprpub/pr/tests/runtests.sh
nsprpub/pr/tests/sel_spd.c
nsprpub/pr/tests/selct_er.c
nsprpub/pr/tests/selct_nm.c
nsprpub/pr/tests/selct_to.c
nsprpub/pr/tests/sem.c
nsprpub/pr/tests/socket.c
nsprpub/pr/tests/sockopt.c
nsprpub/pr/tests/suspend.c
nsprpub/pr/tests/switch.c
nsprpub/pr/tests/testfile.c
nsprpub/pr/tests/threads.c
nsprpub/pr/tests/thrpool_client.c
nsprpub/pr/tests/thrpool_server.c
nsprpub/pr/tests/timemac.c
nsprpub/pr/tests/timetest.c
nsprpub/pr/tests/tmoacc.c
nsprpub/pr/tests/tmocon.c
nsprpub/pr/tests/tpd.c
nsprpub/pr/tests/udpsrv.c
nsprpub/pr/tests/writev.c
nsprpub/pr/tests/y2k.c
--- a/nsprpub/build/autoconf/config.guess
+++ b/nsprpub/build/autoconf/config.guess
@@ -1129,26 +1129,16 @@ EOF
 	else
 		echo ns32k-sni-sysv
 	fi
 	exit ;;
     PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
                       # says <Richard.M.Bartel@ccMail.Census.GOV>
         echo i586-unisys-sysv4
         exit ;;
-#### MozillaHack 
-    *:*OpenVMS*:*:*)
-        case "${UNAME_SYSTEM}" in
-            POSIX_for_OpenVMS_AXP) echo alpha-dec-openvmsposix ;;
-            POSIX_for_OpenVMS_VAX) echo vax-dec-openvmsposix ;;
-            OpenVMS) echo alpha-dec-openvms ;;
-            *) echo unknown-dec-openvms ;;
-        esac
-        exit ;;
-#### End MozillaHack 
     *:UNIX_System_V:4*:FTX*)
 	# From Gerald Hewes <hewes@openmarket.com>.
 	# How about differentiating between stratus architectures? -djm
 	echo hppa1.1-stratus-sysv4
 	exit ;;
     *:*:*:FTX*)
 	# From seanf@swdc.stratus.com.
 	echo i860-stratus-sysv4
--- a/nsprpub/config/now.c
+++ b/nsprpub/config/now.c
@@ -33,19 +33,17 @@
  * 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 <stdio.h>
 #include <stdlib.h>
 
-#if defined(VMS)
-#include <sys/timeb.h>
-#elif defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
 #include <sys/time.h>
 #elif defined(_WIN32)
 #include <windows.h>
 #else
 #error "Architecture not supported"
 #endif
 
 
@@ -57,24 +55,16 @@ int main(int argc, char **argv)
      * such as 'long long'.  Because we can't use NSPR's
      * PR_snprintf in this program, it is difficult to
      * print a static initializer for PRInt64 (a struct).
      * So we print nothing.  The makefiles that build the
      * shared libraries will detect the empty output string
      * of this program and omit the library build time
      * in PRVersionDescription.
      */
-#elif defined(VMS)
-    long long now;
-    struct timeb b;
-    ftime(&b);
-    now = b.time;
-    now *= 1000000;
-    now += (1000 * b.millitm);
-    fprintf(stdout, "%Ld", now);
 #elif defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
     long long now;
     struct timeval tv;
 #ifdef HAVE_SVID_GETTOD
     gettimeofday(&tv);
 #else
     gettimeofday(&tv, NULL);
 #endif
--- a/nsprpub/config/nsinstall.c
+++ b/nsprpub/config/nsinstall.c
@@ -65,17 +65,17 @@
 #if defined(BEOS)
 #undef HAVE_FCHMOD
 #endif
 
 /*
  * Does getcwd() take NULL as the first argument and malloc
  * the result buffer?
  */
-#if !defined(DARWIN) && !defined(NEXTSTEP) && !defined(VMS)
+#if !defined(DARWIN) && !defined(NEXTSTEP)
 #define GETCWD_CAN_MALLOC
 #endif
 
 #ifdef NEXTSTEP
 #include <bsd/libc.h>
 
 /*
 ** balazs.pataki@sztaki.hu: The getcwd is broken in NEXTSTEP (returns 0),
--- a/nsprpub/config/rules.mk
+++ b/nsprpub/config/rules.mk
@@ -163,25 +163,16 @@ ifndef OBJS
 OBJS		= $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
 		  $(addprefix $(OBJDIR)/,$(ASFILES:.$(ASM_SUFFIX)=.$(OBJ_SUFFIX)))
 endif
 
 ALL_TRASH		= $(TARGETS) $(OBJS) $(RES) $(filter-out . .., $(OBJDIR)) LOGS TAGS $(GARBAGE) \
 			  $(NOSUCHFILE) \
 			  so_locations
 
-ifeq ($(OS_ARCH),OpenVMS)
-ALL_TRASH		+= $(wildcard *.c*_defines)
-ifdef SHARED_LIBRARY
-VMS_SYMVEC_FILE		= $(SHARED_LIBRARY:.$(DLL_SUFFIX)=_symvec.opt)
-VMS_SYMVEC_FILE_MODULE	= $(srcdir)/$(LIBRARY_NAME)_symvec.opt
-ALL_TRASH		+= $(VMS_SYMVEC_FILE)
-endif
-endif
-
 ifndef RELEASE_LIBS_DEST
 RELEASE_LIBS_DEST	= $(RELEASE_LIB_DIR)
 endif
 
 ifdef DIRS
 LOOP_OVER_DIRS		=					\
 	@for d in $(DIRS); do					\
 		if test -d $$d; then				\
@@ -340,24 +331,16 @@ ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
 	$(LINK_DLL) -MAP $(DLLBASE) $(DLL_LIBS) $(EXTRA_LIBS) $(OBJS) $(RES)
 ifdef MT
 	@if test -f $@.manifest; then \
 		$(MT) -NOLOGO -MANIFEST $@.manifest -OUTPUTRESOURCE:$@\;2; \
 		rm -f $@.manifest; \
 	fi
 endif	# MSVC with manifest tool
 else	# WINNT && !GCC
-ifeq ($(OS_TARGET), OpenVMS)
-	@if test ! -f $(VMS_SYMVEC_FILE); then \
-	  if test -f $(VMS_SYMVEC_FILE_MODULE); then \
-	    echo Creating component options file $(VMS_SYMVEC_FILE); \
-	    cp $(VMS_SYMVEC_FILE_MODULE) $(VMS_SYMVEC_FILE); \
-	  fi; \
-	fi
-endif	# OpenVMS
 	$(MKSHLIB) $(OBJS) $(RES) $(LDFLAGS) $(EXTRA_LIBS)
 endif	# WINNT && !GCC
 endif	# AIX 4.1
 ifdef ENABLE_STRIP
 	$(STRIP) $@
 endif
 
 ifeq ($(OS_ARCH),WINNT)
--- a/nsprpub/configure
+++ b/nsprpub/configure
@@ -1007,20 +1007,16 @@ if test -z "$CC"; then
     *-hpux*)
         CC=cc
     ;;
 
     *-irix*)
         CC=cc
     ;;
 
-    *-openvms*)
-        CC=cc
-    ;;
-
     *-osf*)
         CC=cc
     ;;
 
     *-solaris*)
         CC=cc
     ;;
 
@@ -1051,36 +1047,32 @@ if test -z "$CXX"; then
             ;;
         esac
     ;;
 
     *-irix*)
         CXX=CC
     ;;
 
-    *-openvms*)
-        CXX=cxx
-    ;;
-
     *-osf*)
         CXX=cxx
     ;;
 
     *-solaris*)
         CXX=CC
     ;;
 
     esac
 fi
 
 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:1079: checking for $ac_word" >&5
+echo "configure:1071: 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
   case "$WHOAMI" in
   /*)
   ac_cv_path_WHOAMI="$WHOAMI" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -1141,23 +1133,23 @@ if test "$target" != "$host"; then
     echo "cross compiling from $host to $target"
     cross_compiling=yes
 
     _SAVE_CC="$CC"
     _SAVE_CFLAGS="$CFLAGS"
     _SAVE_LDFLAGS="$LDFLAGS"
 
     echo $ac_n "checking for $host compiler""... $ac_c" 1>&6
-echo "configure:1150: checking for $host compiler" >&5
+echo "configure:1142: 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:1156: checking for $ac_word" >&5
+echo "configure:1148: 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
   if test -n "$HOST_CC"; then
   ac_cv_prog_HOST_CC="$HOST_CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1193,26 +1185,26 @@ test -n "$HOST_CC" || HOST_CC=""""
         HOST_LDFLAGS="$LDFLAGS"
     fi
 
     CC="$HOST_CC"
     CFLAGS="$HOST_CFLAGS"
     LDFLAGS="$HOST_LDFLAGS"
 
     echo $ac_n "checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1202: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
+echo "configure:1194: checking whether the $host compiler ($HOST_CC $HOST_CFLAGS $HOST_LDFLAGS) works" >&5
     cat > conftest.$ac_ext <<EOF
-#line 1204 "configure"
+#line 1196 "configure"
 #include "confdefs.h"
 
 int main() {
 return(0);
 ; return 0; }
 EOF
-if { (eval echo configure:1211: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1203: \"$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
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   { echo "configure: error: installation or configuration problem: $host compiler $HOST_CC cannot create executables." 1>&2; exit 1; } 
 fi
@@ -1231,17 +1223,17 @@ rm -f conftest*
         ;;        
     esac            
 
     for ac_prog in $CC "${target_alias}-gcc" "${target}-gcc"
 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:1240: checking for $ac_word" >&5
+echo "configure:1232: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1265,17 +1257,17 @@ fi
 test -n "$CC" && break
 done
 test -n "$CC" || CC="echo"
 
     unset ac_cv_prog_CC
     # 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:1274: checking for $ac_word" >&5
+echo "configure:1266: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1295,17 +1287,17 @@ if test -n "$CC"; then
 else
   echo "$ac_t""no" 1>&6
 fi
 
 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:1304: checking for $ac_word" >&5
+echo "configure:1296: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
@@ -1346,17 +1338,17 @@ else
 fi
 
   if test -z "$CC"; then
     case "`uname -s`" in
     *win32* | *WIN32*)
       # 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:1355: checking for $ac_word" >&5
+echo "configure:1347: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1378,33 +1370,33 @@ else
 fi
  ;;
     esac
   fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1387: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:1379: 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.
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1398 "configure"
+#line 1390 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:1403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1395: \"$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
     ac_cv_prog_cc_cross=no
   else
     ac_cv_prog_cc_cross=yes
   fi
 else
@@ -1420,31 +1412,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 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:1429: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1421: 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:1434: checking whether we are using GNU C" >&5
+echo "configure:1426: 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
   cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1443: \"$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:1435: \"$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
 fi
 fi
 
 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
@@ -1453,17 +1445,17 @@ if test $ac_cv_prog_gcc = yes; then
 else
   GCC=
 fi
 
 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:1462: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:1454: 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
   echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
   ac_cv_prog_cc_g=yes
 else
   ac_cv_prog_cc_g=no
@@ -1490,17 +1482,17 @@ else
 fi
 
     if test -n "$USE_CPLUS"; then
         for ac_prog in $CXX "${target_alias}-g++" "${target}-g++"
 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:1499: checking for $ac_word" >&5
+echo "configure:1491: 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
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1526,17 +1518,17 @@ done
 test -n "$CXX" || CXX="echo"
 
         unset ac_cv_prog_CXX
         for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
 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:1535: checking for $ac_word" >&5
+echo "configure:1527: 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
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1558,33 +1550,33 @@ else
 fi
 
 test -n "$CXX" && break
 done
 test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:1567: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:1559: 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.
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 1578 "configure"
+#line 1570 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:1583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:1575: \"$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
     ac_cv_prog_cxx_cross=no
   else
     ac_cv_prog_cxx_cross=yes
   fi
 else
@@ -1600,31 +1592,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
 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:1609: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:1601: 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:1614: checking whether we are using GNU C++" >&5
+echo "configure:1606: 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
   cat > conftest.C <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:1623: \"$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:1615: \"$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
 fi
 fi
 
 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
 
@@ -1633,17 +1625,17 @@ if test $ac_cv_prog_gxx = yes; then
 else
   GXX=
 fi
 
 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:1642: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:1634: 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
   echo 'void f(){}' > conftest.cc
 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
   ac_cv_prog_cxx_g=yes
 else
   ac_cv_prog_cxx_g=no
@@ -1678,17 +1670,17 @@ fi
         ;;
     esac
 
     for ac_prog in $RANLIB "${target_alias}-ranlib" "${target}-ranlib"
 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:1687: checking for $ac_word" >&5
+echo "configure:1679: 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
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1713,17 +1705,17 @@ test -n "$RANLIB" && break
 done
 test -n "$RANLIB" || RANLIB="echo"
 
     for ac_prog in $AR "${target_alias}-ar" "${target}-ar"
 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:1722: checking for $ac_word" >&5
+echo "configure:1714: 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
   if test -n "$AR"; then
   ac_cv_prog_AR="$AR" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1748,17 +1740,17 @@ test -n "$AR" && break
 done
 test -n "$AR" || AR="echo"
 
     for ac_prog in $AS "${target_alias}-as" "${target}-as"
 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:1757: checking for $ac_word" >&5
+echo "configure:1749: 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
   if test -n "$AS"; then
   ac_cv_prog_AS="$AS" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1783,17 +1775,17 @@ test -n "$AS" && break
 done
 test -n "$AS" || AS="echo"
 
     for ac_prog in $LD "${target_alias}-ld" "${target}-ld"
 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:1792: checking for $ac_word" >&5
+echo "configure:1784: 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
   if test -n "$LD"; then
   ac_cv_prog_LD="$LD" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1818,17 +1810,17 @@ test -n "$LD" && break
 done
 test -n "$LD" || LD="echo"
 
     for ac_prog in $STRIP "${target_alias}-strip" "${target}-strip"
 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:1827: checking for $ac_word" >&5
+echo "configure:1819: 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
   if test -n "$STRIP"; then
   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1853,17 +1845,17 @@ test -n "$STRIP" && break
 done
 test -n "$STRIP" || STRIP="echo"
 
     for ac_prog in $WINDRES "${target_alias}-windres" "${target}-windres"
 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:1862: checking for $ac_word" >&5
+echo "configure:1854: 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
   if test -n "$WINDRES"; then
   ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1888,17 +1880,17 @@ test -n "$WINDRES" && break
 done
 test -n "$WINDRES" || WINDRES="echo"
 
 
 else
     # 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:1897: checking for $ac_word" >&5
+echo "configure:1889: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -1918,17 +1910,17 @@ if test -n "$CC"; then
 else
   echo "$ac_t""no" 1>&6
 fi
 
 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:1927: checking for $ac_word" >&5
+echo "configure:1919: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_prog_rejected=no
@@ -1969,17 +1961,17 @@ else
 fi
 
   if test -z "$CC"; then
     case "`uname -s`" in
     *win32* | *WIN32*)
       # 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:1978: checking for $ac_word" >&5
+echo "configure:1970: 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
   if test -n "$CC"; then
   ac_cv_prog_CC="$CC" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -2001,33 +1993,33 @@ else
 fi
  ;;
     esac
   fi
   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
 fi
 
 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2010: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:2002: 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.
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 2021 "configure"
+#line 2013 "configure"
 #include "confdefs.h"
 
 main(){return(0);}
 EOF
-if { (eval echo configure:2026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2018: \"$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
     ac_cv_prog_cc_cross=no
   else
     ac_cv_prog_cc_cross=yes
   fi
 else
@@ -2043,31 +2035,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
 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:2052: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2044: 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:2057: checking whether we are using GNU C" >&5
+echo "configure:2049: 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
   cat > conftest.c <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:2066: \"$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:2058: \"$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
 fi
 fi
 
 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
 
@@ -2076,17 +2068,17 @@ if test $ac_cv_prog_gcc = yes; then
 else
   GCC=
 fi
 
 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:2085: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:2077: 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
   echo 'void f(){}' > conftest.c
 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
   ac_cv_prog_cc_g=yes
 else
   ac_cv_prog_cc_g=no
@@ -2116,17 +2108,17 @@ fi
         if test "$CC" = "cl" -a -z "$CXX"; then
             CXX=$CC
         else        
             for ac_prog in $CCC c++ g++ gcc CC cxx cc++ cl
 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:2125: checking for $ac_word" >&5
+echo "configure:2117: 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
   if test -n "$CXX"; then
   ac_cv_prog_CXX="$CXX" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -2148,33 +2140,33 @@ else
 fi
 
 test -n "$CXX" && break
 done
 test -n "$CXX" || CXX="gcc"
 
 
 echo $ac_n "checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:2157: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) works" >&5
+echo "configure:2149: 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.
 ac_cpp='$CXXCPP $CPPFLAGS'
 ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
 ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cxx_cross
 
 cat > conftest.$ac_ext << EOF
 
-#line 2168 "configure"
+#line 2160 "configure"
 #include "confdefs.h"
 
 int main(){return(0);}
 EOF
-if { (eval echo configure:2173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:2165: \"$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
     ac_cv_prog_cxx_cross=no
   else
     ac_cv_prog_cxx_cross=yes
   fi
 else
@@ -2190,31 +2182,31 @@ ac_compile='${CC-cc} -c $CFLAGS $CPPFLAG
 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
 cross_compiling=$ac_cv_prog_cc_cross
 
 echo "$ac_t""$ac_cv_prog_cxx_works" 1>&6
 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:2199: checking whether the C++ compiler ($CXX $CXXFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:2191: 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:2204: checking whether we are using GNU C++" >&5
+echo "configure:2196: 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
   cat > conftest.C <<EOF
 #ifdef __GNUC__
   yes;
 #endif
 EOF
-if { ac_try='${CXX-g++} -E conftest.C'; { (eval echo configure:2213: \"$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:2205: \"$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
 fi
 fi
 
 echo "$ac_t""$ac_cv_prog_gxx" 1>&6
 
@@ -2223,17 +2215,17 @@ if test $ac_cv_prog_gxx = yes; then
 else
   GXX=
 fi
 
 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:2232: checking whether ${CXX-g++} accepts -g" >&5
+echo "configure:2224: 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
   echo 'void f(){}' > conftest.cc
 if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
   ac_cv_prog_cxx_g=yes
 else
   ac_cv_prog_cxx_g=no
@@ -2257,72 +2249,72 @@ else
   else
     CXXFLAGS=
   fi
 fi
 
         fi
     fi
     echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:2266: checking how to run the C preprocessor" >&5
+echo "configure:2258: checking how to run the C preprocessor" >&5
 # On Suns, sometimes $CPP names a directory.
 if test -n "$CPP" && test -d "$CPP"; then
   CPP=
 fi
 if test -z "$CPP"; then
 if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
   echo $ac_n "(cached) $ac_c" 1>&6
 else
     # This must be in double quotes, not single quotes, because CPP may get
   # substituted into the Makefile and "${CC-cc}" will confuse make.
   CPP="${CC-cc} -E"
   # On the NeXT, cc -E runs the code through the compiler's parser,
   # not just through cpp.
   cat > conftest.$ac_ext <<EOF
-#line 2281 "configure"
+#line 2273 "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:2287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2279: \"$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
   :
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   CPP="${CC-cc} -E -traditional-cpp"
   cat > conftest.$ac_ext <<EOF
-#line 2298 "configure"
+#line 2290 "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:2304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2296: \"$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
   :
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   CPP="${CC-cc} -nologo -E"
   cat > conftest.$ac_ext <<EOF
-#line 2315 "configure"
+#line 2307 "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:2321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2313: \"$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
   :
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
@@ -2339,17 +2331,17 @@ fi
 else
   ac_cv_prog_CPP="$CPP"
 fi
 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:2348: checking for $ac_word" >&5
+echo "configure:2340: 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
   if test -n "$RANLIB"; then
   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
 else
   IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
   ac_dummy="$PATH"
@@ -2371,17 +2363,17 @@ else
   echo "$ac_t""no" 1>&6
 fi
 
     for ac_prog in as
 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:2380: checking for $ac_word" >&5
+echo "configure:2372: 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
   case "$AS" in
   /*)
   ac_cv_path_AS="$AS" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2412,17 +2404,17 @@ test -n "$AS" && break
 done
 test -n "$AS" || AS="$CC"
 
     for ac_prog in ar
 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:2421: checking for $ac_word" >&5
+echo "configure:2413: 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
   case "$AR" in
   /*)
   ac_cv_path_AR="$AR" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2453,17 +2445,17 @@ test -n "$AR" && break
 done
 test -n "$AR" || AR="echo not_ar"
 
     for ac_prog in ld link
 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:2462: checking for $ac_word" >&5
+echo "configure:2454: 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
   case "$LD" in
   /*)
   ac_cv_path_LD="$LD" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2494,17 +2486,17 @@ test -n "$LD" && break
 done
 test -n "$LD" || LD="echo not_ld"
 
     for ac_prog in strip
 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:2503: checking for $ac_word" >&5
+echo "configure:2495: 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
   case "$STRIP" in
   /*)
   ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2535,17 +2527,17 @@ test -n "$STRIP" && break
 done
 test -n "$STRIP" || STRIP="echo not_strip"
 
     for ac_prog in windres
 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:2544: checking for $ac_word" >&5
+echo "configure:2536: 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
   case "$WINDRES" in
   /*)
   ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2603,39 +2595,39 @@ esac
 
 if test "$cross_compiling"  = "yes"; then
     CROSS_COMPILE=1
 else
     CROSS_COMPILE=
 fi
 
 echo $ac_n "checking for gcc -pipe support""... $ac_c" 1>&6
-echo "configure:2612: checking for gcc -pipe support" >&5
+echo "configure:2604: 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
     ${CC} -S dummy-hello.c -o dummy-hello.s 2>&5
     cat dummy-hello.s | ${AS} -o dummy-hello.S - 2>&5
     if test $? = 0; then
         _res_as_stdin="yes"
     else
         _res_as_stdin="no"
     fi
     if test "$_res_as_stdin" = "yes"; then
         _SAVE_CFLAGS=$CFLAGS
         CFLAGS="$CFLAGS -pipe"
         cat > conftest.$ac_ext <<EOF
-#line 2627 "configure"
+#line 2619 "configure"
 #include "confdefs.h"
  #include <stdio.h> 
 int main() {
 printf("Hello World\n");
 ; return 0; }
 EOF
-if { (eval echo configure:2634: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:2626: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
   rm -rf conftest*
   _res_gcc_pipe="yes"
 else
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   _res_gcc_pipe="no" 
 fi
@@ -2652,17 +2644,17 @@ rm -f conftest*
     rm -f dummy-hello.c dummy-hello.s dummy-hello.S dummy-hello a.out
     echo "$ac_t""$_res" 1>&6
 else
     echo "$ac_t""no" 1>&6
 fi
 
 if test "$GNU_CC"; then
     echo $ac_n "checking for visibility(hidden) attribute""... $ac_c" 1>&6
-echo "configure:2661: checking for visibility(hidden) attribute" >&5
+echo "configure:2653: 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
   cat > conftest.c <<EOF
         int foo __attribute__ ((visibility ("hidden"))) = 1;
 EOF
         ac_cv_visibility_hidden=no
         if ${CC-cc} -Werror -S conftest.c -o conftest.s >/dev/null 2>&1; then
@@ -2676,17 +2668,17 @@ fi
 
 echo "$ac_t""$ac_cv_visibility_hidden" 1>&6
     if test "$ac_cv_visibility_hidden" = "yes"; then
         cat >> confdefs.h <<\EOF
 #define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
 EOF
 
         echo $ac_n "checking for visibility pragma support""... $ac_c" 1>&6
-echo "configure:2685: checking for visibility pragma support" >&5
+echo "configure:2677: 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
   cat > conftest.c <<EOF
 #pragma GCC visibility push(hidden)
             int foo_hidden = 1;
 #pragma GCC visibility push(default)
             int foo_default = 1;
@@ -2729,17 +2721,17 @@ fi # GNU_CC
 fi # SKIP_COMPILER_CHECKS
 
 if test -z "$SKIP_PATH_CHECKS"; then
     for ac_prog in perl5 perl
 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:2738: checking for $ac_word" >&5
+echo "configure:2730: 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
   case "$PERL" in
   /*)
   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
   ;;
   ?:/*)			 
@@ -2815,20 +2807,16 @@ if test "$OS_ARCH" = "FreeBSD"; then
     OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
 fi
 
 if test "$OS_ARCH" = "Linux"; then
     OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
     OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
 fi
 
-if test "$OS_ARCH" = "OpenVMS"; then
-    OS_RELEASE=`uname -v`
-fi
-
 #######################################################################
 # Master "Core Components" macros for getting the OS target           #
 #######################################################################
 
 #
 # Note: OS_TARGET should be specified on the command line for gmake.
 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
 # The difference between the Win95 target and the WinNT target is that
@@ -2981,27 +2969,27 @@ EOF
 
     cat >> confdefs.h <<\EOF
 #define SYSV 1
 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:2990: checking for sys/atomic_op.h" >&5
+echo "configure:2978: 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 2995 "configure"
+#line 2983 "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:3000: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:2988: \"$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*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -3148,36 +3136,36 @@ EOF
     PR_MD_ARCH_DIR=beos
     RESOLVE_LINK_SYMBOLS=1
     case "${target_cpu}" in
     i*86)
         _OPTIMIZE_FLAGS=-O2
         _DEBUG_FLAGS='-gdwarf-2 -O0'
         MKSHLIB='$(CCC) $(DSO_LDOPTS) -o $@'
         echo $ac_n "checking for gethostbyaddr in -lbind""... $ac_c" 1>&6
-echo "configure:3157: checking for gethostbyaddr in -lbind" >&5
+echo "configure:3145: 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
 else
   ac_save_LIBS="$LIBS"
 LIBS="-lbind  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 3165 "configure"
+#line 3153 "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
     builtin and then its argument prototype would still apply.  */
 char gethostbyaddr();
 
 int main() {
 gethostbyaddr()
 ; return 0; }
 EOF
-if { (eval echo configure:3176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:3164: \"$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
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
@@ -4477,41 +4465,16 @@ EOF
     OS_LIBS="-lc"
     if test -z "$USE_NSPR_THREADS"; then
         USE_PTHREADS=1
     fi
     DSO_LDOPTS='-shared -fPIC'
     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
     ;;
 
-*-openvms*)
-    cat >> confdefs.h <<\EOF
-#define XP_UNIX 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define VMS 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define PR_GETIPNODE_NOT_THREADSAFE 1
-EOF
-
-    RESOLVE_LINK_SYMBOLS=1
-    AR_FLAGS='c $@'
-    MDCPUCFG_H=_openvms.cfg
-    PR_MD_CSRCS=openvms.c
-    DSO_LDOPTS='-shared -auto_symvec'
-    if test -n "$MOZ_DEBUG"; then
-      DSO_LDOPTS="$DSO_LDOPTS $_DEBUG_FLAGS"
-    else
-      DSO_LDOPTS="$DSO_LDOPTS $_OPTIMIZE_FLAGS"
-    fi
-    ;;
-
 *-osf*)
     SHELL_OVERRIDE="SHELL		= /usr/bin/ksh"
     cat >> confdefs.h <<\EOF
 #define XP_UNIX 1
 EOF
 
     cat >> confdefs.h <<\EOF
 #define OSF1 1
@@ -4537,27 +4500,27 @@ EOF
     if test -z "$GNU_CC"; then
         CC="$CC -std1 -ieee_with_inexact"
         if test "$OS_RELEASE" != "V2.0"; then
             CC="$CC -readonly_strings"
         fi
         _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:4546: checking for machine/builtins.h" >&5
+echo "configure:4509: 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 4551 "configure"
+#line 4514 "configure"
 #include "confdefs.h"
 #include <machine/builtins.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:4556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:4519: \"$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*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -5196,63 +5159,63 @@ if test -z "$SKIP_LIBRARY_CHECKS"; then
 
 
 
 case $target in
 *-darwin*|*-beos*)
     ;;
 *)
     echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
-echo "configure:5205: checking for dlopen in -ldl" >&5
+echo "configure:5168: 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
 else
   ac_save_LIBS="$LIBS"
 LIBS="-ldl  $LIBS"
 cat > conftest.$ac_ext <<EOF
-#line 5213 "configure"
+#line 5176 "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
     builtin and then its argument prototype would still apply.  */
 char dlopen();
 
 int main() {
 dlopen()
 ; return 0; }
 EOF
-if { (eval echo configure:5224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5187: \"$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
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_lib_$ac_lib_var=no"
 fi
 rm -f conftest*
 LIBS="$ac_save_LIBS"
 
 fi
 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:5241: checking for dlfcn.h" >&5
+echo "configure:5204: 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 5246 "configure"
+#line 5209 "configure"
 #include "confdefs.h"
 #include <dlfcn.h>
 EOF
 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:5251: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:5214: \"$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*
   eval "ac_cv_header_$ac_safe=yes"
 else
   echo "$ac_err" >&5
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
@@ -5275,23 +5238,23 @@ fi
     ;;
 esac
 
 
 
 
 if test $ac_cv_prog_gcc = yes; then
     echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:5284: checking whether ${CC-cc} needs -traditional" >&5
+echo "configure:5247: 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 5290 "configure"
+#line 5253 "configure"
 #include "confdefs.h"
 #include <sgtty.h>
 Autoconf TIOCGETP
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "$ac_pattern" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_prog_gcc_traditional=yes
@@ -5299,17 +5262,17 @@ else
   rm -rf conftest*
   ac_cv_prog_gcc_traditional=no
 fi
 rm -f conftest*
 
 
   if test $ac_cv_prog_gcc_traditional = no; then
     cat > conftest.$ac_ext <<EOF
-#line 5308 "configure"
+#line 5271 "configure"
 #include "confdefs.h"
 #include <termio.h>
 Autoconf TCGETA
 EOF
 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   egrep "$ac_pattern" >/dev/null 2>&1; then
   rm -rf conftest*
   ac_cv_prog_gcc_traditional=yes
@@ -5323,22 +5286,22 @@ echo "$ac_t""$ac_cv_prog_gcc_traditional
   if test $ac_cv_prog_gcc_traditional = yes; then
     CC="$CC -traditional"
   fi
 fi
 
 for ac_func in lchown strerror
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:5332: checking for $ac_func" >&5
+echo "configure:5295: 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 5337 "configure"
+#line 5300 "configure"
 #include "confdefs.h"
 /* System header to define __stub macros and hopefully few prototypes,
     which can conflict with char $ac_func(); below.  */
 #include <assert.h>
 /* Override any gcc2 internal prototype to avoid an error.  */
 /* We use char because int might match the return type of a gcc2
     builtin and then its argument prototype would still apply.  */
 char $ac_func();
@@ -5351,17 +5314,17 @@ int main() {
 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
 choke me
 #else
 $ac_func();
 #endif
 
 ; return 0; }
 EOF
-if { (eval echo configure:5360: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+if { (eval echo configure:5323: \"$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
   echo "configure: failed program was:" >&5
   cat conftest.$ac_ext >&5
   rm -rf conftest*
   eval "ac_cv_func_$ac_func=no"
 fi
@@ -5392,17 +5355,17 @@ if test "${enable_strip+set}" = set; the
 fi
 
 
 case "${target_os}" in
 hpux*)
 if test -z "$GNU_CC"; then
 
     echo $ac_n "checking for +Olit support""... $ac_c" 1>&6
-echo "configure:5401: checking for +Olit support" >&5
+echo "configure:5364: 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
                   ac_cv_hpux_usable_olit_option=no
         rm -f conftest*
         echo 'int main() { return 0; }' | cat > conftest.c
         ${CC-cc} ${CFLAGS} +Olit=all -o conftest conftest.c > conftest.out 2>&1
         if test $? -eq 0; then
@@ -5431,17 +5394,17 @@ esac
 
 case "$target_os" in
 darwin*)
     _HAVE_PTHREADS=1
     ;;
 *)
     
 echo $ac_n "checking for pthread_create in -lpthreads""... $ac_c" 1>&6
-echo "configure:5440: checking for pthread_create in -lpthreads" >&5
+echo "configure:5403: checking for pthread_create in -lpthreads" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { return v; } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
@@ -5453,17 +5416,17 @@ echo "
     rm -f dummy.c dummy${ac_exeext} ;
     if test "$_res" = "0"; then
         echo "$ac_t""yes" 1>&6
         _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthreads"
     else
         echo "$ac_t""no" 1>&6
         
 echo $ac_n "checking for pthread_create in -lpthread""... $ac_c" 1>&6
-echo "configure:5462: checking for pthread_create in -lpthread" >&5
+echo "configure:5425: checking for pthread_create in -lpthread" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { return v; } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
@@ -5475,17 +5438,17 @@ echo "
     rm -f dummy.c dummy${ac_exeext} ;
     if test "$_res" = "0"; then
         echo "$ac_t""yes" 1>&6
         _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lpthread"
     else
         echo "$ac_t""no" 1>&6
         
 echo $ac_n "checking for pthread_create in -lc_r""... $ac_c" 1>&6
-echo "configure:5484: checking for pthread_create in -lc_r" >&5
+echo "configure:5447: checking for pthread_create in -lc_r" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { return v; } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
@@ -5497,17 +5460,17 @@ echo "
     rm -f dummy.c dummy${ac_exeext} ;
     if test "$_res" = "0"; then
         echo "$ac_t""yes" 1>&6
         _HAVE_PTHREADS=1 _PTHREAD_LDFLAGS="-lc_r"
     else
         echo "$ac_t""no" 1>&6
         
 echo $ac_n "checking for pthread_create in -lc""... $ac_c" 1>&6
-echo "configure:5506: checking for pthread_create in -lc" >&5
+echo "configure:5469: checking for pthread_create in -lc" >&5
 echo "
     #include <pthread.h> 
     void *foo(void *v) { return v; } 
     int main() { 
         pthread_t t;
         if (!pthread_create(&t, 0, &foo, 0)) {
             pthread_join(t, 0);
         }
@@ -5629,17 +5592,17 @@ EOF
     fi
 fi
 
 
 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:5638: checking whether ${CC-cc} accepts -pthread" >&5
+echo "configure:5601: 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
 	if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
 	    ac_cv_have_dash_pthread=yes
 		case "$target_os" in
 	    freebsd*)
 # Freebsd doesn't use -pthread for compiles, it uses them for linking
@@ -5652,17 +5615,17 @@ echo "configure:5638: checking whether $
 	fi
     fi
     rm -f conftest*
     echo "$ac_t""$ac_cv_have_dash_pthread" 1>&6
 
 			    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:5661: checking whether ${CC-cc} accepts -pthreads" >&5
+echo "configure:5624: 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
 	    	if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthreads`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
 			    ac_cv_have_dash_pthreads=yes
 			    CFLAGS="$CFLAGS -pthreads"
 			    CXXFLAGS="$CXXFLAGS -pthreads"
 		    fi
--- a/nsprpub/configure.in
+++ b/nsprpub/configure.in
@@ -307,20 +307,16 @@ if test -z "$CC"; then
     *-hpux*)
         CC=cc
     ;;
 
     *-irix*)
         CC=cc
     ;;
 
-    *-openvms*)
-        CC=cc
-    ;;
-
     *-osf*)
         CC=cc
     ;;
 
     *-solaris*)
         CC=cc
     ;;
 
@@ -356,20 +352,16 @@ if test -z "$CXX"; then
             ;;
         esac
     ;;
 
     *-irix*)
         CXX=CC
     ;;
 
-    *-openvms*)
-        CXX=cxx
-    ;;
-
     *-osf*)
         CXX=cxx
     ;;
 
     *-solaris*)
         CXX=CC
     ;;
 
@@ -676,20 +668,16 @@ if test "$OS_ARCH" = "FreeBSD"; then
     OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
 fi
 
 if test "$OS_ARCH" = "Linux"; then
     OS_RELEASE=`echo $OS_RELEASE | sed 's/-.*//'`
     OS_RELEASE=`echo $OS_RELEASE | awk -F\. '{ print $1 "." $2 }'`
 fi
 
-if test "$OS_ARCH" = "OpenVMS"; then
-    OS_RELEASE=`uname -v`
-fi
-
 #######################################################################
 # Master "Core Components" macros for getting the OS target           #
 #######################################################################
 
 #
 # Note: OS_TARGET should be specified on the command line for gmake.
 # When OS_TARGET=WIN95 is specified, then a Windows 95 target is built.
 # The difference between the Win95 target and the WinNT target is that
@@ -1830,32 +1818,16 @@ mips-sony-newsos*)
     OS_LIBS="-lc"
     if test -z "$USE_NSPR_THREADS"; then
         USE_PTHREADS=1
     fi
     DSO_LDOPTS='-shared -fPIC'
     MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
     ;;
 
-*-openvms*)
-    AC_DEFINE(XP_UNIX)
-    AC_DEFINE(VMS)
-    AC_DEFINE(PR_GETIPNODE_NOT_THREADSAFE)
-    RESOLVE_LINK_SYMBOLS=1
-    AR_FLAGS='c $@'
-    MDCPUCFG_H=_openvms.cfg
-    PR_MD_CSRCS=openvms.c
-    DSO_LDOPTS='-shared -auto_symvec'
-    if test -n "$MOZ_DEBUG"; then
-      DSO_LDOPTS="$DSO_LDOPTS $_DEBUG_FLAGS"
-    else
-      DSO_LDOPTS="$DSO_LDOPTS $_OPTIMIZE_FLAGS"
-    fi
-    ;;
-
 *-osf*)
     SHELL_OVERRIDE="SHELL		= /usr/bin/ksh"
     AC_DEFINE(XP_UNIX)
     AC_DEFINE(OSF1)
     AC_DEFINE(_REENTRANT)
     # OSF1 and HPUX report the POLLHUP event for a socket when the
     # shutdown(SHUT_WR) operation is called for the remote end, even though
     # the socket is still writeable. Use select(), instead of poll(), to
--- a/nsprpub/lib/ds/plarena.c
+++ b/nsprpub/lib/ds/plarena.c
@@ -103,20 +103,16 @@ static void UnlockArena( void )
 {
     PR_Unlock( arenaLock );
     return;
 } /* end UnlockArena() */
 
 PR_IMPLEMENT(void) PL_InitArenaPool(
     PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align)
 {
-#if defined(XP_MAC)
-#pragma unused (name)
-#endif
-
     /*
      * Look-up table of PR_BITMASK(PR_CeilingLog2(align)) values for
      * align = 1 to 32.
      */
     static const PRUint8 pmasks[33] = {
          0,                                               /*  not used */
          0, 1, 3, 3, 7, 7, 7, 7,15,15,15,15,15,15,15,15,  /*  1 ... 16 */
         31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31}; /* 17 ... 32 */
@@ -340,27 +336,16 @@ PR_IMPLEMENT(void) PL_FinishArenaPool(PL
             }
         }
     }
 #endif
 }
 
 PR_IMPLEMENT(void) PL_CompactArenaPool(PLArenaPool *ap)
 {
-#if XP_MAC
-#pragma unused (ap)
-#if 0
-    PRArena *curr = &(ap->first);
-    while (curr) {
-        reallocSmaller(curr, curr->avail - (uprword_t)curr);
-        curr->limit = curr->avail;
-        curr = curr->next;
-    }
-#endif
-#endif
 }
 
 PR_IMPLEMENT(void) PL_ArenaFinish(void)
 {
     PLArena *a, *next;
 
     for (a = arena_freelist; a; a = next) {
         next = a->next;
deleted file mode 100644
--- a/nsprpub/lib/ds/plds_symvec.opt
+++ /dev/null
@@ -1,37 +0,0 @@
-! Fixed section of symbol vector for LIBPLDS4
-!
-GSMATCH=LEQUAL,2,2
-case_sensitive=YES
-!
-! --------------------------------------------------------------------------
-! Ident 2,2 introduced for Mozilla 1.3
-! Previously this was empty. Now we include everything that's specified in
-! plds.def.
-! --------------------------------------------------------------------------
-!
-! NSPR 4.0
-SYMBOL_VECTOR=(PL_ArenaAllocate=PROCEDURE)
-SYMBOL_VECTOR=(PL_ArenaFinish=PROCEDURE)
-SYMBOL_VECTOR=(PL_ArenaGrow=PROCEDURE)
-SYMBOL_VECTOR=(PL_ArenaRelease=PROCEDURE)
-SYMBOL_VECTOR=(PL_CompactArenaPool=PROCEDURE)
-SYMBOL_VECTOR=(PL_CompareStrings=PROCEDURE)
-SYMBOL_VECTOR=(PL_CompareValues=PROCEDURE)
-SYMBOL_VECTOR=(PL_FinishArenaPool=PROCEDURE)
-SYMBOL_VECTOR=(PL_FreeArenaPool=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashString=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableAdd=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableDestroy=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableDump=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableEnumerateEntries=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableLookup=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableRawAdd=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableRawLookup=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableRawRemove=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableRemove=PROCEDURE)
-SYMBOL_VECTOR=(PL_InitArenaPool=PROCEDURE)
-SYMBOL_VECTOR=(PL_NewHashTable=PROCEDURE)
-SYMBOL_VECTOR=(libVersionPoint=PROCEDURE)
-! NSPR 4.1
-SYMBOL_VECTOR=(PL_HashTableLookupConst=PROCEDURE)
-SYMBOL_VECTOR=(PL_HashTableRawLookupConst=PROCEDURE)
--- a/nsprpub/lib/ds/plhash.c
+++ b/nsprpub/lib/ds/plhash.c
@@ -60,50 +60,34 @@
 #define UNDERLOADED(n)  (((n) > MINBUCKETS) ? ((n) >> 2) : 0)
 
 /*
 ** Stubs for default hash allocator ops.
 */
 static void * PR_CALLBACK
 DefaultAllocTable(void *pool, PRSize size)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     return PR_MALLOC(size);
 }
 
 static void PR_CALLBACK
 DefaultFreeTable(void *pool, void *item)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     PR_Free(item);
 }
 
 static PLHashEntry * PR_CALLBACK
 DefaultAllocEntry(void *pool, const void *key)
 {
-#if defined(XP_MAC)
-#pragma unused (pool,key)
-#endif
-
     return PR_NEW(PLHashEntry);
 }
 
 static void PR_CALLBACK
 DefaultFreeEntry(void *pool, PLHashEntry *he, PRUintn flag)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     if (flag == HT_FREE_ENTRY)
         PR_Free(he);
 }
 
 static PLHashAllocOps defaultHashAllocOps = {
     DefaultAllocTable, DefaultFreeTable,
     DefaultAllocEntry, DefaultFreeEntry
 };
deleted file mode 100644
--- a/nsprpub/lib/libc/src/plc_symvec.opt
+++ /dev/null
@@ -1,53 +0,0 @@
-! Fixed section of symbol vector for LIBPLC4
-!
-GSMATCH=LEQUAL,2,2
-case_sensitive=YES
-!
-! --------------------------------------------------------------------------
-! Ident 2,2 introduced for Mozilla 1.3
-! Previously this was empty. Now we include everything that's specified in
-! plc.def.
-! --------------------------------------------------------------------------
-!
-! NSPR 4.0
-SYMBOL_VECTOR=(PL_Base64Decode=PROCEDURE)
-SYMBOL_VECTOR=(PL_Base64Encode=PROCEDURE)
-SYMBOL_VECTOR=(PL_CreateOptState=PROCEDURE)
-SYMBOL_VECTOR=(PL_DestroyOptState=PROCEDURE)
-SYMBOL_VECTOR=(PL_FPrintError=PROCEDURE)
-SYMBOL_VECTOR=(PL_GetNextOpt=PROCEDURE)
-SYMBOL_VECTOR=(PL_PrintError=PROCEDURE)
-SYMBOL_VECTOR=(PL_strcasecmp=PROCEDURE)
-SYMBOL_VECTOR=(PL_strcaserstr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strcasestr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strcat=PROCEDURE)
-SYMBOL_VECTOR=(PL_strcatn=PROCEDURE)
-SYMBOL_VECTOR=(PL_strchr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strcmp=PROCEDURE)
-SYMBOL_VECTOR=(PL_strcpy=PROCEDURE)
-SYMBOL_VECTOR=(PL_strdup=PROCEDURE)
-SYMBOL_VECTOR=(PL_strfree=PROCEDURE)
-SYMBOL_VECTOR=(PL_strlen=PROCEDURE)
-SYMBOL_VECTOR=(PL_strncasecmp=PROCEDURE)
-SYMBOL_VECTOR=(PL_strncaserstr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strncasestr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strncat=PROCEDURE)
-SYMBOL_VECTOR=(PL_strnchr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strncmp=PROCEDURE)
-SYMBOL_VECTOR=(PL_strncpy=PROCEDURE)
-SYMBOL_VECTOR=(PL_strncpyz=PROCEDURE)
-SYMBOL_VECTOR=(PL_strndup=PROCEDURE)
-SYMBOL_VECTOR=(PL_strnlen=PROCEDURE)
-SYMBOL_VECTOR=(PL_strnpbrk=PROCEDURE)
-SYMBOL_VECTOR=(PL_strnprbrk=PROCEDURE)
-SYMBOL_VECTOR=(PL_strnrchr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strnrstr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strnstr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strpbrk=PROCEDURE)
-SYMBOL_VECTOR=(PL_strprbrk=PROCEDURE)
-SYMBOL_VECTOR=(PL_strrchr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strrstr=PROCEDURE)
-SYMBOL_VECTOR=(PL_strstr=PROCEDURE)
-SYMBOL_VECTOR=(libVersionPoint=PROCEDURE)
-! NSPR 4.2
-SYMBOL_VECTOR=(PL_strtok_r=PROCEDURE)
deleted file mode 100644
--- a/nsprpub/lib/msgc/src/macgc.c
+++ /dev/null
@@ -1,75 +0,0 @@
-/* -*- 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 ***** */
-
-#include "primpl.h"
-#include "MacMemAllocator.h"
-
-void _MD_InitGC() {}
-
-void *_MD_GrowGCHeap(size_t *sizep)
-{
-	void			*heapPtr = NULL;
-	size_t			heapSize = *sizep;
-	
-	// In previous versions of this code we tried to allocate GC heaps from the application
-	// heap.  In the 4.0 application, we try to keep our app heap allications to a minimum
-	// and instead go through our own memory allocation routines.
-	heapPtr = malloc(heapSize);
-	
-	if (heapPtr == NULL) {		
-		FreeMemoryStats		stats;
-		
-		memtotal(heapSize, &stats);		// How much can we allcoate?
-		
-		if (stats.maxBlockSize < heapSize)
-			heapSize = stats.maxBlockSize;
-		
-		heapPtr = malloc(heapSize);
-		
-		if (heapPtr == NULL) 			// Now we're hurting
-			heapSize = 0;
-	}
-	
-	*sizep = heapSize;
-	return heapPtr;
-}
-
-
-void _MD_FreeGCSegment(void *base, int32 /* len */)
-{
-	free(base);
-}
--- a/nsprpub/lib/msgc/src/prgcapi.c
+++ b/nsprpub/lib/msgc/src/prgcapi.c
@@ -38,21 +38,17 @@
 #include <stdarg.h>
 #include <string.h>
 #include <stdio.h>
 #include "prenv.h"
 #include "prmem.h"
 #include "prmon.h"
 #include "prlog.h"
 #include "prthread.h"
-#if defined(XP_MAC)
-#include "pprthred.h"
-#else
 #include "private/pprthred.h"
-#endif
 #include "gcint.h"
 
 /*
 ** Generic GC implementation independent code for the NSPR GC
 */
 
 RootFinder *_pr_rootFinders;
 
@@ -77,20 +73,16 @@ GCLockHook *_pr_GCLockHook;
 
 extern PRLogModuleInfo *_pr_msgc_lm;
 
 /************************************************************************/
 
 static PRStatus PR_CALLBACK
 pr_ScanOneThread(PRThread* t, void** addr, PRUword count, void* closure)
 {
-#if defined(XP_MAC)
-#pragma unused (t, closure)
-#endif
-
     _pr_gcData.processRootBlock(addr, count);
     return PR_SUCCESS;
 }
 
 /*
 ** Scan all of the threads C stack's and registers, looking for "root"
 ** pointers into the GC heap. These are the objects that the GC cannot
 ** move and are considered "live" by the GC. Caller has stopped all of
--- a/nsprpub/lib/msgc/src/prmsgc.c
+++ b/nsprpub/lib/msgc/src/prmsgc.c
@@ -53,21 +53,17 @@
 #include "prgc.h"
 #include "prthread.h"
 #include "prlog.h"
 #include "prlong.h"
 #include "prinrval.h"
 #include "prprf.h"
 #include "gcint.h"
 
-#if defined(XP_MAC)
-#include "pprthred.h"
-#else
 #include "private/pprthred.h"
-#endif
 
 typedef void (*PRFileDumper)(FILE *out, PRBool detailed);
 
 PR_EXTERN(void)
 PR_DumpToFile(char* filename, char* msg, PRFileDumper dump, PRBool detailed);
 
 /*
 ** Mark&sweep garbage collector. Supports objects that require
@@ -125,21 +121,17 @@ static PRInt32 _pr_pageSize;
  * of the remainder, 2 are user defined. Max allocation size = 2^22 -1
  */
 
 #define MAX_ALLOC ( (1L << (PR_BYTES_PER_WORD_LOG2 + WORDS_BITS )) -1)
 
 /* The minimum percentage of free heap space after a collection. If
    the amount of free space doesn't meet this criteria then we will
    attempt to grow the heap */
-#ifdef XP_MAC
-#define MIN_FREE_THRESHOLD_AFTER_GC 10L
-#else
 #define MIN_FREE_THRESHOLD_AFTER_GC 20L
-#endif
 
 static PRInt32 segmentSize = SEGMENT_SIZE;
 
 static PRInt32 collectorCleanupNeeded;
 
 #ifdef GCMETER
 PRUint32 _pr_gcMeter;
 
@@ -1282,19 +1274,16 @@ static void PrepareFinalize(void)
 ** necessary because we might do a GC before objects that are on the
 ** final queue get finalized. Since there are no other references
 ** (otherwise they would be on the final queue), we have to scan them.
 ** This really only does work if we call the GC before the finalizer
 ** has a chance to do its job.
 */
 extern void PR_CALLBACK _PR_ScanFinalQueue(void *notused)
 {
-#ifdef XP_MAC
-#pragma unused (notused)
-#endif
     PRCList *qp;
     GCFinal *fp;
     PRWord *p;
     void ( PR_CALLBACK *livePointer)(void *ptr);
 
     livePointer = _pr_gcData.livePointer;
     qp = _pr_finalQueue.next;
     while (qp != &_pr_finalQueue) {
@@ -1303,19 +1292,16 @@ extern void PR_CALLBACK _PR_ScanFinalQue
         p = &fp->object[1];
     (*livePointer)(p);
     qp = qp->next;
     }
 }
 
 void PR_CALLBACK FinalizerLoop(void* unused)
 {
-#ifdef XP_MAC
-#pragma unused (unused)
-#endif
     GCFinal *fp;
     PRWord *p;
     PRWord h, tix;
     CollectorType *ct;
 
     LOCK_GC();
     for (;;) {
 	p = 0; h = 0;		/* don't let the gc find these pointers */
@@ -1416,19 +1402,16 @@ PRCList _pr_freeWeakLinks = PR_INIT_STAT
 
 #define WEAK_FREELIST_ISEMPTY() (_pr_freeWeakLinks.next == &_pr_freeWeakLinks)
 
 /*
  * Keep objects referred to by weak free list alive until they can be
  * freed
  */
 static void PR_CALLBACK ScanWeakFreeList(void *notused) {
-#ifdef XP_MAC
-#pragma unused (notused)
-#endif
     PRCList *qp = _pr_freeWeakLinks.next;
     while (qp != &_pr_freeWeakLinks) {
     GCWeak *wp = WeakPtr(qp);
     qp = qp->next;
     ProcessRootPointer(wp->object);
     }
 }
 
@@ -1946,20 +1929,16 @@ pr_DumpUnknown(FILE *out, GCType* tp, PR
     fprintf(out, "UNKNOWN KIND %ld\n", (long) tix);
     if (detailed)
     PR_DumpHexWords(out, p, bytes>>2, 22, 4);
 }
 
 static void PR_CALLBACK
 pr_DumpFree(FILE *out, PRWord *p, size_t size, PRBool detailed)
 {
-#if defined(XP_MAC) && XP_MAC
-# pragma unused( detailed )
-#endif
-
     fprintf(out, "0x%p: 0x%.6lX -  FREE\n", p, (long) size);
 }
 
 static void PR_CALLBACK
 pr_DumpSegment(FILE* out, GCSeg* sp, PRBool detailed)
 {
     pr_WalkSegment(out, sp, detailed,
            "\n   Address: Length\n0x%p: Beginning of segment\n",
@@ -1998,19 +1977,16 @@ PR_DumpMemory(PRBool detailed)
     PR_DumpToFile("memory.out", "Dumping memory", PR_DumpGCHeap, detailed);
 }
 
 /******************************************************************************/
 
 static PRInt32 PR_CALLBACK
 pr_DumpRootPointer(PRWord* p, void* data)
 {
-#ifdef XP_MAC
-#pragma unused(data)
-#endif
     PRWord h = p[0];
     PRWord tix = GET_TYPEIX(h);
       size_t bytes = OBJ_BYTES(h);
       
       GCType* tp = &_pr_collectorTypes[tix].gctype;
       if (0 != tp)
       pr_DumpObject(_pr_gcData.dumpOutput, tp, p, bytes, PR_FALSE);
       else
@@ -2084,20 +2060,16 @@ PR_RegisterSummaryPrinter(PRSummaryPrint
     summaryPrinter = fun;
     summaryPrinterClosure = closure;
 }
 
 static void PR_CALLBACK
 pr_SummarizeObject(FILE *out, GCType* tp, PRWord *p,
            size_t bytes, PRBool detailed)
 {
-#if defined(XP_MAC) && XP_MAC
-# pragma unused( out, detailed )
-#endif
-
     if (tp->summarize)
     (*tp->summarize)((void GCPTR*)(p + 1), bytes);
 }
 
 static void PR_CALLBACK
 pr_DumpSummary(FILE* out, GCSeg* sp, PRBool detailed)
 {
     pr_WalkSegment(out, sp, detailed, NULL, NULL,
--- a/nsprpub/lib/msgc/tests/gc1.c
+++ b/nsprpub/lib/msgc/tests/gc1.c
@@ -40,31 +40,21 @@
 ***********************************************************************/
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include "prgc.h"
 #include "prinit.h"
 #include "prmon.h"
 #include "prinrval.h"
-#ifndef XP_MAC
 #include "private/pprthred.h"
-#else
-#include "pprthred.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static PRMonitor *mon;
 static PRInt32 threads, waiting, iterations;
 static PRInt32 scanCount, finalizeCount, freeCount;
 
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 
@@ -188,21 +178,16 @@ int main(int argc, char **argv)
 
     fprintf(stderr, "t is %ld, i is %ld\n", (long) threads, (long) iterations);
 	/* main test */
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 5);
     PR_STDIO_INIT();
     Initialize();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("gc1.log");
-	debug_mode = 1;
-#endif
-
     /* Spin all of the allocator threads and then wait for them to exit */
     start = PR_IntervalNow();
     mon = PR_NewMonitor();
     PR_EnterMonitor(mon);
     waiting = 0;
     for (i = 0; i < threads; i++) {
         (void) PR_CreateThreadGCAble(PR_USER_THREAD,
                                AllocateLikeMad, (void*)iterations,
--- a/nsprpub/lib/msgc/tests/thrashgc.c
+++ b/nsprpub/lib/msgc/tests/thrashgc.c
@@ -55,33 +55,23 @@
 #include "prthread.h"
 #include "prgc.h"
 #include "prprf.h"
 #include "prinrval.h"
 #include "prlock.h"
 #include "prinit.h"
 #include "prcvar.h"
 
-#ifndef XP_MAC
 #include "private/pprthred.h"
-#else
-#include "pprthred.h"
-#endif
 
 #include <stdio.h>
 #include <memory.h>
 #include <string.h>
 
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 static char* progname;
 static PRInt32 loops = 1000;
 static int tix1, tix2, tix3;
 static GCInfo* gcInfo;
 static PRLock* stderrLock;
@@ -164,38 +154,29 @@ static void PR_CALLBACK AllocStuff(void 
       danglingRefs[49] = p;
     }
   }
   end = PR_IntervalNow();
   if (debug_mode) PR_snprintf(msg, sizeof(msg), "Thread %p: %ld allocations took %ld ms",
 	      PR_GetCurrentThread(), loops,
 	      PR_IntervalToMilliseconds((PRIntervalTime) (end - start)));
   PR_Lock(stderrLock);
-#ifndef XP_MAC
   fprintf(stderr, "%s\n", msg);
-#else
-  if (debug_mode) printf("%s\n", msg);
-#endif
   PR_Unlock(stderrLock);
   }
 
 static void usage(char *progname) {
-#ifndef XP_MAC
   fprintf(stderr, "Usage: %s [-t threads] [-l loops]\n", progname);
-#else
-  printf("Usage: %s [-t threads] [-l loops]\n", progname);
-#endif
   exit(-1);
 }
 
 static int realMain(int argc, char **argv, char *notused) {
   int i;
   int threads = 0;
 
-#ifndef XP_MAC
   progname = strrchr(argv[0], '/');
   if (progname == 0) progname = argv[0];
   for (i = 1; i < argc; i++) {
     if (strcmp(argv[i], "-t") == 0) {
       if (i == argc - 1) {
 	usage(progname);
       }
       threads = atoi(argv[++i]);
@@ -207,39 +188,31 @@ static int realMain(int argc, char **arg
       if (i == argc - 1) {
 	usage(progname);
       }
       loops = atoi(argv[++i]);
       continue;
     }
     usage(progname);
   }
-#else
-	threads = 50;
-#endif
 
   for (i = 0; i < threads; i++) {
     PRThread* thread;
 
     /* XXXXX */
     thread = PR_CreateThreadGCAble(PR_USER_THREAD,  /* thread type */
 			     AllocStuff,  /* start function */
 			     NULL,  /* arg */
 			     PR_PRIORITY_NORMAL,  /* priority */
 			     PR_LOCAL_THREAD,  /* thread scope */
 			     PR_UNJOINABLE_THREAD,  /* thread state */
 			     0);   /* stack size */
     if (thread == 0) {
-#ifndef XP_MAC
       fprintf(stderr, "%s: no more threads (only %d were created)\n",
 	      progname, i);
-#else
-      printf("%s: no more threads (only %d were created)\n",
-	      progname, i);
-#endif
       break;
     }
   }
   AllocStuff(NULL);
   return 0;
 }
 
 static int padMain(int argc, char **argv) {
@@ -250,21 +223,16 @@ static int padMain(int argc, char **argv
 int main(int argc, char **argv) {
   int rv;
 
   debug_mode = 1;
   
   PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
   PR_SetThreadGCAble();
 
-#ifdef XP_MAC
-  SetupMacPrintfLog("thrashgc.log");
-  debug_mode = 1;
-#endif
-
   PR_InitGC(0, 0, 0, PR_GLOBAL_THREAD);
   PR_STDIO_INIT();
   stderrLock = PR_NewLock();
   tix1 = PR_RegisterType(&type1);
   tix2 = PR_RegisterType(&type2);
   tix3 = PR_RegisterType(&type3);
   gcInfo = PR_GetGCInfo();
   rv = padMain(argc, argv);
--- a/nsprpub/lib/prstreams/prstrms.cpp
+++ b/nsprpub/lib/prstreams/prstrms.cpp
@@ -59,20 +59,16 @@
 #if defined(__GNUC__)
 #define _PRSTR_BP _strbuf
 #define _PRSTR_DELBUF(x)    /* as nothing */
 #define _PRSTR_DELBUF_C(c, x)  /* as nothing */
 #elif defined(WIN32)
 #define _PRSTR_BP bp
 #define _PRSTR_DELBUF(x)	delbuf(x)
 #define _PRSTR_DELBUF_C(c, x)	c::_PRSTR_DELBUF(x)
-#elif defined(VMS)
-#undef  _PRSTR_BP
-#define _PRSTR_DELBUF(x) /* as nothing */
-#define _PRSTR_DELBUF_C(c, x)	/* as nothing */
 #elif defined(OSF1)
 #define _PRSTR_BP m_psb
 #define _PRSTR_DELBUF(x) /* as nothing */
 #define _PRSTR_DELBUF_C(c, x)	/* as nothing */
 #elif defined(QNX)
 #define PRFSTREAMS_BROKEN
 #else
 #define _PRSTR_BP bp
--- a/nsprpub/pr/include/md/Makefile.in
+++ b/nsprpub/pr/include/md/Makefile.in
@@ -48,39 +48,23 @@ include $(MOD_DEPTH)/config/autoconf.mk
 # cross-compilation.
 CONFIGS = $(wildcard $(srcdir)/*.cfg)
 
 include $(topsrcdir)/config/rules.mk
 
 export:: $(MDCPUCFG_H)
 	$(INSTALL) -m 444 $(CONFIGS) $(dist_includedir)/md
 	$(INSTALL) -m 444 $(srcdir)/$(MDCPUCFG_H) $(dist_includedir)
-ifeq ($(OS_ARCH),OpenVMS)
-# On OpenVMS mv updates the file's modified time, so we create a hard link.
-	cd $(dist_includedir); \
-	if test ! -f prcpucfg.h; then \
-	    dcl set file /enter=prcpucfg.h $(MDCPUCFG_H); \
-	fi
-else
 	mv -f $(dist_includedir)/$(MDCPUCFG_H) $(dist_includedir)/prcpucfg.h
-endif
 
 install::
 	$(NSINSTALL) -D $(DESTDIR)$(includedir)/md
 	$(NSINSTALL) -t -m 644 $(CONFIGS) $(DESTDIR)$(includedir)/md
 	$(NSINSTALL) -t -m 644 $(srcdir)/$(MDCPUCFG_H) $(DESTDIR)$(includedir)
-ifeq ($(OS_ARCH),OpenVMS)
-# On OpenVMS mv updates the file's modified time, so we create a hard link.
-	cd $(DESTDIR)$(includedir); \
-	if test ! -f prcpucfg.h; then \
-	    dcl set file /enter=prcpucfg.h $(MDCPUCFG_H); \
-	fi
-else
 	mv -f $(DESTDIR)$(includedir)/$(MDCPUCFG_H) $(DESTDIR)$(includedir)/prcpucfg.h
-endif
 
 release:: export
 	@echo "Copying machine-dependent prcpucfg.h"
 	@if test -z "$(BUILD_NUMBER)"; then \
 		echo "BUILD_NUMBER must be defined"; \
 		false; \
 	fi
 	@if test ! -d $(RELEASE_INCLUDE_DIR); then \
--- a/nsprpub/pr/include/md/_linux.cfg
+++ b/nsprpub/pr/include/md/_linux.cfg
@@ -516,18 +516,25 @@
 #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
 
 #elif defined(__arm__)
 
+#ifdef __ARMEB__
+#undef  IS_LITTLE_ENDIAN
+#define IS_BIG_ENDIAN 1
+#elif defined(__ARMEL__)
 #define IS_LITTLE_ENDIAN 1
 #undef  IS_BIG_ENDIAN
+#else
+#error "Unknown ARM endianness."
+#endif
 
 #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
@@ -695,16 +702,61 @@
 #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
 
+#elif defined(__sh__)
+
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+
+#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
+
 #else
 
 #error "Unknown CPU architecture"
 
 #endif
 
 #ifndef HAVE_LONG_LONG
 #define	HAVE_LONG_LONG
--- a/nsprpub/pr/include/md/_linux.h
+++ b/nsprpub/pr/include/md/_linux.h
@@ -74,16 +74,18 @@
 #elif defined(__arm__)
 #define _PR_SI_ARCHITECTURE "arm"
 #elif defined(__hppa__)
 #define _PR_SI_ARCHITECTURE "hppa"
 #elif defined(__s390x__)
 #define _PR_SI_ARCHITECTURE "s390x"
 #elif defined(__s390__)
 #define _PR_SI_ARCHITECTURE "s390"
+#elif defined(__sh__)
+#define _PR_SI_ARCHITECTURE "sh"
 #else
 #error "Unknown CPU architecture"
 #endif
 #define PR_DLL_SUFFIX		".so"
 
 #define _PR_VMBASE              0x30000000
 #define _PR_STACK_VMBASE	0x50000000
 #define _MD_DEFAULT_STACK_SIZE	65536L
@@ -431,16 +433,28 @@ extern void _MD_CleanupBeforeExit(void);
 #define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
 #define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[19])
 #define _MD_SP_TYPE __ptr_t
 #endif /* __ARM_EABI__ */
 #else
 #error "ARM/Linux pre-glibc2 not supported yet"
 #endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
 
+#elif defined(__sh__)
+/* SH/Linux */
+#if defined(__GLIBC__) && __GLIBC__ >= 2
+#define _MD_GET_SP(_t) (_t)->md.context[0].__jmpbuf[7]
+#define _MD_SET_FP(_t, val) ((_t)->md.context[0].__jmpbuf[6] = (val))
+#define _MD_GET_SP_PTR(_t) &(_MD_GET_SP(_t))
+#define _MD_GET_FP_PTR(_t) (&(_t)->md.context[0].__jmpbuf[6])
+#define _MD_SP_TYPE __ptr_t
+#else
+#error "SH/Linux pre-glibc2 not supported yet"
+#endif /* defined(__GLIBC__) && __GLIBC__ >= 2 */
+
 #else
 
 #error "Unknown CPU architecture"
 
 #endif /*__powerpc__*/
 
 /*
 ** Initialize a thread context to run "_main()" when started
deleted file mode 100644
--- a/nsprpub/pr/include/md/_openvms.cfg
+++ /dev/null
@@ -1,148 +0,0 @@
-/* -*- 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 VMS
-#define VMS
-#endif
-
-#define IS_LITTLE_ENDIAN 1
-#undef  IS_BIG_ENDIAN
-#ifndef HAVE_LONG_LONG
-#define	HAVE_LONG_LONG
-#endif
-#define HAVE_ALIGNED_DOUBLES
-#define HAVE_ALIGNED_LONGLONGS
-#ifdef IS_64
-#undef IS_64
-#endif
-
-#define PR_AF_INET6 26  /* same as AF_INET6 */
-
-#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_BYTES_PER_WORD_LOG2  2
-#define PR_BYTES_PER_DWORD_LOG2 3
-
-#define PR_ALIGN_OF_SHORT   2
-#define PR_ALIGN_OF_INT     4
-#define PR_ALIGN_OF_LONG    4
-#define PR_ALIGN_OF_INT64   8
-#define PR_ALIGN_OF_FLOAT   4
-#define PR_ALIGN_OF_DOUBLE  8
-#define PR_ALIGN_OF_POINTER 4
-
-#define _PR_POLL_BACKCOMPAT
-
-#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___ */
deleted file mode 100644
--- a/nsprpub/pr/include/md/_openvms.h
+++ /dev/null
@@ -1,333 +0,0 @@
-/* -*- 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 ***** */
-
-/*
-** This is the OpenVMS machine dependant configuration file. It is based
-** on the OSF/1 machine dependant file.
-*/
-
-#ifndef nspr_openvms_defs_h___
-#define nspr_openvms_defs_h___
-
-/*
- * Internal configuration macros
- */
-
-#define PR_LINKER_ARCH	"OpenVMS"
-#define _PR_SI_SYSNAME	"OpenVMS"
-#ifdef __alpha
-#define _PR_SI_ARCHITECTURE "alpha"
-#else
-#define _PR_SI_ARCHITECTURE "vax"
-#endif
-#define PR_DLL_SUFFIX		".so"
-
-#define _PR_VMBASE		0x30000000
-#define _PR_STACK_VMBASE	0x50000000
-#define _MD_DEFAULT_STACK_SIZE	131072L
-#define _MD_MINIMUM_STACK_SIZE	131072L
-
-/*
-** This is not defined on OpenVMS. I believe its only used in GC code, and
-** isn't that only used in Java? Anyway, for now, let's keep the compiler
-** happy.
-*/
-#define SA_RESTART 0
-
-/*
-** OpenVMS doesn't have these in socket.h.
-** Does in later versions!
-*/
-#if 0
-struct ip_mreq {
-    struct in_addr  imr_multiaddr;      /* IP multicast address of group */
-    struct in_addr  imr_interface;      /* local IP address of interface */
-};
-#endif
-
-/*
- * OSF1 needs the MAP_FIXED flag to ensure that mmap returns a pointer
- * with the upper 32 bits zero.  This is because Java sticks a pointer
- * into an int.
- */
-#define _MD_MMAP_FLAGS          MAP_PRIVATE|MAP_FIXED
-
-#undef  HAVE_STACK_GROWING_UP
-#undef 	HAVE_WEAK_IO_SYMBOLS
-#undef 	HAVE_WEAK_MALLOC_SYMBOLS
-#undef  HAVE_BSD_FLOCK
-
-#define NEED_TIME_R
-
-#define HAVE_DLL
-#define USE_DLFCN
-
-#define _PR_POLL_AVAILABLE
-#define _PR_USE_POLL
-#define _PR_STAT_HAS_ONLY_ST_ATIME
-#define _PR_NO_LARGE_FILES
-#define _PR_STRICT_ADDR_LEN
-#define _PR_NEED_SECRET_AF
-
-/* IPv6 support */
-#ifdef _SOCKADDR_LEN
-#define _PR_HAVE_SOCKADDR_LEN
-#endif
-#define _PR_HAVE_GETIPNODEBYNAME
-#define _PR_HAVE_GETIPNODEBYADDR
-#define _PR_HAVE_GETADDRINFO
-#define _PR_INET6_PROBE
-#ifdef _PR_INET6
-#define _PR_HAVE_INET_NTOP
-#else
-#define AF_INET6 26
-#ifndef AI_CANONNAME
-#define AI_CANONNAME 0x00000002
-struct addrinfo {
-    int ai_flags;
-    int ai_family;
-    int ai_socktype;
-    int ai_protocol;
-    size_t ai_addrlen;
-    char *ai_canonname;
-    struct sockaddr *ai_addr;
-    struct addrinfo *ai_next;
-};
-#endif
-#define AI_V4MAPPED 0x00000010
-#define AI_ALL      0x00000008
-#define AI_ADDRCONFIG 0x00000020
-#endif
-
-#define _PR_HAVE_MD_SOCKADDR_IN6
-/* if we have a quadword field defined in the structure, then its length */
-/* will be a multiple of 8, and connect() won't accept 32 (it wants 28) */
-struct _md_in6_addr {
-    union {
-        PRUint8  _S6_u8[16];
-        PRUint16 _S6_u16[8];
-        PRUint32 _S6_u32[4];
-    } _S6_un;
-};
-struct _md_sockaddr_in6 {
-    PRUint16 sin6_family;
-    PRUint16 sin6_port;
-    PRUint32 sin6_flowinfo;
-    struct _md_in6_addr sin6_addr;
-    PRUint32 sin6_scope_id;
-};
-
-#undef  USE_SETJMP
-
-#include <setjmp.h>
-
-/*
- * A jmp_buf is actually a struct sigcontext.  The sc_sp field of
- * struct sigcontext is the stack pointer.
- */
-#define _MD_GET_SP(_t) (((struct sigcontext *) (_t)->md.context)->sc_sp)
-#define PR_NUM_GCREGS _JBLEN
-#define CONTEXT(_th) ((_th)->md.context)
-
-/*
-** I am ifdef'ing these out because that's the way they are in FT.
-*/
-#ifndef __VMS
-
-/*
-** Initialize a thread context to run "_main()" when started
-*/
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status)	      \
-{									  \
-        *status = PR_TRUE;              \
-    if (setjmp(CONTEXT(_thread))) {				\
-	(*_main)();						\
-    }								\
-    _MD_GET_SP(_thread) = (long) ((_sp) - 64);			\
-    _MD_GET_SP(_thread) &= ~15;					\
-}
-
-#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);    \
-}
-
-#endif /* __VMS */
-
-/* Machine-dependent (MD) data structures */
-
-struct _MDThread {
-    jmp_buf 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        /* _PR_USE_POLL */
-};
-
-#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;
-};
-
-#ifndef _PR_PTHREADS
-#define _MD_INIT_LOCKS()
-#endif
-#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()
-
-/*
- * The following are copied from _sunos.h, _aix.h.  This means
- * some of them should probably be moved into _unixos.h.  But
- * _irix.h seems to be quite different in regard to these macros.
- */
-#define _MD_GET_INTERVAL                  _PR_UNIX_GetInterval
-extern PRIntervalTime _PR_UNIX_GetInterval(void);
-#define _MD_INTERVAL_PER_SEC              _PR_UNIX_TicksPerSecond
-extern PRIntervalTime _PR_UNIX_TicksPerSecond(void);
-
-#define _MD_EARLY_INIT		_MD_EarlyInit
-void _MD_EarlyInit(void);
-#define _MD_FINAL_INIT		_PR_UnixInit
-#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu)
-#define _MD_INIT_THREAD         _MD_InitializeThread
-#ifdef _VMS_NOT_YET
-NSPR_API(void) _PR_InitThreads(
-  PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs);
-#endif
-#define _MD_EXIT_THREAD(thread)
-#define	_MD_SUSPEND_THREAD(thread)
-#define	_MD_RESUME_THREAD(thread)
-#define _MD_CLEAN_THREAD(_thread)
-
-/* The following defines unwrapped versions of select() and poll(). */
-extern int __select (int, fd_set *, fd_set *, fd_set *, struct timeval *);
-#define _MD_SELECT              __select
-
-#ifndef __VMS
-#define _MD_POLL __poll
-extern int __poll(struct pollfd filedes[], unsigned int nfds, int timeout);
-#endif
-
-#ifdef __VMS
-NSPR_API(void) _PR_InitCPUs(void);
-NSPR_API(void) _PR_MD_START_INTERRUPTS(void);
-#endif
-
-/*
- * Atomic operations
- */
-#include <machine/builtins.h>
-#define _PR_HAVE_ATOMIC_OPS
-#define _MD_INIT_ATOMIC()
-#define _MD_ATOMIC_ADD(ptr,val) (__ATOMIC_ADD_LONG(ptr,val) + val)
-#define _MD_ATOMIC_INCREMENT(val) (__ATOMIC_INCREMENT_LONG(val) + 1)
-#define _MD_ATOMIC_DECREMENT(val) (__ATOMIC_DECREMENT_LONG(val) - 1)
-#define _MD_ATOMIC_SET(val, newval) __ATOMIC_EXCH_LONG(val, newval)
-
-extern int thread_suspend(PRThread *thr_id);
-extern int thread_resume(PRThread *thr_id);
-
-#endif /* nspr_openvms_defs_h___ */
--- a/nsprpub/pr/include/md/_pth.h
+++ b/nsprpub/pr/include/md/_pth.h
@@ -141,17 +141,17 @@
 	memset(&(t), 0, sizeof(pthread_t))
 #define _PT_PTHREAD_THR_HANDLE_IS_INVALID(t) \
 	(!memcmp(&(t), &pt_zero_tid, sizeof(pthread_t)))
 #define _PT_PTHREAD_COPY_THR_HANDLE(st, dt)   (dt) = (st)
 #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \
 	|| defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
 	|| defined(HPUX) || defined(FREEBSD) \
 	|| defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \
-	|| defined(VMS) || defined(NTO) || defined(DARWIN) \
+	|| defined(NTO) || defined(DARWIN) \
 	|| defined(UNIXWARE) || defined(RISCOS)	|| defined(SYMBIAN)
 #ifdef __GNU__
 /* Hurd pthreads don't have an invalid value for pthread_t. -- rmh */
 #error Using Hurd pthreads
 #endif
 #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)
@@ -198,22 +198,22 @@
 #endif
 
 /*
  * These platforms don't have sigtimedwait()
  */
 #if (defined(AIX) && !defined(AIX4_3_PLUS)) \
 	|| defined(LINUX) || defined(__GNU__)|| defined(__GLIBC__) \
 	|| defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
-	|| defined(BSDI) || defined(VMS) || defined(UNIXWARE) \
+	|| defined(BSDI) || defined(UNIXWARE) \
 	|| defined(DARWIN) || defined(SYMBIAN)
 #define PT_NO_SIGTIMEDWAIT
 #endif
 
-#if defined(OSF1) || defined(VMS)
+#if defined(OSF1)
 #define PT_PRIO_MIN            PRI_OTHER_MIN
 #define PT_PRIO_MAX            PRI_OTHER_MAX
 #elif defined(IRIX)
 #include <sys/sched.h>
 #define PT_PRIO_MIN            PX_PRIO_MIN
 #define PT_PRIO_MAX            PX_PRIO_MAX
 #elif defined(AIX)
 #include <sys/priv.h>
@@ -269,17 +269,17 @@
 
 /*
  * The _PT_PTHREAD_YIELD function is called from a signal handler.
  * Needed for garbage collection -- Look at PR_Suspend/PR_Resume
  * implementation.
  */
 #if defined(_PR_DCETHREADS)
 #define _PT_PTHREAD_YIELD()            	pthread_yield()
-#elif defined(OSF1) || defined(VMS)
+#elif defined(OSF1)
 /*
  * sched_yield can't be called from a signal handler.  Must use
  * the _np version.
  */
 #define _PT_PTHREAD_YIELD()            	pthread_yield_np()
 #elif defined(AIX)
 extern int (*_PT_aix_yield_fcn)();
 #define _PT_PTHREAD_YIELD()			(*_PT_aix_yield_fcn)()
--- a/nsprpub/pr/include/md/_unixos.h
+++ b/nsprpub/pr/include/md/_unixos.h
@@ -611,21 +611,17 @@ typedef off_t _MDOff64_t;
 typedef struct stat _MDStat64;
 typedef PRInt64 _MDOff64_t;
 #else
 #error "I don't know yet"
 #endif
 
 typedef PRIntn (*_MD_Fstat64)(PRIntn osfd, _MDStat64 *buf);
 typedef PRIntn (*_MD_Open64)(const char *path, int oflag, ...);
-#if defined(VMS)
-typedef PRIntn (*_MD_Stat64)(const char *path, _MDStat64 *buf, ...);
-#else
 typedef PRIntn (*_MD_Stat64)(const char *path, _MDStat64 *buf);
-#endif
 typedef _MDOff64_t (*_MD_Lseek64)(PRIntn osfd, _MDOff64_t, PRIntn whence);
 typedef void* (*_MD_Mmap64)(
     void *addr, PRSize len, PRIntn prot, PRIntn flags,
     PRIntn fildes, _MDOff64_t offset);
 struct _MD_IOVector
 {
     _MD_Open64 _open64;
     _MD_Mmap64 _mmap64;
--- a/nsprpub/pr/include/md/prosdep.h
+++ b/nsprpub/pr/include/md/prosdep.h
@@ -121,19 +121,16 @@ PR_BEGIN_EXTERN_C
 #include "md/_ncr.h"
 
 #elif defined(DGUX)
 #include "md/_dgux.h"
 
 #elif defined(QNX)
 #include "md/_qnx.h"
 
-#elif defined(VMS)
-#include "md/_openvms.h"
-
 #elif defined(NTO)
 #include "md/_nto.h"
 
 #elif defined(RISCOS)
 #include "md/_riscos.h"
 
 #elif defined(SYMBIAN)
 #include "md/_symbian.h"
--- a/nsprpub/pr/include/obsolete/probslet.h
+++ b/nsprpub/pr/include/obsolete/probslet.h
@@ -164,21 +164,17 @@ NSPR_API(PRInt32)     PR_FD_NISSET(PROsf
 ** declared here for historical reasons.
 */
 
 NSPR_API(PRInt32) PR_GetSysfdTableMax(void);
 
 NSPR_API(PRInt32) PR_SetSysfdTableSize(PRIntn table_size);
 
 #ifndef NO_NSPR_10_SUPPORT
-#ifdef XP_MAC
-#include <stat.h>
-#else
 #include <sys/stat.h>
-#endif
 
 NSPR_API(PRInt32) PR_Stat(const char *path, struct stat *buf);
 #endif /* NO_NSPR_10_SUPPORT */
 
 PR_END_EXTERN_C
 
 #endif /* defined(PROBSLET_H) */
 
--- a/nsprpub/pr/include/obsolete/protypes.h
+++ b/nsprpub/pr/include/obsolete/protypes.h
@@ -63,25 +63,16 @@ typedef PRIntn intn;
  * BeOS defines all the int types below in its standard header
  * file SupportDefs.h.
  */
 #ifdef XP_BEOS
 #include <support/SupportDefs.h>
 #endif
 
 /*
- * OpenVMS defines all the int types below in its standard
- * header files ints.h and types.h.
- */
-#ifdef VMS
-#include <ints.h>
-#include <types.h>
-#endif
-
-/*
  * SVR4 typedef of uint is commonly found on UNIX machines.
  *
  * On AIX 4.3, sys/inttypes.h (which is included by sys/types.h)
  * defines the types int8, int16, int32, and int64.
  */
 #ifdef XP_UNIX
 #include <sys/types.h>
 #endif
@@ -90,96 +81,91 @@ typedef PRIntn intn;
 #ifdef HPUX
 #include <model.h>
 #endif
 
 /*
  * uint
  */
 
-#if !defined(XP_BEOS) && !defined(VMS) \
-    && !defined(XP_UNIX) || defined(NTO)
+#if !defined(XP_BEOS) && !defined(XP_UNIX) || defined(NTO)
 typedef PRUintn uint;
 #endif
 
 /*
  * uint64
  */
 
-#if !defined(XP_BEOS) && !defined(VMS)
+#if !defined(XP_BEOS)
 typedef PRUint64 uint64;
 #endif
 
 /*
  * uint32
  */
 
-#if !defined(XP_BEOS) && !defined(VMS)
-#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
+#if !defined(XP_BEOS)
+#if !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
 typedef PRUint32 uint32;
 #else
 typedef unsigned long uint32;
 #endif
 #endif
 
 /*
  * uint16
  */
 
-#if !defined(XP_BEOS) && !defined(VMS)
+#if !defined(XP_BEOS)
 typedef PRUint16 uint16;
 #endif
 
 /*
  * uint8
  */
 
-#if !defined(XP_BEOS) && !defined(VMS)
+#if !defined(XP_BEOS)
 typedef PRUint8 uint8;
 #endif
 
 /*
  * int64
  */
 
-#if !defined(XP_BEOS) && !defined(VMS) \
-    && !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
+#if !defined(XP_BEOS) && !defined(_PR_AIX_HAVE_BSD_INT_TYPES)
 typedef PRInt64 int64;
 #endif
 
 /*
  * int32
  */
 
-#if !defined(XP_BEOS) && !defined(VMS) \
-    && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
+#if !defined(XP_BEOS) && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
     && !defined(HPUX)
-#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
+#if !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
 typedef PRInt32 int32;
 #else
 typedef long int32;
 #endif
 #endif
 
 /*
  * int16
  */
 
-#if !defined(XP_BEOS) && !defined(VMS) \
-    && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
+#if !defined(XP_BEOS) && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
     && !defined(HPUX)
 typedef PRInt16 int16;
 #endif
 
 /*
  * int8
  */
 
-#if !defined(XP_BEOS) && !defined(VMS) \
-    && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
+#if !defined(XP_BEOS) && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
     && !defined(HPUX)
 typedef PRInt8 int8;
 #endif
 
 typedef PRFloat64 float64;
 typedef PRUptrdiff uptrdiff_t;
 typedef PRUword uprword_t;
 typedef PRWord prword_t;
@@ -235,18 +221,9 @@ typedef PRWord prword_t;
 #define PR_HashTableRemove PL_HashTableRemove
 #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
 #define PR_HashTableLookup PL_HashTableLookup
 #define PR_HashTableDump PL_HashTableDump
 #define PR_HashString PL_HashString
 #define PR_CompareStrings PL_CompareStrings
 #define PR_CompareValues PL_CompareValues
 
-#if defined(XP_MAC)
-#ifndef TRUE				/* Mac standard is lower case true */
-	#define TRUE 1
-#endif
-#ifndef FALSE				/* Mac standard is lower case false */
-	#define FALSE 0
-#endif
-#endif
-
 #endif /* !defined(PROTYPES_H) */
--- a/nsprpub/pr/include/prenv.h
+++ b/nsprpub/pr/include/prenv.h
@@ -140,18 +140,11 @@ NSPR_API(char*) PR_GetEnv(const char *va
 ** Restrictions: 
 **   See the Restrictions documented in the description of
 **   PR_GetEnv() in this header file.
 ** 
 ** 
 */
 NSPR_API(PRStatus) PR_SetEnv(const char *string);
 
-/*
-** DEPRECATED.  Use PR_SetEnv() instead.
-*/
-#ifdef XP_MAC
-NSPR_API(PRIntn) PR_PutEnv(const char *string);
-#endif
-
 PR_END_EXTERN_C
 
 #endif /* prenv_h___ */
--- a/nsprpub/pr/include/prinet.h
+++ b/nsprpub/pr/include/prinet.h
@@ -37,18 +37,17 @@
 
 /*
  * File:		prinet.h
  * Description:
  *     Header file used to find the system header files for socket support[1].
  *     This file serves the following purposes:
  *     - A cross-platform, "get-everything" socket header file.  On
  *       Unix, socket support is scattered in several header files,
- *       while Windows and Mac have a "get-everything" socket header
- *       file[2].
+ *       while Windows has a "get-everything" socket header file[2].
  *     - NSPR needs the following macro definitions and function
  *       prototype declarations from these header files:
  *           AF_INET
  *           INADDR_ANY, INADDR_LOOPBACK, INADDR_BROADCAST
  *           ntohl(), ntohs(), htonl(), ntons().
  *       NSPR does not define its own versions of these macros and
  *       functions.  It simply uses the native versions, which have
  *       the same names on all supported platforms.
--- a/nsprpub/pr/include/prinit.h
+++ b/nsprpub/pr/include/prinit.h
@@ -58,17 +58,17 @@ PR_BEGIN_EXTERN_C
 /*
 ** NSPR's version is used to determine the likelihood that the version you
 ** used to build your component is anywhere close to being compatible with
 ** what is in the underlying library.
 **
 ** The format of the version string is
 **     "<major version>.<minor version>[.<patch level>] [<Beta>]"
 */
-#define PR_VERSION  "4.8 Beta"
+#define PR_VERSION  "4.8 Beta 1"
 #define PR_VMAJOR   4
 #define PR_VMINOR   8
 #define PR_VPATCH   0
 #define PR_BETA     PR_TRUE
 
 /*
 ** PRVersionCheck
 **
--- a/nsprpub/pr/include/private/pprio.h
+++ b/nsprpub/pr/include/private/pprio.h
@@ -264,20 +264,11 @@ NSPR_API(void) PR_NTFast_UpdateAcceptCon
 ** DESCRIPTION:
 **    Cancel IO operations on fd.
 */
 NSPR_API(PRStatus) PR_NT_CancelIo(PRFileDesc *fd);
 
 
 #endif /* WIN32 */
 
-/*
-** Need external access to this on Mac so we can first set up our faux
-** environment vars
-*/
-#ifdef XP_MAC
-NSPR_API(void) PR_Init_Log(void);
-#endif
-
-
 PR_END_EXTERN_C
 
 #endif /* pprio_h___ */
--- a/nsprpub/pr/include/private/pprthred.h
+++ b/nsprpub/pr/include/private/pprthred.h
@@ -308,26 +308,16 @@ NSPR_API(PRIntn) PR_GetMonitorEntryCount
 
 /*
 ** Just like PR_CEnterMonitor except that if the monitor is owned by
 ** another thread NULL is returned.
 */
 NSPR_API(PRMonitor*) PR_CTestAndEnterMonitor(void *address);
 
 /*---------------------------------------------------------------------------
-** PLATFORM-SPECIFIC THREAD SYNCHRONIZATION FUNCTIONS
----------------------------------------------------------------------------*/
-#if defined(XP_MAC)
-
-NSPR_API(void) PR_Mac_WaitForAsyncNotify(PRIntervalTime timeout);
-NSPR_API(void) PR_Mac_PostAsyncNotify(PRThread *thread);
-
-#endif /* XP_MAC */
-
-/*---------------------------------------------------------------------------
 ** PLATFORM-SPECIFIC INITIALIZATION FUNCTIONS
 ---------------------------------------------------------------------------*/
 #if defined(IRIX)
 /*
 ** Irix specific initialization funtion to be called before PR_Init
 ** is called by the application. Sets the CONF_INITUSERS and CONF_INITSIZE
 ** attributes of the shared arena set up by nspr.
 **
--- a/nsprpub/pr/include/private/primpl.h
+++ b/nsprpub/pr/include/private/primpl.h
@@ -68,23 +68,18 @@
 #endif
 #endif /* WIN32 */
 
 #include "nspr.h"
 #include "prpriv.h"
 
 typedef struct PRSegment PRSegment;
 
-#ifdef XP_MAC
-#include "prosdep.h"
-#include "probslet.h"
-#else
 #include "md/prosdep.h"
 #include "obsolete/probslet.h"
-#endif  /* XP_MAC */
 
 #ifdef _PR_HAVE_POSIX_SEMAPHORES
 #include <semaphore.h>
 #elif defined(_PR_HAVE_SYSV_SEMAPHORES)
 #include <sys/sem.h>
 #endif
 
 /*************************************************************************
@@ -323,20 +318,18 @@ NSPR_API(PRInt32)                      _
 
 #define _MD_CURRENT_CPU()               (_pr_currentCPU)
 #define _MD_SET_CURRENT_CPU(_cpu)       (_pr_currentCPU = (_cpu))
 #define _MD_CURRENT_THREAD()            (_pr_currentThread)
 #define _MD_SET_CURRENT_THREAD(_thread) (_pr_currentThread = (_thread))
 #define _MD_LAST_THREAD()               (_pr_lastThread)
 #define _MD_SET_LAST_THREAD(t)          (_pr_lastThread = t)
 
-#ifndef XP_MAC
 #define _MD_GET_INTSOFF()               (_pr_intsOff)
 #define _MD_SET_INTSOFF(_val)           (_pr_intsOff = _val)
-#endif
 
 
 /* The unbalanced curly braces in these two macros are intentional */
 #define _PR_LOCK_HEAP() { PRIntn _is; if (_pr_currentCPU) _PR_INTSOFF(_is);
 #define _PR_UNLOCK_HEAP() if (_pr_currentCPU) _PR_INTSON(_is); }
 
 #endif /* _PR_LOCAL_THREADS_ONLY */
 
@@ -371,30 +364,22 @@ extern PRInt32                  _native_
 
 #define _PR_THREAD_SWITCH_CPU(_thread, _newCPU)
 
 #define _PR_IS_NATIVE_THREAD(thread) 1
 #define _PR_IS_NATIVE_THREAD_SUPPORTED() 1
 
 #else
 
-#ifdef XP_MAC
-
-#define _PR_INTSOFF(_is)        _MD_INTSOFF(_is)
-
-#else /* XP_MAC */
-
 #define _PR_INTSOFF(_is) \
     PR_BEGIN_MACRO \
         (_is) = _PR_MD_GET_INTSOFF(); \
         _PR_MD_SET_INTSOFF(1); \
     PR_END_MACRO
 
-#endif /* XP_MAC */
-
 #define _PR_FAST_INTSON(_is) \
     PR_BEGIN_MACRO \
         _PR_MD_SET_INTSOFF(_is); \
     PR_END_MACRO
 
 #define _PR_INTSON(_is) \
     PR_BEGIN_MACRO \
         if ((_is == 0) && (_PR_MD_CURRENT_CPU())->u.bits) \
@@ -1086,21 +1071,16 @@ extern PRStatus _PR_MD_CLOSE_SEMAPHORE(P
 
 extern PRStatus _PR_MD_DELETE_SEMAPHORE(const char *osname);
 #define    _PR_MD_DELETE_SEMAPHORE _MD_DELETE_SEMAPHORE
 
 /* I/O related */
 extern void _PR_MD_INIT_FILEDESC(PRFileDesc *fd);
 #define    _PR_MD_INIT_FILEDESC _MD_INIT_FILEDESC
 
-#ifdef XP_MAC
-extern void _PR_MD_FREE_FILEDESC(PRFileDesc *fd);
-#define    _PR_MD_FREE_FILEDESC _MD_FREE_FILEDESC
-#endif
-
 extern void _PR_MD_MAKE_NONBLOCK(PRFileDesc *fd);
 #define    _PR_MD_MAKE_NONBLOCK _MD_MAKE_NONBLOCK
 
 /* File I/O related */
 extern PROsfd _PR_MD_OPEN(const char *name, PRIntn osflags, PRIntn mode);
 #define    _PR_MD_OPEN _MD_OPEN
 
 extern PROsfd _PR_MD_OPEN_FILE(const char *name, PRIntn osflags, PRIntn mode);
--- a/nsprpub/pr/include/private/prpriv.h
+++ b/nsprpub/pr/include/private/prpriv.h
@@ -37,17 +37,12 @@
 
 #ifndef prpriv_h___
 #define prpriv_h___
 
 /*
  * NSPR 2.0 Private API
  */
 
-#ifndef XP_MAC
 #include "private/pprio.h"
 #include "private/pprthred.h"
-#else
-#include "pprio.h"
-#include "pprthred.h"
-#endif
 
 #endif /* prpriv_h___ */
--- a/nsprpub/pr/include/prlink.h
+++ b/nsprpub/pr/include/prlink.h
@@ -102,40 +102,40 @@ NSPR_API(void) PR_FreeLibraryName(char *
 **
 ** This increments the reference count of the library.
 */
 NSPR_API(PRLibrary*) PR_LoadLibrary(const char *name);
 
 /*
 ** Each operating system has its preferred way of specifying
 ** a file in the file system.  Most operating systems use
-** a pathname.  Mac OS, on the other hand, uses the FSSpec
+** a pathname.  Mac OS Classic, on the other hand, uses the FSSpec
 ** structure to specify a file. PRLibSpec allows NSPR clients
 ** to use the type of file specification that is most efficient
 ** for a particular platform.
 **
-** On some operating systems such as Mac OS, a shared library may
-** contain code fragments that can be individually loaded.
+** On some operating systems such as Mac OS Classic, a shared library
+** may contain code fragments that can be individually loaded.
 ** PRLibSpec also allows NSPR clients to identify a code fragment
 ** in a library, if code fragments are supported by the OS.
 ** A code fragment can be specified by name or by an integer index.
 **
 ** Right now PRLibSpec supports four types of library specification:
 ** a pathname in the native character encoding, a Mac code fragment
 ** by name, a Mac code fragment by index, and a UTF-16 pathname.
 */
 
 typedef enum PRLibSpecType {
     PR_LibSpec_Pathname,
     PR_LibSpec_MacNamedFragment,   /* obsolete (for Mac OS Classic) */
     PR_LibSpec_MacIndexedFragment, /* obsolete (for Mac OS Classic) */
     PR_LibSpec_PathnameU           /* supported only on Win32 */ 
 } PRLibSpecType;
 
-struct FSSpec; /* Mac OS FSSpec */
+struct FSSpec; /* Mac OS Classic FSSpec */
 
 typedef struct PRLibSpec {
     PRLibSpecType type;
     union {
         /* if type is PR_LibSpec_Pathname */
         const char *pathname;
 
         /* if type is PR_LibSpec_MacNamedFragment */
--- a/nsprpub/pr/include/prtypes.h
+++ b/nsprpub/pr/include/prtypes.h
@@ -107,32 +107,16 @@
 #define PR_IMPLEMENT(__type) __declspec(dllexport) __type
 #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
 #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
 
 #define PR_CALLBACK
 #define PR_CALLBACK_DECL
 #define PR_STATIC_CALLBACK(__x) static __x
 
-#elif defined(XP_MAC)
-
-#define PR_EXPORT(__type) extern __declspec(export) __type
-#define PR_EXPORT_DATA(__type) extern __declspec(export) __type
-#define PR_IMPORT(__type) extern __declspec(export) __type
-#define PR_IMPORT_DATA(__type) extern __declspec(export) __type
-
-#define PR_EXTERN(__type) extern __declspec(export) __type
-#define PR_IMPLEMENT(__type) __declspec(export) __type
-#define PR_EXTERN_DATA(__type) extern __declspec(export) __type
-#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type
-
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
 #elif defined(XP_OS2) && defined(__declspec)
 
 #define PR_EXPORT(__type) extern __declspec(dllexport) __type
 #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
 #define PR_IMPORT(__type) extern  __declspec(dllimport) __type
 #define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type
 
 #define PR_EXTERN(__type) extern __declspec(dllexport) __type
@@ -463,17 +447,17 @@ typedef PRUint8 PRPackedBool;
 /*
 ** Status code used by some routines that have a single point of failure or 
 ** special status return.
 */
 typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
 
 #ifndef __PRUNICHAR__
 #define __PRUNICHAR__
-#if defined(WIN32) || defined(XP_MAC)
+#ifdef WIN32
 typedef wchar_t PRUnichar;
 #else
 typedef PRUint16 PRUnichar;
 #endif
 #endif
 
 /*
 ** WARNING: The undocumented data types PRWord and PRUword are
@@ -525,21 +509,17 @@ typedef unsigned long PRUword;
 #ifdef __cplusplus
 #define NSPR_BEGIN_EXTERN_C     extern "C" {
 #define NSPR_END_EXTERN_C       }
 #else
 #define NSPR_BEGIN_EXTERN_C
 #define NSPR_END_EXTERN_C
 #endif
 
-#ifdef XP_MAC
-#include "protypes.h"
-#else
 #include "obsolete/protypes.h"
-#endif
 
 /********* ????????????? End Fix me ?????????????????????????????? *****/
 #endif /* NO_NSPR_10_SUPPORT */
 
 PR_END_EXTERN_C
 
 #endif /* prtypes_h___ */
 
--- a/nsprpub/pr/src/io/prfile.c
+++ b/nsprpub/pr/src/io/prfile.c
@@ -127,19 +127,16 @@ static PROffset32 PR_CALLBACK FileSeek(P
     PROffset32 result;
 
     result = _PR_MD_LSEEK(fd, offset, whence);
     return result;
 }
 
 static PROffset64 PR_CALLBACK FileSeek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence whence)
 {
-#ifdef XP_MAC
-#pragma unused( fd, offset, whence )
-#endif
     PROffset64 result;
 
     result = _PR_MD_LSEEK64(fd, offset, whence);
     return result;
 }
 
 static PRInt32 PR_CALLBACK FileAvailable(PRFileDesc *fd)
 {
@@ -157,19 +154,16 @@ static PRInt32 PR_CALLBACK FileAvailable
     result = end - cur;
     _PR_MD_LSEEK(fd, cur, PR_SEEK_SET);
 
     return result;
 }
 
 static PRInt64 PR_CALLBACK FileAvailable64(PRFileDesc *fd)
 {
-#ifdef XP_MAC
-#pragma unused( fd )
-#endif
     PRInt64 result, cur, end;
     PRInt64 minus_one;
 
     LL_I2L(minus_one, -1);
     cur = _PR_MD_LSEEK64(fd, LL_ZERO, PR_SEEK_CUR);
 
     if (LL_GE_ZERO(cur))
     	end = _PR_MD_LSEEK64(fd, LL_ZERO, PR_SEEK_END);
@@ -193,39 +187,32 @@ static PRInt64 PR_CALLBACK PipeAvailable
 {
     PRInt64 rv;
     LL_I2L(rv, _PR_MD_PIPEAVAILABLE(fd));
 	return rv;		
 }
 
 static PRStatus PR_CALLBACK PipeSync(PRFileDesc *fd)
 {
-#if defined(XP_MAC)
-#pragma unused (fd)
-#endif
-
 	return PR_SUCCESS;
 }
 
 static PRStatus PR_CALLBACK FileGetInfo(PRFileDesc *fd, PRFileInfo *info)
 {
 	PRInt32 rv;
 
     rv = _PR_MD_GETOPENFILEINFO(fd, info);
     if (rv < 0) {
 	return PR_FAILURE;
     } else
 	return PR_SUCCESS;
 }
 
 static PRStatus PR_CALLBACK FileGetInfo64(PRFileDesc *fd, PRFileInfo64 *info)
 {
-#ifdef XP_MAC
-#pragma unused( fd, info )
-#endif
     /* $$$$ NOT YET IMPLEMENTED */
 	PRInt32 rv;
 
     rv = _PR_MD_GETOPENFILEINFO64(fd, info);
     if (rv < 0) return PR_FAILURE;
     else return PR_SUCCESS;
 }
 
@@ -256,19 +243,16 @@ static PRStatus PR_CALLBACK FileClose(PR
     }
     PR_FreeFileDesc(fd);
     return PR_SUCCESS;
 }
 
 static PRInt16 PR_CALLBACK FilePoll(
     PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)
 {
-#ifdef XP_MAC
-#pragma unused( fd, in_flags )
-#endif
     *out_flags = 0;
     return in_flags;
 }  /* FilePoll */
 
 static PRIOMethods _pr_fileMethods = {
     PR_DESC_FILE,
     FileClose,
     FileRead,
@@ -431,17 +415,17 @@ PR_IMPLEMENT(PRInt32) PR_GetSysfdTableMa
     return 16384;
 #elif defined (WIN16)
     return FOPEN_MAX;
 #elif defined(XP_OS2)
     ULONG ulReqCount = 0;
     ULONG ulCurMaxFH = 0;
     DosSetRelMaxFH(&ulReqCount, &ulCurMaxFH);
     return ulCurMaxFH;
-#elif defined (XP_MAC) || defined(XP_BEOS)
+#elif defined(XP_BEOS)
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
    return -1;
 #else
     write me;
 #endif
 }
 
 PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(int table_size)
@@ -480,20 +464,16 @@ PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSi
       else
         return -1;
     } 
     return tableMax;
 #elif defined(AIX) || defined(NEXTSTEP) || defined(QNX) \
         || defined(WIN32) || defined(WIN16) || defined(XP_BEOS)
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return -1;
-#elif defined (XP_MAC)
-#pragma unused (table_size)
-    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
-   return -1;
 #else
     write me;
 #endif
 }
 
 PR_IMPLEMENT(PRStatus) PR_Delete(const char *name)
 {
 	PRInt32 rv;
@@ -513,19 +493,16 @@ PR_IMPLEMENT(PRStatus) PR_GetFileInfo(co
 	if (rv < 0) {
 		return PR_FAILURE;
 	} else
 		return PR_SUCCESS;
 }
 
 PR_IMPLEMENT(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info)
 {
-#ifdef XP_MAC
-#pragma unused (fn, info)
-#endif
     PRInt32 rv;
 
     if (!_pr_initialized) _PR_ImplicitInitialization();
     rv = _PR_MD_GETFILEINFO64(fn, info);
     if (rv < 0) {
         return PR_FAILURE;
     } else {
         return PR_SUCCESS;
@@ -710,20 +687,16 @@ PR_IMPLEMENT(PRStatus) PR_UnlockFile(PRF
     return rv;
 }
 
 PR_IMPLEMENT(PRStatus) PR_CreatePipe(
     PRFileDesc **readPipe,
     PRFileDesc **writePipe
 )
 {
-#if defined(XP_MAC)
-#pragma unused (readPipe, writePipe)
-#endif
-
 #if defined(WIN32) && !defined(WINCE)
     HANDLE readEnd, writeEnd;
     SECURITY_ATTRIBUTES pipeAttributes;
 
     if (!_pr_initialized) _PR_ImplicitInitialization();
 
     ZeroMemory(&pipeAttributes, sizeof(pipeAttributes));
     pipeAttributes.nLength = sizeof(pipeAttributes);
@@ -822,19 +795,16 @@ PR_IMPLEMENT(PRFileDesc*) PR_OpenFileUTF
             _PR_MD_INIT_FD_INHERITABLE(fd, PR_FALSE);
         }
     }
     return fd;
 }
  
 PR_IMPLEMENT(PRStatus) PR_GetFileInfo64UTF16(const PRUnichar *fn, PRFileInfo64 *info)
 {
-#ifdef XP_MAC
-#pragma unused (fn, info)
-#endif
     PRInt32 rv;
 
     if (!_pr_initialized) _PR_ImplicitInitialization();
     rv = _PR_MD_GETFILEINFO64_UTF16(fn, info);
     if (rv < 0) {
         return PR_FAILURE;
     } else {
         return PR_SUCCESS;
--- a/nsprpub/pr/src/io/prio.c
+++ b/nsprpub/pr/src/io/prio.c
@@ -157,19 +157,16 @@ PR_IMPLEMENT(PRFileDesc*) PR_AllocFileDe
     }
 
     return fd;
 }
 
 PR_IMPLEMENT(void) PR_FreeFileDesc(PRFileDesc *fd)
 {
     PR_ASSERT(fd);
-#ifdef XP_MAC
-	_PR_MD_FREE_FILEDESC(fd);
-#endif
     _PR_Putfd(fd);
 }
 
 /*
 ** Wait for some i/o to finish on one or more more poll descriptors.
 */
 PR_IMPLEMENT(PRInt32) PR_Poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
 {
@@ -195,19 +192,16 @@ PR_IMPLEMENT(PRStatus) PR_SetFDInheritab
     if (fd->secret->inheritable != inheritable) {
         if (_PR_MD_SET_FD_INHERITABLE(fd, inheritable) == PR_FAILURE) {
             return PR_FAILURE;
         }
         fd->secret->inheritable = inheritable;
     }
     return PR_SUCCESS;
 #else
-#ifdef XP_MAC
-#pragma unused (fd, inheritable)
-#endif
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return PR_FAILURE;
 #endif
 }
 
 /*
 ** This function only has a useful implementation in the debug build of
 ** the pthreads version.
--- a/nsprpub/pr/src/io/prlog.c
+++ b/nsprpub/pr/src/io/prlog.c
@@ -123,34 +123,33 @@ static void OutputDebugStringA(const cha
         fwrite(buf, 1, nb, fd); \
         fflush(fd); \
     } \
     PR_END_MACRO
 #elif defined(_PR_USE_STDIO_FOR_LOGGING)
 #define _PUT_LOG(fd, buf, nb) {fwrite(buf, 1, nb, fd); fflush(fd);}
 #elif defined(_PR_PTHREADS)
 #define _PUT_LOG(fd, buf, nb) PR_Write(fd, buf, nb)
-#elif defined(XP_MAC)
-#define _PUT_LOG(fd, buf, nb) _PR_MD_WRITE_SYNC(fd, buf, nb)
 #else
 #define _PUT_LOG(fd, buf, nb) _PR_MD_WRITE(fd, buf, nb)
 #endif
 
 /************************************************************************/
 
 static PRLogModuleInfo *logModules;
 
 static char *logBuf = NULL;
 static char *logp;
 static char *logEndp;
 #ifdef _PR_USE_STDIO_FOR_LOGGING
 static FILE *logFile = NULL;
 #else
 static PRFileDesc *logFile = 0;
 #endif
+static PRBool outputTimeStamp = PR_FALSE;
 
 #define LINE_BUF_SIZE           512
 #define DEFAULT_BUF_SIZE        16384
 
 #ifdef _PR_NEED_STRCASECMP
 
 /*
  * strcasecmp is defined in /usr/ucblib/libucb.a on some platforms
@@ -226,16 +225,18 @@ void _PR_InitLog(void)
             ** == 1, then level defaults to 1 (module enabled).
             */
             if (strcasecmp(module, "sync") == 0) {
                 isSync = PR_TRUE;
             } else if (strcasecmp(module, "bufsize") == 0) {
                 if (level >= LINE_BUF_SIZE) {
                     bufSize = level;
                 }
+            } else if (strcasecmp(module, "__timestamp") == 0) {
+                outputTimeStamp = PR_TRUE;
             } else {
                 PRLogModuleInfo *lm = logModules;
                 PRBool skip_modcheck =
                     (0 == strcasecmp (module, "all")) ? PR_TRUE : PR_FALSE;
 
                 while (lm != NULL) {
                     if (skip_modcheck) lm -> level = (PRLogModuleLevel)level;
                     else if (strcasecmp(module, lm->name) == 0) {
@@ -291,24 +292,23 @@ void _PR_LogCleanup(void)
     if (logFile
         && logFile != stdout
         && logFile != stderr
 #ifdef XP_PC
         && logFile != WIN32_DEBUG_FILE
 #endif
         ) {
         fclose(logFile);
-        logFile = NULL;
     }
 #else
     if (logFile && logFile != _pr_stdout && logFile != _pr_stderr) {
         PR_Close(logFile);
-        logFile = NULL;
     }
 #endif
+    logFile = NULL;
 
     if (logBuf)
         PR_DELETE(logBuf);
 
     while (lm != NULL) {
         PRLogModuleInfo *next = lm->next;
         free((/*const*/ char *)lm->name);
         PR_Free(lm);
@@ -414,19 +414,16 @@ PR_IMPLEMENT(PRBool) PR_SetLogFile(const
     PRFileDesc *newLogFile;
 
     newLogFile = PR_Open(file, PR_WRONLY|PR_CREATE_FILE|PR_TRUNCATE, 0666);
     if (newLogFile) {
         if (logFile && logFile != _pr_stdout && logFile != _pr_stderr) {
             PR_Close(logFile);
         }
         logFile = newLogFile;
-#if defined(XP_MAC)
-        SetLogFileTypeCreator(file);
-#endif
     }
     return (PRBool) (newLogFile != 0);
 #endif /* _PR_USE_STDIO_FOR_LOGGING */
 }
 
 PR_IMPLEMENT(void) PR_SetLogBuffering(PRIntn buffer_size)
 {
     PR_LogFlush();
@@ -440,36 +437,38 @@ PR_IMPLEMENT(void) PR_SetLogBuffering(PR
     }
 }
 
 PR_IMPLEMENT(void) PR_LogPrint(const char *fmt, ...)
 {
     va_list ap;
     char line[LINE_BUF_SIZE];
     char *line_long = NULL;
-    PRUint32 nb_tid, nb;
+    PRUint32 nb_tid = 0, nb;
     PRThread *me;
+    PRExplodedTime now;
 
     if (!_pr_initialized) _PR_ImplicitInitialization();
 
     if (!logFile) {
         return;
     }
 
+    if (outputTimeStamp) {
+        PR_ExplodeTime(PR_Now(), PR_LocalTimeParameters, &now);
+        nb_tid = PR_FormatTimeUSEnglish(line, sizeof(line)-1,
+                                        "%Y-%m-%d %H:%M:%S - ", &now);
+    }
+
     me = PR_GetCurrentThread();
-    nb_tid = PR_snprintf(line, sizeof(line)-1, "%ld[%p]: ",
-#if defined(_PR_DCETHREADS)
-             /* The problem is that for _PR_DCETHREADS, pthread_t is not a 
-              * pointer, but a structure; so you can't easily print it...
-              */
-                         me ? &(me->id): 0L, me);
-#elif defined(_PR_BTHREADS)
-                         me, me);
+    nb_tid += PR_snprintf(line+nb_tid, sizeof(line)-nb_tid-1, "%ld[%p]: ",
+#if defined(_PR_BTHREADS)
+                          me, me);
 #else
-                         me ? me->id : 0L, me);
+                          me ? me->id : 0L, me);
 #endif
 
     va_start(ap, fmt);
     nb = nb_tid + PR_vsnprintf(line+nb_tid, sizeof(line)-nb_tid-1, fmt, ap);
     va_end(ap);
 
     /*
      * Check if we might have run out of buffer space (in case we have a
@@ -484,17 +483,20 @@ PR_IMPLEMENT(void) PR_LogPrint(const cha
 
     if (line_long) {
         nb = strlen(line_long);
         _PR_LOCK_LOG();
         if (logBuf != 0) {
             _PUT_LOG(logFile, logBuf, logp - logBuf);
             logp = logBuf;
         }
-        /* Write out the thread id and the malloc'ed buffer. */
+        /*
+         * Write out the thread id (with an optional timestamp) and the
+         * malloc'ed buffer.
+         */
         _PUT_LOG(logFile, line, nb_tid);
         _PUT_LOG(logFile, line_long, nb);
         /* Ensure there is a trailing newline. */
         if (!nb || (line_long[nb-1] != '\n')) {
             char eol[2];
             eol[0] = '\n';
             eol[1] = '\0';
             _PUT_LOG(logFile, eol, 1);
@@ -544,28 +546,16 @@ PR_IMPLEMENT(void) PR_Abort(void)
 }
 
 PR_IMPLEMENT(void) PR_Assert(const char *s, const char *file, PRIntn ln)
 {
     PR_LogPrint("Assertion failure: %s, at %s:%d\n", s, file, ln);
 #if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
     fprintf(stderr, "Assertion failure: %s, at %s:%d\n", s, file, ln);
 #endif
-#ifdef XP_MAC
-    dprintf("Assertion failure: %s, at %s:%d\n", s, file, ln);
-#endif
 #ifdef WIN32
     DebugBreak();
 #endif
 #ifdef XP_OS2
     asm("int $3");
 #endif
-#ifndef XP_MAC
     abort();
-#endif
 }
-
-#ifdef XP_MAC
-PR_IMPLEMENT(void) PR_Init_Log(void)
-{
-	_PR_InitLog();
-}
-#endif
--- a/nsprpub/pr/src/io/prmapopt.c
+++ b/nsprpub/pr/src/io/prmapopt.c
@@ -363,38 +363,16 @@ PRStatus PR_CALLBACK _PR_SocketSetSocket
  **
  ** Make sure that the following is at the end of this file,
  ** because we will be playing with macro redefines.
  **
  *********************************************************************
  *********************************************************************
  */
 
-#if defined(VMS)
-/*
-** Sad but true. The DEC C header files define the following socket options
-** differently to what UCX is expecting. The values that UCX expects are
-** defined in SYS$LIBRARY:UCX$INETDEF.H. We redefine them here to the values
-** that UCX expects. Note that UCX V4.x will only accept these values while
-** UCX V5.x will accept either. So in theory this hack can be removed once
-** UCX V5 is the minimum.
-*/
-#undef IP_MULTICAST_IF
-#undef IP_MULTICAST_TTL
-#undef IP_MULTICAST_LOOP
-#undef IP_ADD_MEMBERSHIP
-#undef IP_DROP_MEMBERSHIP
-#include <ucx$inetdef.h>
-#define IP_MULTICAST_IF    UCX$C_IP_MULTICAST_IF
-#define IP_MULTICAST_TTL   UCX$C_IP_MULTICAST_TTL
-#define IP_MULTICAST_LOOP  UCX$C_IP_MULTICAST_LOOP
-#define IP_ADD_MEMBERSHIP  UCX$C_IP_ADD_MEMBERSHIP
-#define IP_DROP_MEMBERSHIP UCX$C_IP_DROP_MEMBERSHIP
-#endif
-
 /*
  * Not every platform has all the socket options we want to
  * support.  Some older operating systems such as SunOS 4.1.3
  * don't have the IP multicast socket options.  Win32 doesn't
  * have TCP_MAXSEG.
  *
  * To deal with this problem, we define the missing socket
  * options as _PR_NO_SUCH_SOCKOPT.  _PR_MapOptionName() fails with
--- a/nsprpub/pr/src/io/prmwait.c
+++ b/nsprpub/pr/src/io/prmwait.c
@@ -1270,19 +1270,16 @@ invalid_arg:
 #endif
     PR_Unlock(group->ml);
 
     return recv_wait;
 }  /* PR_CancelWaitGroup */
 
 PR_IMPLEMENT(PRWaitGroup*) PR_CreateWaitGroup(PRInt32 size /* ignored */)
 {
-#ifdef XP_MAC
-#pragma unused (size)
-#endif
     PRWaitGroup *wg;
 
     if (NULL == (wg = PR_NEWZAP(PRWaitGroup)))
     {
         PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
         goto failed;
     }
     /* the wait group itself */
--- a/nsprpub/pr/src/io/prpolevt.c
+++ b/nsprpub/pr/src/io/prpolevt.c
@@ -53,95 +53,16 @@
  */
 
 #include "prinit.h"
 #include "prio.h"
 #include "prmem.h"
 #include "prerror.h"
 #include "prlog.h"
 
-#ifdef VMS
-
-/*
- * On OpenVMS we use an event flag instead of a pipe or a socket since
- * event flags are much more efficient on OpenVMS.
- */
-#include "pprio.h"
-#include <lib$routines.h>
-#include <starlet.h>
-#include <stsdef.h>
-
-PR_IMPLEMENT(PRFileDesc *) PR_NewPollableEvent(void)
-{
-    unsigned int status;
-    int flag = -1;
-    PRFileDesc *event;
-
-    /*
-    ** Allocate an event flag and clear it.
-    */
-    status = lib$get_ef(&flag);
-    if ((!$VMS_STATUS_SUCCESS(status)) || (flag == -1)) {
-        PR_SetError(PR_INSUFFICIENT_RESOURCES_ERROR, status);
-        return NULL;
-    }
-    sys$clref(flag);
-
-    /*
-    ** Give NSPR the event flag's negative value. We do this because our
-    ** select interprets a negative fd as an event flag rather than a
-    ** regular file fd.
-    */
-    event = PR_CreateSocketPollFd(-flag);
-    if (NULL == event) {
-        lib$free_ef(&flag);
-        return NULL;
-    }
-
-    return event;
-}
-
-PR_IMPLEMENT(PRStatus) PR_DestroyPollableEvent(PRFileDesc *event)
-{
-    int flag = -PR_FileDesc2NativeHandle(event);
-    PR_DestroySocketPollFd(event);
-    lib$free_ef(&flag);
-    return PR_SUCCESS;
-}
-
-PR_IMPLEMENT(PRStatus) PR_SetPollableEvent(PRFileDesc *event)
-{
-    /*
-    ** Just set the event flag.
-    */
-    unsigned int status;
-    status = sys$setef(-PR_FileDesc2NativeHandle(event));
-    if (!$VMS_STATUS_SUCCESS(status)) {
-        PR_SetError(PR_INVALID_ARGUMENT_ERROR, status);
-        return PR_FAILURE;
-    }
-    return PR_SUCCESS;
-}
-
-PR_IMPLEMENT(PRStatus) PR_WaitForPollableEvent(PRFileDesc *event)
-{
-    /*
-    ** Just clear the event flag.
-    */
-    unsigned int status;
-    status = sys$clref(-PR_FileDesc2NativeHandle(event));
-    if (!$VMS_STATUS_SUCCESS(status)) {
-        PR_SetError(PR_INVALID_ARGUMENT_ERROR, status);
-        return PR_FAILURE;
-    }
-    return PR_SUCCESS;
-}
-
-#else /* VMS */
-
 /*
  * These internal functions are declared in primpl.h,
  * but we can't include primpl.h because the definition
  * of struct PRFilePrivate in this file (for the pollable
  * event layer) will conflict with the definition of
  * struct PRFilePrivate in primpl.h (for the NSPR layer).
  */
 extern PRIntn _PR_InvalidInt(void);
@@ -334,10 +255,8 @@ PR_IMPLEMENT(PRStatus) PR_WaitForPollabl
      */
     for (i = 0; i < nBytes; i++) {
         PR_ASSERT(buf[i] == magicChar);
     }
 #endif
 
     return PR_SUCCESS;
 }
-
-#endif /* VMS */
--- a/nsprpub/pr/src/io/prsocket.c
+++ b/nsprpub/pr/src/io/prsocket.c
@@ -350,24 +350,16 @@ static PRStatus PR_CALLBACK SocketConnec
 
     err = _MD_os2_get_nonblocking_connect_error(osfd);
     if (err != 0) {
         _PR_MD_MAP_CONNECT_ERROR(err);
         return PR_FAILURE;
     }
     return PR_SUCCESS;
 
-#elif defined(XP_MAC)
-
-    err = _MD_mac_get_nonblocking_connect_error(fd);
-    if (err == -1)
-        return PR_FAILURE;
-	else     
-		return PR_SUCCESS;
-
 #elif defined(XP_BEOS)
 
 #ifdef BONE_VERSION  /* bug 122364 */
     /* temporary workaround until getsockopt(SO_ERROR) works in BONE */
     if (out_flags & PR_POLL_EXCEPT) {
         PR_SetError(PR_CONNECT_REFUSED_ERROR, 0);
         return PR_FAILURE;
     }
@@ -760,20 +752,16 @@ static PRInt64 PR_CALLBACK SocketAvailab
     }
 #endif
     LL_I2L(rv, _PR_MD_SOCKETAVAILABLE(fd));
 	return rv;		
 }
 
 static PRStatus PR_CALLBACK SocketSync(PRFileDesc *fd)
 {
-#if defined(XP_MAC)
-#pragma unused (fd)
-#endif
-
 	return PR_SUCCESS;
 }
 
 static PRInt32 PR_CALLBACK SocketSendTo(
     PRFileDesc *fd, const void *buf, PRInt32 amount,
     PRIntn flags, const PRNetAddr *addr, PRIntervalTime timeout)
 {
 	PRInt32 temp, count;
@@ -1112,19 +1100,16 @@ static PRStatus PR_CALLBACK SocketGetPee
 	PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE);
 	PR_ASSERT(IsValidNetAddrLen(addr, addrlen) == PR_TRUE);
 	return PR_SUCCESS;
 }
 
 static PRInt16 PR_CALLBACK SocketPoll(
     PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)
 {
-#ifdef XP_MAC
-#pragma unused( fd, in_flags )
-#endif
     *out_flags = 0;
     return in_flags;
 }  /* SocketPoll */
 
 static PRIOMethods tcpMethods = {
 	PR_DESC_SOCKET_TCP,
 	SocketClose,
 	SocketRead,
@@ -1679,21 +1664,17 @@ PR_IMPLEMENT(PRInt32) PR_FD_NISSET(PROsf
 		if (set->narray[index] == fd) {
 			return 1;
 		}
 	return 0;
 }
 
 
 #if !defined(NEED_SELECT)
-#if !defined(XP_MAC)
 #include "obsolete/probslet.h"
-#else
-#include "probslet.h"
-#endif
 
 #define PD_INCR 20
 
 static PRPollDesc *_pr_setfd(
     PR_fd_set *set, PRInt16 flags, PRPollDesc *polldesc)
 {
     PRUintn fsidx, pdidx;
     PRPollDesc *poll = polldesc;
--- a/nsprpub/pr/src/linking/prlink.c
+++ b/nsprpub/pr/src/linking/prlink.c
@@ -83,80 +83,16 @@
 #include <dl.h>
 #elif defined(USE_MACH_DYLD)
 #include <mach-o/dyld.h>
 #endif
 #endif /* XP_UNIX */
 
 #define _PR_DEFAULT_LD_FLAGS PR_LD_LAZY
 
-#ifdef VMS
-/* These are all require for the PR_GetLibraryFilePathname implementation */
-#include <descrip.h>
-#include <dvidef.h>
-#include <fibdef.h>
-#include <iodef.h>
-#include <lib$routines.h>
-#include <ssdef.h>
-#include <starlet.h>
-#include <stsdef.h>
-#include <unixlib.h>
-
-#pragma __nostandard 
-#pragma __member_alignment __save
-#pragma __nomember_alignment
-#ifdef __INITIAL_POINTER_SIZE
-#pragma __required_pointer_size __save 
-#pragma __required_pointer_size __short
-#endif
- 
-typedef struct _imcb {
-    struct _imcb *imcb$l_flink;         
-    struct _imcb *imcb$l_blink;         
-    unsigned short int imcb$w_size;     
-    unsigned char imcb$b_type;          
-    char imcb$b_resv_1;                 
-    unsigned char imcb$b_access_mode;   
-    unsigned char imcb$b_act_code;      
-    unsigned short int imcb$w_chan;     
-    unsigned int imcb$l_flags;		
-    char imcb$t_image_name [40];        
-    unsigned int imcb$l_symvec_size; 
-    unsigned __int64 imcb$q_ident;
-    void *imcb$l_starting_address;
-    void *imcb$l_end_address;
-} IMCB;
- 
-#pragma __member_alignment __restore
-#ifdef __INITIAL_POINTER_SIZE 
-#pragma __required_pointer_size __restore
-#endif
-#pragma __standard
- 
-typedef struct {
-    short   buflen;
-    short   itmcode;
-    void    *buffer;
-    void    *retlen;
-} ITMLST;
-
-typedef struct {
-    short cond;
-    short count;
-    int   rest;
-} IOSB;
-
-typedef unsigned long int ulong_t;
-
-struct _imcb *IAC$GL_IMAGE_LIST = NULL;
-
-#define MAX_DEVNAM 64
-#define MAX_FILNAM 255
-#endif  /* VMS */
-
 /*
  * On these platforms, symbols have a leading '_'.
  */
 #if defined(SUNOS4) || (defined(DARWIN) && defined(USE_MACH_DYLD)) \
     || defined(NEXTSTEP) || defined(XP_OS2) \
     || ((defined(OPENBSD) || defined(NETBSD)) && !defined(__ELF__))
 #define NEED_LEADING_UNDERSCORE
 #endif
@@ -1582,106 +1518,16 @@ PR_GetLibraryFilePathname(const char *na
                     strcpy(result, info.lmi_name);
                 }
                 return result;
             }
         }
     }
     PR_SetError(PR_LIBRARY_NOT_LOADED_ERROR, 0);
     return NULL;
-#elif defined(VMS)
-    /* Contributed by Colin Blake of HP */
-    struct _imcb	*icb;
-    ulong_t 		status;
-    char                device_name[MAX_DEVNAM];
-    int                 device_name_len;
-    $DESCRIPTOR         (device_name_desc, device_name);
-    struct fibdef	fib;
-    struct dsc$descriptor_s fib_desc = 
-	{ sizeof(struct fibdef), DSC$K_DTYPE_Z, DSC$K_CLASS_S, (char *)&fib } ;
-    IOSB		iosb;
-    ITMLST		devlst[2] = {
-            		{MAX_DEVNAM, DVI$_ALLDEVNAM, device_name, &device_name_len},
-            		{0,0,0,0}};
-    short               file_name_len;
-    char                file_name[MAX_FILNAM+1];
-    char		*result = NULL;
-    struct dsc$descriptor_s file_name_desc = 
-	{ MAX_FILNAM, DSC$K_DTYPE_T, DSC$K_CLASS_S, (char *) &file_name[0] } ;
-
-    /*
-    ** The address for the process image list could change in future versions
-    ** of the operating system. 7FFD0688 is valid for V7.2 and V7.3 releases,
-    ** so we use that for the default, but allow an environment variable
-    ** (logical name) to override.
-    */
-    if (IAC$GL_IMAGE_LIST == NULL) {
-        char *p = getenv("MOZILLA_IAC_GL_IMAGE_LIST");
-        if (p)
-            IAC$GL_IMAGE_LIST = (struct _imcb *) strtol(p,NULL,0);
-        else
-            IAC$GL_IMAGE_LIST = (struct _imcb *) 0x7FFD0688;
-    }
-
-    for (icb = IAC$GL_IMAGE_LIST->imcb$l_flink;
-         icb != IAC$GL_IMAGE_LIST;
-         icb = icb->imcb$l_flink) {
-        if (((void *)addr >= icb->imcb$l_starting_address) && 
-	    ((void *)addr <= icb->imcb$l_end_address)) {
-	    /*
-	    ** This is the correct image.
-	    ** Get the device name.
-	    */
-	    status = sys$getdviw(0,icb->imcb$w_chan,0,&devlst,0,0,0,0);
-	    if ($VMS_STATUS_SUCCESS(status))
-		device_name_desc.dsc$w_length = device_name_len;
-
-	    /*
-	    ** Get the FID.
-	    */
-	    memset(&fib,0,sizeof(struct fibdef));
-	    status = sys$qiow(0,icb->imcb$w_chan,IO$_ACCESS,&iosb,
-                		0,0,&fib_desc,0,0,0,0,0);
-
-	    /*
-	    ** If we got the FID, now look up its name (if for some reason
-	    ** we didn't get the device name, this call will fail).
-	    */
-	    if (($VMS_STATUS_SUCCESS(status)) && ($VMS_STATUS_SUCCESS(iosb.cond))) {
-		status = lib$fid_to_name (
-                    &device_name_desc,
-                    &fib.fib$w_fid,
-                    &file_name_desc,
-                    &file_name_len,
-                    0, 0);
-
-		/*
-		** If we succeeded then remove the version number and
-		** return a copy of the UNIX format version of the file name.
-		*/
-		if ($VMS_STATUS_SUCCESS(status)) {
-		    char *p, *result;
-		    file_name[file_name_len] = 0;
-		    p = strrchr(file_name,';');
-		    if (p) *p = 0;
-		    p = decc$translate_vms(&file_name[0]);
-		    result = PR_Malloc(strlen(p)+1);
-		    if (result != NULL) {
-			strcpy(result, p);
-		    }
-		    return result;
-		}
-            }
-	}
-    }
-
-    /* Didn't find it */
-    PR_SetError(PR_LIBRARY_NOT_LOADED_ERROR, 0);
-    return NULL;
-
 #elif defined(HPUX) && defined(USE_HPSHL)
     int index;
     struct shl_descriptor desc;
     char *result;
 
     for (index = 0; shl_get_r(index, &desc) == 0; index++) {
         if (strstr(desc.filename, name) != NULL) {
             result = PR_Malloc(strlen(desc.filename)+1);
--- a/nsprpub/pr/src/md/prosdep.c
+++ b/nsprpub/pr/src/md/prosdep.c
@@ -71,20 +71,16 @@ static void GetPageSize(void)
 #elif defined(HPUX)
     /* I have no idea. Don't get me started. --Rob */
     _pr_pageSize = sysconf(_SC_PAGE_SIZE);
 #else
     _pr_pageSize = sysconf(_SC_PAGESIZE);
 #endif
 #endif /* XP_UNIX */
 
-#ifdef XP_MAC
-    _pr_pageSize = 4096;
-#endif /* XP_MAC */
-
 #ifdef XP_BEOS
     _pr_pageSize = B_PAGE_SIZE;
 #endif
 
 #ifdef XP_PC
 #ifdef _WIN32
     SYSTEM_INFO info;
     GetSystemInfo(&info);
deleted file mode 100644
--- a/nsprpub/pr/src/md/unix/openvms.c
+++ /dev/null
@@ -1,286 +0,0 @@
-/* -*- 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 ***** */
-
-#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
-}
-
-#ifndef _PR_PTHREADS
-void
-_MD_SET_PRIORITY(_MDThread *thread, PRUintn newPri)
-{
-    return;
-}
-
-PRStatus
-_MD_InitializeThread(PRThread *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 OSF1 */
-void
-_MD_YIELD(void)
-{
-    PR_NOT_REACHED("_MD_YIELD should not be called for OSF1.");
-}
-
-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 OSF1.");
-	return PR_FAILURE;
-}
-#endif /* ! _PR_PTHREADS */
-
-#ifdef _PR_HAVE_ATOMIC_CAS
-
-#include <c_asm.h>
-
-#define _PR_OSF_ATOMIC_LOCK 1
-
-void 
-PR_StackPush(PRStack *stack, PRStackElem *stack_elem)
-{
-long locked;
-
-	do {
-		while ((long) stack->prstk_head.prstk_elem_next ==
-							_PR_OSF_ATOMIC_LOCK)
-			;
-		locked = __ATOMIC_EXCH_QUAD(&stack->prstk_head.prstk_elem_next,
-								_PR_OSF_ATOMIC_LOCK);	
-
-	} while (locked == _PR_OSF_ATOMIC_LOCK);
-	stack_elem->prstk_elem_next = (PRStackElem *) locked;
-	/*
-	 * memory-barrier instruction
-	 */
-	asm("mb");
-	stack->prstk_head.prstk_elem_next = stack_elem;
-}
-
-PRStackElem * 
-PR_StackPop(PRStack *stack)
-{
-PRStackElem *element;
-long locked;
-
-	do {
-		while ((long)stack->prstk_head.prstk_elem_next == _PR_OSF_ATOMIC_LOCK)
-			;
-		locked = __ATOMIC_EXCH_QUAD(&stack->prstk_head.prstk_elem_next,
-								_PR_OSF_ATOMIC_LOCK);	
-
-	} while (locked == _PR_OSF_ATOMIC_LOCK);
-
-	element = (PRStackElem *) locked;
-
-	if (element == NULL) {
-		stack->prstk_head.prstk_elem_next = NULL;
-	} else {
-		stack->prstk_head.prstk_elem_next =
-			element->prstk_elem_next;
-	}
-	/*
-	 * memory-barrier instruction
-	 */
-	asm("mb");
-	return element;
-}
-#endif /* _PR_HAVE_ATOMIC_CAS */
-
-
-/*
-** thread_suspend and thread_resume are used by the gc code
-** in nsprpub/pr/src/pthreads/ptthread.c
-**
-** These routines are never called for the current thread, and
-** there is no check for that - so beware!
-*/
-int thread_suspend(PRThread *thr_id) {
-
-    extern int pthread_suspend_np (
-			pthread_t                       thread,
-			__pthreadLongUint_t             *regs,
-			void                            *spare);
-
-    __pthreadLongUint_t regs[34];
-    int res;
-
-    /*
-    ** A return res < 0 indicates that the thread was suspended
-    ** but register information could not be obtained
-    */
-
-    res = pthread_suspend_np(thr_id->id,&regs[0],0);
-    if (res==0)
-	thr_id->sp = (void *) regs[30]; 
-
-    thr_id->suspend |= PT_THREAD_SUSPENDED;
-
-    /* Always succeeds */
-    return 0;
-}
-
-int thread_resume(PRThread *thr_id) {
-    extern int pthread_resume_np(pthread_t thread);
-    int res;
-
-    res = pthread_resume_np (thr_id->id);
-	
-    thr_id->suspend |= PT_THREAD_RESUMED;
-
-    return 0;
-}
-
-/*
-** Stubs for nspr_symvec.opt
-**
-** PR_ResumeSet, PR_ResumeTest, and PR_SuspendAllSuspended
-** (defined in ptthread.c) used to be exported by mistake
-** (because they look like public functions).  They have been
-** converted into static functions.
-**
-** There is an existing third-party binary that uses NSPR: the
-** Java plugin for Mozilla.  Because it is part of the Java
-** SDK, we have no control over its releases.  So we need these
-** stub functions to occupy the slots that used to be occupied
-** by PR_ResumeSet, PR_ResumeTest, and PR_SuspendAllSuspended
-** in the symbol vector so that LIBNSPR4 is backward compatible.
-**
-** The Java plugin was also using PR_CreateThread which we didn't
-** realise and hadn't "nailed down". So we now need to nail it down
-** to its Mozilla 1.1 position and have to insert 51 additional stubs
-** in order to achive this (stubs 4-54).
-**
-** Over time some of these stubs will get reused by new symbols.
-**   - Stub54 is replaced by LL_MaxUint
-*/
-
-void PR_VMS_Stub1(void) { }
-void PR_VMS_Stub2(void) { }
-void PR_VMS_Stub3(void) { }
-void PR_VMS_Stub4(void) { }
-void PR_VMS_Stub5(void) { }
-void PR_VMS_Stub6(void) { }
-void PR_VMS_Stub7(void) { }
-void PR_VMS_Stub8(void) { }
-void PR_VMS_Stub9(void) { }
-void PR_VMS_Stub10(void) { }
-void PR_VMS_Stub11(void) { }
-void PR_VMS_Stub12(void) { }
-void PR_VMS_Stub13(void) { }
-void PR_VMS_Stub14(void) { }
-void PR_VMS_Stub15(void) { }
-void PR_VMS_Stub16(void) { }
-void PR_VMS_Stub17(void) { }
-void PR_VMS_Stub18(void) { }
-void PR_VMS_Stub19(void) { }
-void PR_VMS_Stub20(void) { }
-void PR_VMS_Stub21(void) { }
-void PR_VMS_Stub22(void) { }
-void PR_VMS_Stub23(void) { }
-void PR_VMS_Stub24(void) { }
-void PR_VMS_Stub25(void) { }
-void PR_VMS_Stub26(void) { }
-void PR_VMS_Stub27(void) { }
-void PR_VMS_Stub28(void) { }
-void PR_VMS_Stub29(void) { }
-void PR_VMS_Stub30(void) { }
-void PR_VMS_Stub31(void) { }
-void PR_VMS_Stub32(void) { }
-void PR_VMS_Stub33(void) { }
-void PR_VMS_Stub34(void) { }
-void PR_VMS_Stub35(void) { }
-void PR_VMS_Stub36(void) { }
-void PR_VMS_Stub37(void) { }
-void PR_VMS_Stub38(void) { }
-void PR_VMS_Stub39(void) { }
-void PR_VMS_Stub40(void) { }
-void PR_VMS_Stub41(void) { }
-void PR_VMS_Stub42(void) { }
-void PR_VMS_Stub43(void) { }
-void PR_VMS_Stub44(void) { }
-void PR_VMS_Stub45(void) { }
-void PR_VMS_Stub46(void) { }
-void PR_VMS_Stub47(void) { }
-void PR_VMS_Stub48(void) { }
-void PR_VMS_Stub49(void) { }
-void PR_VMS_Stub50(void) { }
-void PR_VMS_Stub51(void) { }
-void PR_VMS_Stub52(void) { }
-void PR_VMS_Stub53(void) { }
--- a/nsprpub/pr/src/md/unix/uxproces.c
+++ b/nsprpub/pr/src/md/unix/uxproces.c
@@ -55,20 +55,16 @@ PR_IMPORT_DATA(char **) environ;
 
 /*
  * HP-UX 9 doesn't have the SA_RESTART flag.
  */
 #ifndef SA_RESTART
 #define SA_RESTART 0
 #endif
 
-#if defined(VMS)
-static PRLock *_pr_vms_fork_lock = NULL;
-#endif
-
 /*
  **********************************************************************
  *
  * The Unix process routines
  *
  **********************************************************************
  */
 
@@ -171,19 +167,16 @@ ForkAndExec(
     char *const *envp,
     const PRProcessAttr *attr)
 {
     PRProcess *process;
     int nEnv, idx;
     char *const *childEnvp;
     char **newEnvp = NULL;
     int flags;
-#ifdef VMS
-    char VMScurdir[FILENAME_MAX+1] = { '\0' } ;
-#endif	
 
     process = PR_NEW(PRProcess);
     if (!process) {
         PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
         return NULL;
     }
 
     childEnvp = envp;
@@ -214,76 +207,16 @@ ForkAndExec(
         }
         if (!found) {
             newEnvp[idx++] = attr->fdInheritBuffer;
         }
         newEnvp[idx] = NULL;
         childEnvp = newEnvp;
     }
 
-#ifdef VMS
-/*
-** Since vfork/exec is implemented VERY differently on OpenVMS, we have to
-** handle the setting up of the standard streams very differently. And since
-** none of this code can ever execute in the context of the child, we have
-** to perform the chdir in the parent so the child is born into the correct
-** directory (and then switch the parent back again).
-*/
-{
-    int decc$set_child_standard_streams(int,int,int);
-    int n, fd_stdin=0, fd_stdout=1, fd_stderr=2;
-
-    /* Set up any standard streams we are given, assuming defaults */
-    if (attr) {
-       if (attr->stdinFd)
-           fd_stdin = attr->stdinFd->secret->md.osfd;
-       if (attr->stdoutFd)
-           fd_stdout = attr->stdoutFd->secret->md.osfd;
-       if (attr->stderrFd)
-           fd_stderr = attr->stderrFd->secret->md.osfd;
-    }
-
-    /*
-    ** Put a lock around anything that isn't going to be thread-safe.
-    */
-    PR_Lock(_pr_vms_fork_lock);
-
-    /*
-    ** Prepare the child's streams. We always do this in case a previous fork
-    ** has left the stream assignments in some non-standard way.
-    */
-    n = decc$set_child_standard_streams(fd_stdin,fd_stdout,fd_stderr);
-    if (n == -1) {
-       PR_SetError(PR_BAD_DESCRIPTOR_ERROR, errno);
-       PR_DELETE(process);
-       if (newEnvp) {
-           PR_DELETE(newEnvp);
-       }
-       PR_Unlock(_pr_vms_fork_lock);
-       return NULL;
-    }
-
-    /* Switch directory if we have to */
-    if (attr) {
-       if (attr->currentDirectory) {
-           if ( (getcwd(VMScurdir,sizeof(VMScurdir)) == NULL) ||
-                (chdir(attr->currentDirectory) < 0) ) {
-               PR_SetError(PR_DIRECTORY_OPEN_ERROR, errno);
-               PR_DELETE(process);
-               if (newEnvp) {
-                   PR_DELETE(newEnvp);
-               }
-               PR_Unlock(_pr_vms_fork_lock);
-               return NULL;
-           }
-       }
-    }
-}
-#endif /* VMS */
-
 #ifdef AIX
     process->md.pid = (*pr_wp.forkptr)();
 #elif defined(NTO) || defined(SYMBIAN)
     /*
      * fork() & exec() does not work in a multithreaded process.
      * Use spawn() instead.
      */
     {
@@ -340,19 +273,16 @@ ForkAndExec(
         /*
          * If the child process needs to exit, it must call _exit().
          * Do not call exit(), because exit() will flush and close
          * the standard I/O file descriptors, and hence corrupt
          * the parent process's standard I/O data structures.
          */
 
 #if !defined(NTO) && !defined(SYMBIAN)
-#ifdef VMS
-       /* OpenVMS has already handled all this above */
-#else
         if (attr) {
             /* the osfd's to redirect stdin, stdout, and stderr to */
             int in_osfd = -1, out_osfd = -1, err_osfd = -1;
 
             if (attr->stdinFd
                     && attr->stdinFd->secret->md.osfd != 0) {
                 in_osfd = attr->stdinFd->secret->md.osfd;
                 if (dup2(in_osfd, 0) != 0) {
@@ -396,55 +326,31 @@ ForkAndExec(
                 close(err_osfd);
             }
             if (attr->currentDirectory) {
                 if (chdir(attr->currentDirectory) < 0) {
                     _exit(1);  /* failed */
                 }
             }
         }
-#endif /* !VMS */
 
         if (childEnvp) {
             (void)execve(path, argv, childEnvp);
         } else {
             /* Inherit the environment of the parent. */
             (void)execv(path, argv);
         }
         /* Whoops! It returned. That's a bad sign. */
-#ifdef VMS
-       /*
-       ** On OpenVMS we are still in the context of the parent, and so we
-       ** can (and should!) perform normal error handling.
-       */
-       PR_SetError(PR_UNKNOWN_ERROR, errno);
-       PR_DELETE(process);
-       if (newEnvp) {
-           PR_DELETE(newEnvp);
-       }
-       if (VMScurdir[0] != '\0')
-           chdir(VMScurdir);
-       PR_Unlock(_pr_vms_fork_lock);
-       return NULL;
-#else
         _exit(1);
-#endif /* VMS */
 #endif /* !NTO */
     }
 
     if (newEnvp) {
         PR_DELETE(newEnvp);
     }
-#ifdef VMS
-    /* If we switched directories, then remember to switch back */
-    if (VMScurdir[0] != '\0') {
-       chdir(VMScurdir); /* can't do much if it fails */
-    }
-    PR_Unlock(_pr_vms_fork_lock);
-#endif /* VMS */
 
 #if defined(_PR_NATIVE_THREADS)
     PR_Lock(pr_wp.ml);
     if (0 == pr_wp.numProcs++) {
         PR_NotifyCondVar(pr_wp.cv);
     }
     PR_Unlock(pr_wp.ml);
 #endif
@@ -842,21 +748,16 @@ static PRStatus _MD_InitProcesses(void)
         }
         dlclose(handle);
     }
 #endif /* AIX */
 
     pr_wp.ml = PR_NewLock();
     PR_ASSERT(NULL != pr_wp.ml);
 
-#if defined(VMS)
-    _pr_vms_fork_lock = PR_NewLock();
-    PR_ASSERT(NULL != _pr_vms_fork_lock);
-#endif
-
 #if defined(_PR_NATIVE_THREADS)
     pr_wp.numProcs = 0;
     pr_wp.cv = PR_NewCondVar(pr_wp.ml);
     PR_ASSERT(NULL != pr_wp.cv);
 #else
     rv = pipe(pr_wp.pipefd);
     PR_ASSERT(0 == rv);
     flags = fcntl(pr_wp.pipefd[0], F_GETFL, 0);
--- a/nsprpub/pr/src/md/unix/uxrng.c
+++ b/nsprpub/pr/src/md/unix/uxrng.c
@@ -107,34 +107,16 @@ GetHighResClock(void *buf, size_t maxbyt
 #ifdef __GNUC__
     __asm__("rpcc %0" : "=r" (t));
 #else
     t = asm("rpcc %v0");
 #endif
     return _pr_CopyLowBits(buf, maxbytes, &t, sizeof(t));
 }
 
-#elif defined(VMS)
-
-#include <ints.h>
-
-/*
- * Use the "get the cycle counter" instruction on the alpha.
- * The low 32 bits completely turn over in less than a minute.
- * The high 32 bits are some non-counter gunk that changes sometimes.
- */
-static size_t
-GetHighResClock(void *buf, size_t maxbytes)
-{
-    uint64 t;
-
-    t = __RPCC();
-    return _pr_CopyLowBits(buf, maxbytes, &t, sizeof(t));
-}
-
 #elif defined(AIX)
 
 static size_t
 GetHighResClock(void *buf, size_t maxbytes)
 {
     return 0;
 }
 
--- a/nsprpub/pr/src/md/windows/ntsec.c
+++ b/nsprpub/pr/src/md/windows/ntsec.c
@@ -70,17 +70,18 @@ static struct {
 void _PR_NT_InitSids(void)
 {
 #ifdef WINCE /* not supported */
     return;
 #else
     SID_IDENTIFIER_AUTHORITY SIDAuthWorld = SECURITY_WORLD_SID_AUTHORITY;
     HANDLE hToken = NULL; /* initialized to an arbitrary value to
                            * silence a Purify UMR warning */
-    UCHAR infoBuffer[1024];
+    PSID infoBuffer[1024/sizeof(PSID)]; /* defined as an array of PSIDs
+                                         * to force proper alignment */
     PTOKEN_OWNER pTokenOwner = (PTOKEN_OWNER) infoBuffer;
     PTOKEN_PRIMARY_GROUP pTokenPrimaryGroup
             = (PTOKEN_PRIMARY_GROUP) infoBuffer;
     DWORD dwLength;
     BOOL rv;
 
     /*
      * Look up and make a copy of the owner and primary group
--- a/nsprpub/pr/src/misc/pralarm.c
+++ b/nsprpub/pr/src/misc/pralarm.c
@@ -36,21 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "primpl.h"
 
 /**********************************************************************/
 /******************************* PRALARM ******************************/
 /**********************************************************************/
 
-#ifdef XP_MAC
-#include "pralarm.h"
-#else
 #include "obsolete/pralarm.h"
-#endif
 
 struct PRAlarmID {                       /* typedef'd in pralarm.h       */
     PRCList list;                        /* circular list linkage        */
     PRAlarm *alarm;                      /* back pointer to owning alarm */
     PRPeriodicAlarmFn function;          /* function to call for notify  */
     void *clientData;                    /* opaque client context        */
     PRIntervalTime period;               /* the client defined period    */
     PRUint32 rate;                       /* rate of notification         */
--- a/nsprpub/pr/src/misc/prenv.c
+++ b/nsprpub/pr/src/misc/prenv.c
@@ -92,18 +92,8 @@ PR_IMPLEMENT(PRStatus) PR_SetEnv(const c
 
     if ( !strchr(string, '=')) return(PR_FAILURE);
 
     _PR_LOCK_ENV();
     result = _PR_MD_PUT_ENV(string);
     _PR_UNLOCK_ENV();
     return (result)? PR_FAILURE : PR_SUCCESS;
 }
-
-/*
-** DEPRECATED.  Use PR_SetEnv() instead.
-*/
-#ifdef XP_MAC
-PR_IMPLEMENT(PRIntn) PR_PutEnv(const char *string)
-{
-    return (PR_SetEnv(string) == PR_SUCCESS) ? PR_TRUE : PR_FALSE;
-}
-#endif
--- a/nsprpub/pr/src/misc/prinit.c
+++ b/nsprpub/pr/src/misc/prinit.c
@@ -228,21 +228,21 @@ static void _PR_InitStuff(void)
  */
 #ifdef _PR_OVERRIDE_MALLOC
     _PR_InitMem();
 #endif
 
     _PR_InitCMon();
     _PR_InitIO();
     _PR_InitNet();
+    _PR_InitTime();
     _PR_InitLog();
     _PR_InitLinker();
     _PR_InitCallOnce();
     _PR_InitDtoa();
-    _PR_InitTime();
     _PR_InitMW();
     _PR_InitRWLocks();
 
     nspr_InitializePRErrorTable();
 
     _PR_MD_FINAL_INIT();
 }
 
@@ -290,30 +290,22 @@ PR_IMPLEMENT(void) PR_UnblockClockInterr
 #if !defined(_PR_PTHREADS) && !defined(_PR_BTHREADS)
     	_PR_MD_UNBLOCK_CLOCK_INTERRUPTS();
 #endif
 }
 
 PR_IMPLEMENT(void) PR_Init(
     PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs)
 {
-#if defined(XP_MAC)
-#pragma unused (type, priority, maxPTDs)
-#endif
-
     _PR_ImplicitInitialization();
 }
 
 PR_IMPLEMENT(PRIntn) PR_Initialize(
     PRPrimordialFn prmain, PRIntn argc, char **argv, PRUintn maxPTDs)
 {
-#if defined(XP_MAC)
-#pragma unused (maxPTDs)
-#endif
-
     PRIntn rv;
     _PR_ImplicitInitialization();
     rv = prmain(argc, argv);
 	PR_Cleanup();
     return rv;
 }  /* PR_Initialize */
 
 /*
@@ -397,16 +389,21 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup()
         /*
          * Wait for all other user (non-system/daemon) threads
          * to terminate.
          */
         PR_Lock(_pr_activeLock);
         while (_pr_userActive > _pr_primordialExitCount) {
             PR_WaitCondVar(_pr_primordialExitCVar, PR_INTERVAL_NO_TIMEOUT);
         }
+        if (me->flags & _PR_SYSTEM) {
+            _pr_systemActive--;
+        } else {
+            _pr_userActive--;
+        }
         PR_Unlock(_pr_activeLock);
 
 #ifdef IRIX
 		_PR_MD_PRE_CLEANUP(me);
 		/*
 		 * The primordial thread must now be running on the primordial cpu
 		 */
     	PR_ASSERT((_PR_IS_NATIVE_THREAD(me)) || (me->cpu->id == 0));
@@ -852,22 +849,18 @@ PR_IMPLEMENT(PRStatus) PR_CallOnceWithAr
         }
     }
     return once->status;
 }
 
 PRBool _PR_Obsolete(const char *obsolete, const char *preferred)
 {
 #if defined(DEBUG)
-#ifndef XP_MAC
     PR_fprintf(
         PR_STDERR, "'%s' is obsolete. Use '%s' instead.\n",
         obsolete, (NULL == preferred) ? "something else" : preferred);
-#else
-#pragma unused (obsolete, preferred)
-#endif
 #endif
     return PR_FALSE;
 }  /* _PR_Obsolete */
 
 /* prinit.c */
 
 
--- a/nsprpub/pr/src/misc/prnetdb.c
+++ b/nsprpub/pr/src/misc/prnetdb.c
@@ -755,25 +755,20 @@ static void * _pr_freehostent_fp;
  * Look up the addresses of getipnodebyname, getipnodebyaddr,
  * and freehostent.
  */
 PRStatus
 _pr_find_getipnodebyname(void)
 {
     PRLibrary *lib;	
     PRStatus rv;
-#if defined(VMS)
-#define GETIPNODEBYNAME getenv("GETIPNODEBYNAME")
-#define GETIPNODEBYADDR getenv("GETIPNODEBYADDR")
-#define FREEHOSTENT     getenv("FREEHOSTENT")
-#else
 #define GETIPNODEBYNAME "getipnodebyname"
 #define GETIPNODEBYADDR "getipnodebyaddr"
 #define FREEHOSTENT     "freehostent"
-#endif
+
     _pr_getipnodebyname_fp = PR_FindSymbolAndLibrary(GETIPNODEBYNAME, &lib);
     if (NULL != _pr_getipnodebyname_fp) {
         _pr_freehostent_fp = PR_FindSymbol(lib, FREEHOSTENT);
         if (NULL != _pr_freehostent_fp) {
             _pr_getipnodebyaddr_fp = PR_FindSymbol(lib, GETIPNODEBYADDR);
             if (NULL != _pr_getipnodebyaddr_fp)
                 rv = PR_SUCCESS;
             else
@@ -1888,25 +1883,19 @@ typedef int (FUNC_MODIFIER * FN_GETNAMEI
      char *host, int hostlen,
      char *serv, int servlen, int flags);
 
 /* global state */
 static FN_GETADDRINFO   _pr_getaddrinfo   = NULL;
 static FN_FREEADDRINFO  _pr_freeaddrinfo  = NULL;
 static FN_GETNAMEINFO   _pr_getnameinfo   = NULL;
 
-#if defined(VMS)
-#define GETADDRINFO_SYMBOL getenv("GETADDRINFO")
-#define FREEADDRINFO_SYMBOL getenv("FREEADDRINFO")
-#define GETNAMEINFO_SYMBOL getenv("GETNAMEINFO")
-#else
 #define GETADDRINFO_SYMBOL "getaddrinfo"
 #define FREEADDRINFO_SYMBOL "freeaddrinfo"
 #define GETNAMEINFO_SYMBOL "getnameinfo"
-#endif
 
 PRStatus
 _pr_find_getaddrinfo(void)
 {
     PRLibrary *lib;
 #ifdef WIN32
     /*
      * On windows, we need to search ws2_32.dll or wship6.dll
--- a/nsprpub/pr/src/misc/prolock.c
+++ b/nsprpub/pr/src/misc/prolock.c
@@ -46,55 +46,43 @@
 #include "prerror.h"
 
 PR_IMPLEMENT(PROrderedLock *) 
     PR_CreateOrderedLock( 
         PRInt32 order,
         const char *name
 )
 {
-#ifdef XP_MAC
-#pragma unused( order, name )
-#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return NULL;
 } /*  end PR_CreateOrderedLock() */
 
 
 PR_IMPLEMENT(void) 
     PR_DestroyOrderedLock( 
         PROrderedLock *lock 
 )
 {
-#ifdef XP_MAC
-#pragma unused( lock )
-#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
 } /*  end PR_DestroyOrderedLock() */
 
 
 PR_IMPLEMENT(void) 
     PR_LockOrderedLock( 
         PROrderedLock *lock 
 )
 {
-#ifdef XP_MAC
-#pragma unused( lock )
-#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
 } /*  end PR_LockOrderedLock() */
 
 
 PR_IMPLEMENT(PRStatus) 
     PR_UnlockOrderedLock( 
         PROrderedLock *lock 
 )
 {
-#ifdef XP_MAC
-#pragma unused( lock )
-#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return PR_FAILURE;
 } /*  end PR_UnlockOrderedLock() */
--- a/nsprpub/pr/src/misc/prsystem.c
+++ b/nsprpub/pr/src/misc/prsystem.c
@@ -221,22 +221,16 @@ PR_IMPLEMENT(PRStatus) PR_GetSystemInfo(
 PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void )
 {
     PRInt32     numCpus;
 #if defined(WIN32)
     SYSTEM_INFO     info;
 
     GetSystemInfo( &info );
     numCpus = info.dwNumberOfProcessors;
-#elif defined(XP_MAC)
-/* Hard-code the number of processors to 1 on the Mac
-** MacOS/9 will always be 1. The MPProcessors() call is for
-** MacOS/X, when issued. Leave it commented out for now. */
-/*  numCpus = MPProcessors(); */
-    numCpus = 1;
 #elif defined(BEOS)
     system_info sysInfo;
 
     get_system_info(&sysInfo);
     numCpus = sysInfo.cpu_count;
 #elif defined(OS2)
     DosQuerySysInfo( QSV_NUMPROCESSORS, QSV_NUMPROCESSORS, &numCpus, sizeof(numCpus));
 #elif defined(_PR_HAVE_SYSCTL)
--- a/nsprpub/pr/src/misc/prthinfo.c
+++ b/nsprpub/pr/src/misc/prthinfo.c
@@ -32,21 +32,17 @@
  * 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 "prlog.h"
 #include "prthread.h"
-#ifdef XP_MAC
-#include "pprthred.h"
-#else
 #include "private/pprthred.h"
-#endif
 #include "primpl.h"
 
 PR_IMPLEMENT(PRWord *)
 PR_GetGCRegisters(PRThread *t, int isCurrent, int *np)
 {
     return _MD_HomeGCRegisters(t, isCurrent, np);
 }
 
@@ -170,19 +166,16 @@ PR_ThreadScanStackPointers(PRThread* t,
 typedef struct PRScanStackData {
     PRScanStackFun      scanFun;
     void*               scanClosure;
 } PRScanStackData;
 
 static PRStatus PR_CALLBACK
 pr_ScanStack(PRThread* t, int i, void* arg)
 {
-#if defined(XP_MAC)
-#pragma unused (i)
-#endif
     PRScanStackData* data = (PRScanStackData*)arg;
     return PR_ThreadScanStackPointers(t, data->scanFun, data->scanClosure);
 }
 
 PR_IMPLEMENT(PRStatus)
 PR_ScanStackPointers(PRScanStackFun scanFun, void* scanClosure)
 {
     PRScanStackData data;
--- a/nsprpub/pr/src/misc/prtime.c
+++ b/nsprpub/pr/src/misc/prtime.c
@@ -495,18 +495,18 @@ PR_NormalizeTime(PRExplodedTime *time, P
 /*
  *-------------------------------------------------------------------------
  *
  * PR_LocalTimeParameters --
  * 
  *     returns the time parameters for the local time zone
  *
  *     The following uses localtime() from the standard C library.
- *     (time.h)  This is our fallback implementation.  Unix and PC
- *     use this version.  Mac has its own machine-dependent
+ *     (time.h)  This is our fallback implementation.  Unix, PC, and BeOS
+ *     use this version.  A platform may have its own machine-dependent
  *     implementation of this function.
  *
  *-------------------------------------------------------------------------
  */
 
 #if defined(HAVE_INT_LOCALTIME_R)
 
 /*
@@ -524,20 +524,16 @@ PR_NormalizeTime(PRExplodedTime *time, P
         (localtime_r(timer, result) == -1 ? NULL: result)
 
 #elif defined(HAVE_POINTER_LOCALTIME_R)
 
 #define MT_safe_localtime localtime_r
 
 #else
 
-#if defined(XP_MAC)
-extern struct tm *Maclocaltime(const time_t * t);
-#endif
-
 #define HAVE_LOCALTIME_MONITOR 1  /* We use 'monitor' to serialize our calls
                                    * to localtime(). */
 static PRLock *monitor = NULL;
 
 static struct tm *MT_safe_localtime(const time_t *clock, struct tm *result)
 {
     struct tm *tmPtr;
     int needLock = PR_Initialized();  /* We need to use a lock to protect
@@ -557,21 +553,17 @@ static struct tm *MT_safe_localtime(cons
      * We have to manually check (WIN16 only) for negative value of
      * clock and return NULL.
      *
      * With negative values of clock, OS/2 returns the struct tm for
      * clock plus ULONG_MAX. So we also have to check for the invalid
      * structs returned for timezones west of Greenwich when clock == 0.
      */
     
-#if defined(XP_MAC)
-    tmPtr = Maclocaltime(clock);
-#else
     tmPtr = localtime(clock);
-#endif
 
 #if defined(WIN16) || defined(XP_OS2)
     if ( (PRInt32) *clock < 0 ||
          ( (PRInt32) *clock == 0 && tmPtr->tm_year != 70))
         result = NULL;
     else
         *result = *tmPtr;
 #else
@@ -749,17 +741,17 @@ PR_LocalTimeParameters(const PRExplodedT
             retVal.tp_gmt_offset = offsetNew - 3600;
             retVal.tp_dst_offset = 3600;
         }
     }
     
     return retVal;
 }
 
-#endif    /* defined(XP_UNIX) !! defined(XP_PC) */
+#endif    /* defined(XP_UNIX) || defined(XP_PC) || defined(XP_BEOS) */
 
 /*
  *------------------------------------------------------------------------
  *
  * PR_USPacificTimeParameters --
  *
  *     The time parameters function for the US Pacific Time Zone.
  *
@@ -903,20 +895,16 @@ PR_USPacificTimeParameters(const PRExplo
  *     Trivially, both the tp_gmt_offset and tp_dst_offset fields are 0.
  *
  *------------------------------------------------------------------------
  */
 
 PR_IMPLEMENT(PRTimeParameters)
 PR_GMTParameters(const PRExplodedTime *gmt)
 {
-#if defined(XP_MAC)
-#pragma unused (gmt)
-#endif
-
     PRTimeParameters retVal = { 0, 0 };
     return retVal;
 }
 
 /*
  * The following code implements PR_ParseTimeString().  It is based on
  * ns/lib/xp/xp_time.c, revision 1.25, by Jamie Zawinski <jwz@netscape.com>.
  */
deleted file mode 100644
--- a/nsprpub/pr/src/nspr_symvec.opt
+++ /dev/null
@@ -1,503 +0,0 @@
-! Fixed section of symbol vector for LIBNSPR4 (non-debug)
-!
-GSMATCH=LEQUAL,2,8
-case_sensitive=YES
-!
-! --------------------------------------------------------------------------
-! Ident 2,1 introduced for Mozilla 0.9.4
-! Based on NSPR 4.1.2
-! --------------------------------------------------------------------------
-! Ident 2,2 introduced for Mozilla 1.2
-! Based on NSPR 4.2.2?
-! PR_ResumeSet, PR_ResumeTest, and PR_SuspendAllSuspended has been "removed".
-! Only we can't remove the entry points because OJI is linked against NSPR so
-! we have to make an upwardly compatible change:
-!   PR_ResumeSet is now PR_VMS_Stub1
-!   PR_ResumeTest is now PR_VMS_Stub2
-!   PR_SuspendAllSuspended is PR_VMS_Stub3
-! These are stub functions (defined in openvms.c) solely for the purpose of
-! occupying the slots in our fixed section of the symbol table. 
-! --------------------------------------------------------------------------
-! Ident 2,3 introduced for Mozilla 1.3
-! Previously we were missing some symbols from NSPR 4.0 and 4.1, so now we
-! include everything that's specified in nspr.def.
-! --------------------------------------------------------------------------
-! Ident 2,4 introduced for Mozilla 1.3 final.
-! 2,3 was still missing some symbols, in particular PR_CreateThread, which
-! is used by OJI. So insert stubs to force the PR_CreateThread entry down
-! to its Mozilla 1.1 (and Java 1.4-0) location so that everyone can play
-! together and be happy.
-! --------------------------------------------------------------------------
-! Ident 2,5 introduced for post Mozilla 1.3.
-! LL_MaxUint introduced. Replaces Stub54.
-! --------------------------------------------------------------------------
-! Ident 2,6 introduced for post Mozilla 1.4.
-! PR_GetPathSeparator introduced in NSPR 4.4.
-! This replaces stub 53
-! --------------------------------------------------------------------------
-! Ident 2,7 introduced for post Mozilla 1.4.
-! PR_GetAddrInfoByName, PR_FreeAddrInfo, PR_EnumerateAddrInfo and
-! PR_GetCanonNameFromAddrInfo introduced in NSPR 4.5.
-! These replace stubs 49-52
-! --------------------------------------------------------------------------
-! Ident 2,8 introduced for NSPR 4.6.
-! PR_FindLibrary removed. Replaced by PR_GetPhysicalMemorySize.
-! --------------------------------------------------------------------------
-!
-SYMBOL_VECTOR=(PR_Accept=PROCEDURE)
-SYMBOL_VECTOR=(PR_AcceptRead=PROCEDURE)
-SYMBOL_VECTOR=(PR_Access=PROCEDURE)
-SYMBOL_VECTOR=(PR_AllocFileDesc=PROCEDURE)
-SYMBOL_VECTOR=(PR_Assert=PROCEDURE)
-SYMBOL_VECTOR=(PR_AtomicAdd=PROCEDURE)
-SYMBOL_VECTOR=(PR_AtomicDecrement=PROCEDURE)
-SYMBOL_VECTOR=(PR_AtomicSet=PROCEDURE)
-SYMBOL_VECTOR=(PR_AttachSharedMemory=PROCEDURE)
-SYMBOL_VECTOR=(PR_AttachThread=PROCEDURE)
-SYMBOL_VECTOR=(PR_Available64=PROCEDURE)
-SYMBOL_VECTOR=(PR_Available=PROCEDURE)
-SYMBOL_VECTOR=(PR_Bind=PROCEDURE)
-SYMBOL_VECTOR=(PR_BlockClockInterrupts=PROCEDURE)
-SYMBOL_VECTOR=(PR_BlockInterrupt=PROCEDURE)
-SYMBOL_VECTOR=(PR_CExitMonitor=PROCEDURE)
-SYMBOL_VECTOR=(PR_CNotify=PROCEDURE)
-SYMBOL_VECTOR=(PR_CNotifyAll=PROCEDURE)
-SYMBOL_VECTOR=(PR_CSetOnMonitorRecycle=PROCEDURE)
-SYMBOL_VECTOR=(PR_CWait=PROCEDURE)
-SYMBOL_VECTOR=(PR_CallOnce=PROCEDURE)
-SYMBOL_VECTOR=(PR_Calloc=PROCEDURE)
-SYMBOL_VECTOR=(PR_CancelJob=PROCEDURE)
-SYMBOL_VECTOR=(PR_CancelWaitFileDesc=PROCEDURE)
-SYMBOL_VECTOR=(PR_CancelWaitGroup=PROCEDURE)
-SYMBOL_VECTOR=(PR_ChangeFileDescNativeHandle=PROCEDURE)
-SYMBOL_VECTOR=(PR_Cleanup=PROCEDURE)
-SYMBOL_VECTOR=(PR_ClearInterrupt=PROCEDURE)
-SYMBOL_VECTOR=(PR_ClearThreadGCAble=PROCEDURE)
-SYMBOL_VECTOR=(PR_Close=PROCEDURE)
-SYMBOL_VECTOR=(PR_CloseDir=PROCEDURE)
-SYMBOL_VECTOR=(PR_CloseFileMap=PROCEDURE)
-SYMBOL_VECTOR=(PR_CloseSemaphore=PROCEDURE)
-SYMBOL_VECTOR=(PR_CloseSharedMemory=PROCEDURE)
-SYMBOL_VECTOR=(PR_Connect=PROCEDURE)
-SYMBOL_VECTOR=(PR_ConnectContinue=PROCEDURE)
-SYMBOL_VECTOR=(PR_ConvertIPv4AddrToIPv6=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateIOLayer=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateIOLayerStub=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateMWaitEnumerator=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreatePipe=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateProcess=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateProcessDetached=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateSocketPollFd=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateStack=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateThreadGCAble=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateWaitGroup=PROCEDURE)
-SYMBOL_VECTOR=(PR_Delete=PROCEDURE)
-SYMBOL_VECTOR=(PR_DeleteSemaphore=PROCEDURE)
-SYMBOL_VECTOR=(PR_DeleteSharedMemory=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyAlarm=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyCondVar=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyLock=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyMWaitEnumerator=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyMonitor=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyPollableEvent=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyProcessAttr=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyRWLock=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroySem=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroySocketPollFd=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyStack=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyWaitGroup=PROCEDURE)
-SYMBOL_VECTOR=(PR_DetachProcess=PROCEDURE)
-SYMBOL_VECTOR=(PR_DetachSharedMemory=PROCEDURE)
-SYMBOL_VECTOR=(PR_DetachThread=PROCEDURE)
-SYMBOL_VECTOR=(PR_DisableClockInterrupts=PROCEDURE)
-SYMBOL_VECTOR=(PR_EmulateAcceptRead=PROCEDURE)
-SYMBOL_VECTOR=(PR_EmulateSendFile=PROCEDURE)
-SYMBOL_VECTOR=(PR_EnableClockInterrupts=PROCEDURE)
-SYMBOL_VECTOR=(PR_EnterMonitor=PROCEDURE)
-SYMBOL_VECTOR=(PR_EnumerateHostEnt=PROCEDURE)
-SYMBOL_VECTOR=(PR_EnumerateThreads=PROCEDURE)
-SYMBOL_VECTOR=(PR_EnumerateWaitGroup=PROCEDURE)
-SYMBOL_VECTOR=(PR_ErrorInstallCallback=PROCEDURE)
-SYMBOL_VECTOR=(PR_ErrorInstallTable=PROCEDURE)
-SYMBOL_VECTOR=(PR_ErrorLanguages=PROCEDURE)
-SYMBOL_VECTOR=(PR_ErrorToName=PROCEDURE)
-SYMBOL_VECTOR=(PR_ExitMonitor=PROCEDURE)
-SYMBOL_VECTOR=(PR_ExportFileMapAsString=PROCEDURE)
-SYMBOL_VECTOR=(PR_FD_CLR=PROCEDURE)
-SYMBOL_VECTOR=(PR_FD_ISSET=PROCEDURE)
-SYMBOL_VECTOR=(PR_FD_NCLR=PROCEDURE)
-SYMBOL_VECTOR=(PR_FD_NISSET=PROCEDURE)
-SYMBOL_VECTOR=(PR_FD_NSET=PROCEDURE)
-SYMBOL_VECTOR=(PR_FD_SET=PROCEDURE)
-SYMBOL_VECTOR=(PR_FD_ZERO=PROCEDURE)
-SYMBOL_VECTOR=(PR_FileDesc2NativeHandle=PROCEDURE)
-SYMBOL_VECTOR=(PR_FindFunctionSymbol=PROCEDURE)
-SYMBOL_VECTOR=(PR_FindFunctionSymbolAndLibrary=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetPhysicalMemorySize=PROCEDURE)
-SYMBOL_VECTOR=(PR_FindSymbol=PROCEDURE)
-SYMBOL_VECTOR=(PR_FindSymbolAndLibrary=PROCEDURE)
-SYMBOL_VECTOR=(PR_FloorLog2=PROCEDURE)
-SYMBOL_VECTOR=(PR_FormatTime=PROCEDURE)
-SYMBOL_VECTOR=(PR_FormatTimeUSEnglish=PROCEDURE)
-SYMBOL_VECTOR=(PR_Free=PROCEDURE)
-SYMBOL_VECTOR=(PR_FreeLibraryName=PROCEDURE)
-SYMBOL_VECTOR=(PR_GMTParameters=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetConnectStatus=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetCurrentThread=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetDefaultIOMethods=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetDirectorySepartor=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetError=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetErrorText=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetErrorTextLength=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetFileInfo64=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetFileInfo=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetFileMethods=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetHostByAddr=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetHostByName=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetIPNodeByName=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetIdentitiesLayer=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetInheritedFD=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetInheritedFileMap=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetLayersIdentity=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetLibraryName=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetLibraryPath=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetMemMapAlignment=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetMonitorEntryCount=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetNameForIdentity=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetNumberOfProcessors=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetOSError=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetOpenFileInfo64=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetOpenFileInfo=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetPageShift=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetPeerName=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetPipeMethods=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetProtoByName=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetProtoByNumber=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetSP=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetSockName=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetSocketOption=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetStackSpaceLeft=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetSysfdTableMax=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetSystemInfo=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetTCPMethods=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetThreadAffinityMask=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetThreadID=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetThreadPriority=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetThreadPrivate=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetThreadScope=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetThreadState=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetThreadType=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetUDPMethods=PROCEDURE)
-SYMBOL_VECTOR=(PR_ImplodeTime=PROCEDURE)
-SYMBOL_VECTOR=(PR_ImportFile=PROCEDURE)
-SYMBOL_VECTOR=(PR_ImportFileMapFromString=PROCEDURE)
-SYMBOL_VECTOR=(PR_ImportPipe=PROCEDURE)
-SYMBOL_VECTOR=(PR_ImportTCPSocket=PROCEDURE)
-SYMBOL_VECTOR=(PR_ImportUDPSocket=PROCEDURE)
-SYMBOL_VECTOR=(PR_Init=PROCEDURE)
-SYMBOL_VECTOR=(PR_Initialize=PROCEDURE)
-SYMBOL_VECTOR=(PR_InitializeNetAddr=PROCEDURE)
-SYMBOL_VECTOR=(PR_Initialized=PROCEDURE)
-SYMBOL_VECTOR=(PR_Interrupt=PROCEDURE)
-SYMBOL_VECTOR=(PR_IntervalToMicroseconds=PROCEDURE)
-SYMBOL_VECTOR=(PR_IntervalToMilliseconds=PROCEDURE)
-SYMBOL_VECTOR=(PR_IntervalToSeconds=PROCEDURE)
-SYMBOL_VECTOR=(PR_IsNetAddrType=PROCEDURE)
-SYMBOL_VECTOR=(PR_JoinJob=PROCEDURE)
-SYMBOL_VECTOR=(PR_JoinThread=PROCEDURE)
-SYMBOL_VECTOR=(PR_JoinThreadPool=PROCEDURE)
-SYMBOL_VECTOR=(PR_KillProcess=PROCEDURE)
-SYMBOL_VECTOR=(PR_Listen=PROCEDURE)
-SYMBOL_VECTOR=(PR_LoadLibrary=PROCEDURE)
-SYMBOL_VECTOR=(PR_LoadLibraryWithFlags=PROCEDURE)
-SYMBOL_VECTOR=(PR_LoadStaticLibrary=PROCEDURE)
-SYMBOL_VECTOR=(PR_LocalTimeParameters=PROCEDURE)
-SYMBOL_VECTOR=(PR_Lock=PROCEDURE)
-SYMBOL_VECTOR=(PR_LockFile=PROCEDURE)
-SYMBOL_VECTOR=(PR_LogFlush=PROCEDURE)
-SYMBOL_VECTOR=(PR_LogPrint=PROCEDURE)
-SYMBOL_VECTOR=(PR_MakeDir=PROCEDURE)
-SYMBOL_VECTOR=(PR_MemMap=PROCEDURE)
-SYMBOL_VECTOR=(PR_MemUnmap=PROCEDURE)
-SYMBOL_VECTOR=(PR_MicrosecondsToInterval=PROCEDURE)
-SYMBOL_VECTOR=(PR_MillisecondsToInterval=PROCEDURE)
-SYMBOL_VECTOR=(PR_MkDir=PROCEDURE)
-SYMBOL_VECTOR=(PR_NetAddrToString=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewCondVar=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewLogModule=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewMonitor=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewNamedMonitor=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewProcessAttr=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewSem=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewTCPSocket=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewTCPSocketPair=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewUDPSocket=PROCEDURE)
-SYMBOL_VECTOR=(PR_NormalizeTime=PROCEDURE)
-SYMBOL_VECTOR=(PR_Notify=PROCEDURE)
-SYMBOL_VECTOR=(PR_NotifyAll=PROCEDURE)
-SYMBOL_VECTOR=(PR_NotifyAllCondVar=PROCEDURE)
-SYMBOL_VECTOR=(PR_NotifyCondVar=PROCEDURE)
-SYMBOL_VECTOR=(PR_Open=PROCEDURE)
-SYMBOL_VECTOR=(PR_OpenDir=PROCEDURE)
-SYMBOL_VECTOR=(PR_OpenFile=PROCEDURE)
-SYMBOL_VECTOR=(PR_OpenSemaphore=PROCEDURE)
-SYMBOL_VECTOR=(PR_OpenTCPSocket=PROCEDURE)
-SYMBOL_VECTOR=(PR_OpenUDPSocket=PROCEDURE)
-SYMBOL_VECTOR=(PR_ParseTimeString=PROCEDURE)
-SYMBOL_VECTOR=(PR_Poll=PROCEDURE)
-SYMBOL_VECTOR=(PR_PopIOLayer=PROCEDURE)
-SYMBOL_VECTOR=(PR_PostSem=PROCEDURE)
-SYMBOL_VECTOR=(PR_PostSemaphore=PROCEDURE)
-SYMBOL_VECTOR=(PR_ProcessAttrSetCurren1sb1r7b$=PROCEDURE) ! PR_ProcessAttrSetCurrentDirectory
-SYMBOL_VECTOR=(PR_ProcessAttrSetInheri3dpg1d0$=PROCEDURE) ! PR_ProcessAttrSetInheritableFileMap
-SYMBOL_VECTOR=(PR_ProcessAttrSetInheritableFD=PROCEDURE)
-SYMBOL_VECTOR=(PR_ProcessAttrSetStdioRedirect=PROCEDURE)
-SYMBOL_VECTOR=(PR_ProcessExit=PROCEDURE)
-SYMBOL_VECTOR=(PR_PushIOLayer=PROCEDURE)
-SYMBOL_VECTOR=(PR_QueueJob=PROCEDURE)
-SYMBOL_VECTOR=(PR_QueueJob_Accept=PROCEDURE)
-SYMBOL_VECTOR=(PR_QueueJob_Connect=PROCEDURE)
-SYMBOL_VECTOR=(PR_QueueJob_Read=PROCEDURE)
-SYMBOL_VECTOR=(PR_QueueJob_Timer=PROCEDURE)
-SYMBOL_VECTOR=(PR_QueueJob_Write=PROCEDURE)
-SYMBOL_VECTOR=(PR_RWLock_Rlock=PROCEDURE)
-SYMBOL_VECTOR=(PR_RWLock_Unlock=PROCEDURE)
-SYMBOL_VECTOR=(PR_RWLock_Wlock=PROCEDURE)
-SYMBOL_VECTOR=(PR_Read=PROCEDURE)
-SYMBOL_VECTOR=(PR_ReadDir=PROCEDURE)
-SYMBOL_VECTOR=(PR_Realloc=PROCEDURE)
-SYMBOL_VECTOR=(PR_Recv=PROCEDURE)
-SYMBOL_VECTOR=(PR_RecvFrom=PROCEDURE)
-SYMBOL_VECTOR=(PR_Rename=PROCEDURE)
-SYMBOL_VECTOR=(PR_ResetAlarm=PROCEDURE)
-SYMBOL_VECTOR=(PR_ResetProcessAttr=PROCEDURE)
-SYMBOL_VECTOR=(PR_ResumeAll=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub1=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub2=PROCEDURE)
-SYMBOL_VECTOR=(PR_RmDir=PROCEDURE)
-SYMBOL_VECTOR=(PR_ScanStackPointers=PROCEDURE)
-SYMBOL_VECTOR=(PR_SecondsToInterval=PROCEDURE)
-SYMBOL_VECTOR=(PR_Seek64=PROCEDURE)
-SYMBOL_VECTOR=(PR_Seek=PROCEDURE)
-SYMBOL_VECTOR=(PR_Select=PROCEDURE)
-SYMBOL_VECTOR=(PR_Send=PROCEDURE)
-SYMBOL_VECTOR=(PR_SendFile=PROCEDURE)
-SYMBOL_VECTOR=(PR_SendTo=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetAlarm=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetEnv=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetErrorText=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetFDInheritable=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetLogBuffering=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetLogFile=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetNetAddr=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetPollableEvent=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetSocketOption=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetStdioRedirect=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetSysfdTableSize=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetThreadAffinityMask=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetThreadDumpProc=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetThreadGCAble=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetThreadPriority=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetThreadPrivate=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetThreadRecycleMode=PROCEDURE)
-SYMBOL_VECTOR=(PR_Shutdown=PROCEDURE)
-SYMBOL_VECTOR=(PR_ShutdownThreadPool=PROCEDURE)
-SYMBOL_VECTOR=(PR_Sleep=PROCEDURE)
-SYMBOL_VECTOR=(PR_Socket=PROCEDURE)
-SYMBOL_VECTOR=(PR_StackPop=PROCEDURE)
-SYMBOL_VECTOR=(PR_StackPush=PROCEDURE)
-SYMBOL_VECTOR=(PR_Stat=PROCEDURE)
-SYMBOL_VECTOR=(PR_SuspendAll=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub3=PROCEDURE)
-SYMBOL_VECTOR=(PR_Sync=PROCEDURE)
-SYMBOL_VECTOR=(PR_TLockFile=PROCEDURE)
-SYMBOL_VECTOR=(PR_ThreadScanStackPointers=PROCEDURE)
-SYMBOL_VECTOR=(PR_TicksPerSecond=PROCEDURE)
-SYMBOL_VECTOR=(PR_TransmitFile=PROCEDURE)
-SYMBOL_VECTOR=(PR_USPacificTimeParameters=PROCEDURE)
-SYMBOL_VECTOR=(PR_UnblockClockInterrupts=PROCEDURE)
-SYMBOL_VECTOR=(PR_UnblockInterrupt=PROCEDURE)
-SYMBOL_VECTOR=(PR_UnloadLibrary=PROCEDURE)
-SYMBOL_VECTOR=(PR_Unlock=PROCEDURE)
-SYMBOL_VECTOR=(PR_UnlockFile=PROCEDURE)
-SYMBOL_VECTOR=(PR_Wait=PROCEDURE)
-SYMBOL_VECTOR=(PR_WaitCondVar=PROCEDURE)
-SYMBOL_VECTOR=(PR_WaitForPollableEvent=PROCEDURE)
-SYMBOL_VECTOR=(PR_WaitProcess=PROCEDURE)
-SYMBOL_VECTOR=(PR_WaitRecvReady=PROCEDURE)
-SYMBOL_VECTOR=(PR_WaitSem=PROCEDURE)
-SYMBOL_VECTOR=(PR_WaitSemaphore=PROCEDURE)
-SYMBOL_VECTOR=(PR_Write=PROCEDURE)
-SYMBOL_VECTOR=(PR_Writev=PROCEDURE)
-SYMBOL_VECTOR=(PR_XIsLocked=PROCEDURE)
-SYMBOL_VECTOR=(PR_XLock=PROCEDURE)
-SYMBOL_VECTOR=(PR_XNotify=PROCEDURE)
-SYMBOL_VECTOR=(PR_XNotifyAll=PROCEDURE)
-SYMBOL_VECTOR=(PR_XUnlock=PROCEDURE)
-SYMBOL_VECTOR=(PR_XWait=PROCEDURE)
-SYMBOL_VECTOR=(PR_Yield=PROCEDURE)
-SYMBOL_VECTOR=(PR_cnvtf=PROCEDURE)
-SYMBOL_VECTOR=(PR_dtoa=PROCEDURE)
-SYMBOL_VECTOR=(PR_htonl=PROCEDURE)
-SYMBOL_VECTOR=(PR_htonll=PROCEDURE)
-SYMBOL_VECTOR=(PR_htons=PROCEDURE)
-SYMBOL_VECTOR=(PR_ntohl=PROCEDURE)
-SYMBOL_VECTOR=(PR_ntohll=PROCEDURE)
-SYMBOL_VECTOR=(PR_ntohs=PROCEDURE)
-SYMBOL_VECTOR=(PR_smprintf=PROCEDURE)
-SYMBOL_VECTOR=(PR_smprintf_free=PROCEDURE)
-SYMBOL_VECTOR=(PR_sprintf_append=PROCEDURE)
-SYMBOL_VECTOR=(PR_sxprintf=PROCEDURE)
-SYMBOL_VECTOR=(PR_vfprintf=PROCEDURE)
-SYMBOL_VECTOR=(PR_vsmprintf=PROCEDURE)
-SYMBOL_VECTOR=(PR_vsnprintf=PROCEDURE)
-SYMBOL_VECTOR=(PR_vsprintf_append=PROCEDURE)
-SYMBOL_VECTOR=(PR_vsxprintf=PROCEDURE)
-!
-! Start of 2,3 additions
-!
-SYMBOL_VECTOR=(LL_MaxInt=PROCEDURE)
-SYMBOL_VECTOR=(LL_MinInt=PROCEDURE)
-SYMBOL_VECTOR=(LL_Zero=PROCEDURE)
-SYMBOL_VECTOR=(PR_Abort=PROCEDURE)
-SYMBOL_VECTOR=(PR_AddToCounter=PROCEDURE)
-SYMBOL_VECTOR=(PR_AddWaitFileDesc=PROCEDURE)
-SYMBOL_VECTOR=(PR_AtomicIncrement=PROCEDURE)
-SYMBOL_VECTOR=(PR_CEnterMonitor=PROCEDURE)
-SYMBOL_VECTOR=(PR_CeilingLog2=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateCounter=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateAlarm=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateFileMap=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateOrderedLock=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateTrace=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateThreadPool=PROCEDURE)
-SYMBOL_VECTOR=(PR_DecrementCounter=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyCounter=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyOrderedLock=PROCEDURE)
-SYMBOL_VECTOR=(PR_DestroyTrace=PROCEDURE)
-SYMBOL_VECTOR=(PR_ErrorToString=PROCEDURE)
-SYMBOL_VECTOR=(PR_ExplodeTime=PROCEDURE)
-SYMBOL_VECTOR=(PR_FindNextCounterQname=PROCEDURE)
-SYMBOL_VECTOR=(PR_FindNextCounterRname=PROCEDURE)
-SYMBOL_VECTOR=(PR_FindNextTraceQname=PROCEDURE)
-SYMBOL_VECTOR=(PR_FindNextTraceRname=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetDescType=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetDirectorySeparator=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetCounter=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetCounterHandleFromName=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetCounterNameFromHandle=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetEnv=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetGCRegisters=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetPageSize=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetRandomNoise=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetSpecialFD=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetUniqueIdentity=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetTraceEntries=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetTraceHandleFromName=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetTraceNameFromHandle=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetTraceOption=PROCEDURE)
-SYMBOL_VECTOR=(PR_IntervalNow=PROCEDURE)
-SYMBOL_VECTOR=(PR_IncrementCounter=PROCEDURE)
-SYMBOL_VECTOR=(PR_Malloc=PROCEDURE)
-SYMBOL_VECTOR=(PR_LockOrderedLock=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewLock=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewPollableEvent=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewRWLock=PROCEDURE)
-SYMBOL_VECTOR=(PR_NewThreadPrivateIndex=PROCEDURE)
-SYMBOL_VECTOR=(PR_Now=PROCEDURE)
-SYMBOL_VECTOR=(PR_OpenAnonFileMap=PROCEDURE)
-SYMBOL_VECTOR=(PR_OpenSharedMemory=PROCEDURE)
-SYMBOL_VECTOR=(PR_RecordTraceEntries=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetConcurrency=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetFDCacheSize=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetLibraryPath=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetCounter=PROCEDURE)
-SYMBOL_VECTOR=(PR_StringToNetAddr=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetTraceOption=PROCEDURE)
-SYMBOL_VECTOR=(PR_SubtractFromCounter=PROCEDURE)
-SYMBOL_VECTOR=(PR_VersionCheck=PROCEDURE)
-SYMBOL_VECTOR=(PR_Trace=PROCEDURE)
-SYMBOL_VECTOR=(PR_UnlockOrderedLock=PROCEDURE)
-SYMBOL_VECTOR=(PR_fprintf=PROCEDURE)
-SYMBOL_VECTOR=(PR_snprintf=PROCEDURE)
-SYMBOL_VECTOR=(PR_sscanf=PROCEDURE)
-SYMBOL_VECTOR=(PR_strtod=PROCEDURE)
-SYMBOL_VECTOR=(PRP_DestroyNakedCondVar=PROCEDURE)
-SYMBOL_VECTOR=(PRP_NakedBroadcast=PROCEDURE)
-SYMBOL_VECTOR=(PRP_NakedNotify=PROCEDURE)
-SYMBOL_VECTOR=(PRP_NakedWait=PROCEDURE)
-SYMBOL_VECTOR=(PRP_NewNakedCondVar=PROCEDURE)
-SYMBOL_VECTOR=(PRP_TryLock=PROCEDURE)
-SYMBOL_VECTOR=(libVersionPoint=PROCEDURE)
-!
-! NSPR private
-!
-SYMBOL_VECTOR=(GetExecutionEnvironment=PROCEDURE)
-SYMBOL_VECTOR=(PT_FPrintStats=PROCEDURE)
-SYMBOL_VECTOR=(SetExecutionEnvironment=PROCEDURE)
-!
-! Start of 2,4 additions
-! 51 stubs (4 thru 54) so that PR_CreateThread ends up at 1B70.
-! Over time some of these stubs will get replaced by new symbols.
-!
-SYMBOL_VECTOR=(PR_VMS_Stub4=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub5=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub6=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub7=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub8=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub9=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub10=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub11=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub12=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub13=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub14=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub15=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub16=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub17=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub18=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub19=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub20=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub21=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub22=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub23=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub24=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub25=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub26=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub27=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub28=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub29=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub30=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub31=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub32=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub33=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub34=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub35=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub36=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub37=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub38=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub39=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub40=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub41=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub42=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub43=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub44=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub45=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub46=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub47=PROCEDURE)
-SYMBOL_VECTOR=(PR_VMS_Stub48=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetAddrInfoByName=PROCEDURE)		! was Stub49
-SYMBOL_VECTOR=(PR_FreeAddrInfo=PROCEDURE)		! was Stub50
-SYMBOL_VECTOR=(PR_EnumerateAddrInfo=PROCEDURE)		! was Stub51
-SYMBOL_VECTOR=(PR_GetCanonNameFromAddrInfo=PROCEDURE)	! was Stub52
-SYMBOL_VECTOR=(PR_GetPathSeparator=PROCEDURE)		! was Stub53
-SYMBOL_VECTOR=(LL_MaxUint=PROCEDURE)			! was Stub54
-!
-SYMBOL_VECTOR=(PR_CallOnceWithArg=PROCEDURE)
-SYMBOL_VECTOR=(PR_GetLibraryFilePathname=PROCEDURE)
-SYMBOL_VECTOR=(PR_SetError=PROCEDURE)
-SYMBOL_VECTOR=(PR_CreateThread=PROCEDURE)
-!
-! --------------------------------------------------------------------------
-! End of fixed section
-! --------------------------------------------------------------------------
-!
--- a/nsprpub/pr/src/prvrsion.c
+++ b/nsprpub/pr/src/prvrsion.c
@@ -36,19 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "prinit.h"
 #include "prvrsion.h"
 
 /************************************************************************/
 /**************************IDENTITY AND VERSIONING***********************/
 /************************************************************************/
-#ifndef XP_MAC
 #include "_pr_bld.h"
-#endif
 #if !defined(_BUILD_TIME)
 #ifdef HAVE_LONG_LONG
 #define _BUILD_TIME 0
 #else
 #define _BUILD_TIME {0, 0}
 #endif
 #endif
 #if !defined(_BUILD_STRING)
--- a/nsprpub/pr/src/pthreads/ptio.c
+++ b/nsprpub/pr/src/pthreads/ptio.c
@@ -206,17 +206,17 @@ static PRBool _pr_ipv6_v6only_on_by_defa
 #define _PRSelectFdSetArg_t int *
 #elif defined(AIX4_1)
 #define _PRSelectFdSetArg_t void *
 #elif defined(IRIX) || (defined(AIX) && !defined(AIX4_1)) \
     || defined(OSF1) || defined(SOLARIS) \
     || defined(HPUX10_30) || defined(HPUX11) \
     || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
     || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
-    || defined(BSDI) || defined(VMS) || defined(NTO) || defined(DARWIN) \
+    || defined(BSDI) || defined(NTO) || defined(DARWIN) \
     || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN)
 #define _PRSelectFdSetArg_t fd_set *
 #else
 #error "Cannot determine architecture"
 #endif
 
 static PRFileDesc *pt_SetMethods(
     PRIntn osfd, PRDescType type, PRBool isAcceptedSocket, PRBool imported);
@@ -290,18 +290,17 @@ static PRBool IsValidNetAddrLen(const PR
  * structure, used in the address length argument to bind,
  * connect, accept, getsockname, getpeername, etc.  Posix.1g
  * defines this type as socklen_t.  It is size_t or int on
  * most current systems.
  */
 #if defined(HAVE_SOCKLEN_T) \
     || (defined(__GLIBC__) && __GLIBC__ >= 2)
 typedef socklen_t pt_SockLen;
-#elif (defined(AIX) && !defined(AIX4_1)) \
-    || defined(VMS)
+#elif (defined(AIX) && !defined(AIX4_1)) 
 typedef PRSize pt_SockLen;
 #else
 typedef PRIntn pt_SockLen;
 #endif
 
 typedef struct pt_Continuation pt_Continuation;
 typedef PRBool (*ContinuationFn)(pt_Continuation *op, PRInt16 revents);
 
@@ -3265,17 +3264,17 @@ static PRIOMethods _pr_socketpollfd_meth
     (PRReservedFN)_PR_InvalidInt, 
     (PRReservedFN)_PR_InvalidInt, 
     (PRReservedFN)_PR_InvalidInt
 };
 
 #if defined(HPUX) || defined(OSF1) || defined(SOLARIS) || defined (IRIX) \
     || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
     || defined(AIX) || defined(FREEBSD) || defined(NETBSD) \
-    || defined(OPENBSD) || defined(BSDI) || defined(VMS) || defined(NTO) \
+    || defined(OPENBSD) || defined(BSDI) || defined(NTO) \
     || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS) \
     || defined(SYMBIAN)
 #define _PR_FCNTL_FLAGS O_NONBLOCK
 #else
 #error "Can't determine architecture"
 #endif
 
 /*
@@ -4699,31 +4698,31 @@ PR_IMPLEMENT(PRStatus) PR_UnlockFile(PRF
 
 /*
  * The next two entry points should not be in the API, but they are
  * defined here for historical (or hysterical) reasons.
  */
 
 PR_IMPLEMENT(PRInt32) PR_GetSysfdTableMax(void)
 {
-#if defined(AIX) || defined(VMS) || defined(SYMBIAN)
+#if defined(AIX) || defined(SYMBIAN)
     return sysconf(_SC_OPEN_MAX);
 #else
     struct rlimit rlim;
 
     if ( getrlimit(RLIMIT_NOFILE, &rlim) < 0) 
        return -1;
 
     return rlim.rlim_max;
 #endif
 }
 
 PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(PRIntn table_size)
 {
-#if defined(AIX) || defined(VMS) || defined(SYMBIAN)
+#if defined(AIX) || defined(SYMBIAN)
     return -1;
 #else
     struct rlimit rlim;
     PRInt32 tableMax = PR_GetSysfdTableMax();
 
     if (tableMax < 0) return -1;
     rlim.rlim_max = tableMax;
 
--- a/nsprpub/pr/src/pthreads/ptthread.c
+++ b/nsprpub/pr/src/pthreads/ptthread.c
@@ -1035,16 +1035,20 @@ PR_IMPLEMENT(PRStatus) PR_Cleanup(void)
     int rv;
     PR_LOG(_pr_thread_lm, PR_LOG_MIN, ("PR_Cleanup: shutting down NSPR"));
     PR_ASSERT(me->state & PT_THREAD_PRIMORD);
     if (me->state & PT_THREAD_PRIMORD)
     {
         PR_Lock(pt_book.ml);
         while (pt_book.user > pt_book.this_many)
             PR_WaitCondVar(pt_book.cv, PR_INTERVAL_NO_TIMEOUT);
+        if (me->state & PT_THREAD_SYSTEM)
+            pt_book.system -= 1;
+        else
+            pt_book.user -= 1;
         PR_Unlock(pt_book.ml);
 
         _PR_CleanupMW();
         _PR_CleanupTime();
         _PR_CleanupDtoa();
         _PR_CleanupCallOnce();
         _PR_ShutdownLinker();
         _PR_LogCleanup();
@@ -1342,17 +1346,17 @@ static void suspend_signal_handler(PRInt
 	/*
 	 * now, block current thread
 	 */
 #if defined(PT_NO_SIGTIMEDWAIT)
 	pthread_cond_signal(&me->suspendResumeCV);
 	while (me->suspend & PT_THREAD_SUSPENDED)
 	{
 #if !defined(FREEBSD) && !defined(NETBSD) && !defined(OPENBSD) \
-    && !defined(BSDI) && !defined(VMS) && !defined(UNIXWARE) \
+    && !defined(BSDI) && !defined(UNIXWARE) \
     && !defined(DARWIN) && !defined(RISCOS) \
     && !defined(SYMBIAN) /*XXX*/
         PRIntn rv;
 	    sigwait(&sigwait_set, &rv);
 #endif
 	}
 	me->suspend |= PT_THREAD_RESUMED;
 	pthread_cond_signal(&me->suspendResumeCV);
@@ -1388,19 +1392,17 @@ static void pt_SuspendSet(PRThread *thre
      * Check the thread state and signal the thread to suspend
      */
 
     PR_ASSERT((thred->suspend & PT_THREAD_SUSPENDED) == 0);
 
     PR_LOG(_pr_gc_lm, PR_LOG_ALWAYS, 
 	   ("doing pthread_kill in pt_SuspendSet thred %p tid = %X\n",
 	   thred, thred->id));
-#if defined(VMS)
-    rv = thread_suspend(thred);
-#elif defined(SYMBIAN)
+#if defined(SYMBIAN)
     /* All signal group functions are not implemented in Symbian OS */
     rv = 0;
 #else
     rv = pthread_kill (thred->id, SIGUSR2);
 #endif
     PR_ASSERT(0 == rv);
 }
 
@@ -1447,19 +1449,17 @@ static void pt_ResumeSet(PRThread *thred
      */
 
     PR_ASSERT(thred->suspend & PT_THREAD_SUSPENDED);
 
 
     thred->suspend &= ~PT_THREAD_SUSPENDED;
 
 #if defined(PT_NO_SIGTIMEDWAIT)
-#if defined(VMS)
-	thread_resume(thred);
-#elif defined(SYMBIAN) 
+#if defined(SYMBIAN) 
 	/* All signal group functions are not implemented in Symbian OS */
 #else
 	pthread_kill(thred->id, SIGUSR1);
 #endif
 #endif
 
 }  /* pt_ResumeSet */
 
--- a/nsprpub/pr/src/threads/combined/prucpu.c
+++ b/nsprpub/pr/src/threads/combined/prucpu.c
@@ -387,19 +387,16 @@ static void PR_CALLBACK _PR_CPU_Idle(voi
 		if (!_PR_IS_NATIVE_THREAD(me)) _PR_FAST_INTSON(is);
     }
 }
 #endif /* _PR_GLOBAL_THREADS_ONLY */
 
 PR_IMPLEMENT(void) PR_SetConcurrency(PRUintn numCPUs)
 {
 #if defined(_PR_GLOBAL_THREADS_ONLY) || defined(_PR_LOCAL_THREADS_ONLY)
-#ifdef XP_MAC 
-#pragma unused(numCPUs) 
-#endif
 
     /* do nothing */
 
 #else /* combined, MxN thread model */
 
     PRUintn newCPU;
     _PRCPU *cpu;
     PRThread *thr;
--- a/nsprpub/pr/src/threads/combined/prucv.c
+++ b/nsprpub/pr/src/threads/combined/prucv.c
@@ -294,19 +294,17 @@ void _PR_NotifyCondVar(PRCondVar *cvar, 
 
     if ( !_PR_IS_NATIVE_THREAD(me))
     	_PR_INTSOFF(is);
     PR_ASSERT(_PR_IS_NATIVE_THREAD(me) || _PR_MD_GET_INTSOFF() != 0);
 
     _PR_CVAR_LOCK(cvar);
     q = cvar->condQ.next;
     while (q != &cvar->condQ) {
-#ifndef XP_MAC
         PR_LOG(_pr_cvar_lm, PR_LOG_MIN, ("_PR_NotifyCondVar: cvar=%p", cvar));
-#endif
         if (_PR_THREAD_CONDQ_PTR(q)->wait.cvar)  {
             if (_PR_NotifyThread(_PR_THREAD_CONDQ_PTR(q), me) == PR_TRUE)
                 break;
         }
         q = q->next;
     }
     _PR_CVAR_UNLOCK(cvar);
 
@@ -343,20 +341,18 @@ void _PR_ClockInterrupt(void)
     PRIntervalTime elapsed, now;
  
     PR_ASSERT(_PR_MD_GET_INTSOFF() != 0);
     /* Figure out how much time elapsed since the last clock tick */
     now = PR_IntervalNow();
     elapsed = now - cpu->last_clock;
     cpu->last_clock = now;
 
-#ifndef XP_MAC
     PR_LOG(_pr_clock_lm, PR_LOG_MAX,
 	   ("ExpireWaits: elapsed=%lld usec", elapsed));
-#endif
 
     while(1) {
         _PR_SLEEPQ_LOCK(cpu);
         if (_PR_SLEEPQ(cpu).next == &_PR_SLEEPQ(cpu)) {
             _PR_SLEEPQ_UNLOCK(cpu);
             break;
         }
 
--- a/nsprpub/pr/src/threads/combined/prulock.c
+++ b/nsprpub/pr/src/threads/combined/prulock.c
@@ -61,19 +61,17 @@ void _PR_IntsOn(_PRCPU *cpu)
 {
     PRUintn missed, pri, i;
     _PRInterruptTable *it;
     PRThread *me;
 
     PR_ASSERT(cpu);   /* Global threads don't have CPUs */
     PR_ASSERT(_PR_MD_GET_INTSOFF() > 0);
 	me = _PR_MD_CURRENT_THREAD();
-#if !defined(XP_MAC)
     PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
-#endif
 
     /*
     ** Process delayed interrupts. This logic is kinda scary because we
     ** need to avoid losing an interrupt (it's ok to delay an interrupt
     ** until later).
     **
     ** There are two missed state words. _pr_ints.where indicates to the
     ** interrupt handler which state word is currently safe for
@@ -87,20 +85,18 @@ void _PR_IntsOn(_PRCPU *cpu)
     */
     for (i = 0; i < 2; i++) {
         cpu->where = (1 - i);
         missed = cpu->u.missed[i];
         if (missed != 0) {
             cpu->u.missed[i] = 0;
             for (it = _pr_interruptTable; it->name; it++) {
                 if (missed & it->missed_bit) {
-#ifndef XP_MAC
                     PR_LOG(_pr_sched_lm, PR_LOG_MIN,
                            ("IntsOn[0]: %s intr", it->name));
-#endif
                     (*it->handler)();
                 }
             }
         }
     }
 
     if (cpu->u.missed[3] != 0) {
         _PRCPU *cpu;
@@ -225,19 +221,17 @@ extern PRThread *suspendAllThread;
 PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
 {
     PRThread *me = _PR_MD_CURRENT_THREAD();
     PRIntn is;
     PRThread *t;
     PRCList *q;
 
     PR_ASSERT(me != suspendAllThread); 
-#if !defined(XP_MAC)
     PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
-#endif
     PR_ASSERT(lock != NULL);
 #ifdef _PR_GLOBAL_THREADS_ONLY 
     PR_ASSERT(lock->owner != me);
     _PR_MD_LOCK(&lock->ilock);
     lock->owner = me;
     return;
 #else  /* _PR_GLOBAL_THREADS_ONLY */
 
@@ -338,19 +332,17 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock 
     PRCList *q;
     PRThreadPriority pri, boost;
     PRIntn is;
     PRThread *me = _PR_MD_CURRENT_THREAD();
 
     PR_ASSERT(lock != NULL);
     PR_ASSERT(lock->owner == me);
     PR_ASSERT(me != suspendAllThread); 
-#if !defined(XP_MAC)
     PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
-#endif
     if (lock->owner != me) {
         return PR_FAILURE;
     }
 
 #ifdef _PR_GLOBAL_THREADS_ONLY 
     lock->owner = 0;
     _PR_MD_UNLOCK(&lock->ilock);
     return PR_SUCCESS;
--- a/nsprpub/pr/src/threads/combined/pruthr.c
+++ b/nsprpub/pr/src/threads/combined/pruthr.c
@@ -44,20 +44,16 @@
 ** Some local variables report warnings on Win95 because the code paths
 ** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
 ** The pragma suppresses the warning.
 **
 */
 #pragma warning(disable : 4101)
 #endif          
 
-#if defined(XP_MAC)
-#include <LowMem.h>
-#endif
-
 /* _pr_activeLock protects the following global variables */
 PRLock *_pr_activeLock;
 PRInt32 _pr_primordialExitCount;   /* In PR_Cleanup(), the primordial thread
                     * waits until all other user (non-system)
                     * threads have terminated before it exits.
                     * So whenever we decrement _pr_userActive,
                     * it is compared with
                     * _pr_primordialExitCount.
@@ -93,36 +89,30 @@ static void _PR_DecrActiveThreadCount(PR
 static PRThread *_PR_AttachThread(PRThreadType, PRThreadPriority, PRThreadStack *);
 static void _PR_InitializeNativeStack(PRThreadStack *ts);
 static void _PR_InitializeRecycledThread(PRThread *thread);
 static void _PR_UserRunThread(void);
 
 void _PR_InitThreads(PRThreadType type, PRThreadPriority priority,
     PRUintn maxPTDs)
 {
-#if defined(XP_MAC)
-#pragma unused (maxPTDs)
-#endif
-
     PRThread *thread;
     PRThreadStack *stack;
 
     _pr_terminationCVLock = PR_NewLock();
     _pr_activeLock = PR_NewLock();
 
 #ifndef HAVE_CUSTOM_USER_THREADS
     stack = PR_NEWZAP(PRThreadStack);
 #ifdef HAVE_STACK_GROWING_UP
     stack->stackTop = (char*) ((((long)&type) >> _pr_pageShift)
                   << _pr_pageShift);
 #else
 #if defined(SOLARIS) || defined (UNIXWARE) && defined (USR_SVR4_THREADS)
     stack->stackTop = (char*) &thread;
-#elif defined(XP_MAC)
-    stack->stackTop = (char*) LMGetCurStackBase();
 #else
     stack->stackTop = (char*) ((((long)&type + _pr_pageSize - 1)
                 >> _pr_pageShift) << _pr_pageShift);
 #endif
 #endif
 #else
     /* If stack is NULL, we're using custom user threads like NT fibers. */
     stack = PR_NEWZAP(PRThreadStack);
@@ -918,19 +908,17 @@ void _PR_Schedule(void)
     if (r & (1 << pri)) {
             for (qp = _PR_RUNQ(cpu)[pri].next; 
                  qp != &_PR_RUNQ(cpu)[pri];
                  qp = qp->next) {
                 thread = _PR_THREAD_PTR(qp);
                 /*
                 * skip non-schedulable threads
                 */
-#if !defined(XP_MAC)
                 PR_ASSERT(!(thread->flags & _PR_IDLE_THREAD));
-#endif
                 if ((thread->no_sched) && (me != thread)){
                     thread = NULL;
                     continue;
                 } else {
                     /* Pull thread off of its run queue */
                     _PR_DEL_RUNQ(thread);
                     _PR_RUNQ_UNLOCK(cpu);
                     goto found_thread;
@@ -1000,20 +988,16 @@ found_thread:
 ** Attaches a thread.  
 ** Does not set the _PR_MD_CURRENT_THREAD.  
 ** Does not specify the scope of the thread.
 */
 static PRThread *
 _PR_AttachThread(PRThreadType type, PRThreadPriority priority,
     PRThreadStack *stack)
 {
-#if defined(XP_MAC)
-#pragma unused (type)
-#endif
-
     PRThread *thread;
     char *mem;
 
     if (priority > PR_PRIORITY_LAST) {
         priority = PR_PRIORITY_LAST;
     } else if (priority < PR_PRIORITY_FIRST) {
         priority = PR_PRIORITY_FIRST;
     }
@@ -1042,20 +1026,16 @@ PR_IMPLEMENT(PRThread*)
                      void (*start)(void *arg),
                      void *arg,
                      PRThreadPriority priority,
                      PRThreadScope scope,
                      PRThreadState state,
                      PRUint32 stackSize,
                      PRUint32 flags)
 {
-#if defined(XP_MAC)
-#pragma unused (scope)
-#endif
-
     PRThread *thread;
 
     thread = _PR_AttachThread(type, priority, NULL);
 
     if (thread) {
         PR_Lock(_pr_activeLock);
         thread->flags = (flags | _PR_GLOBAL_SCOPE);
         thread->id = ++_pr_utid;
@@ -1499,19 +1479,16 @@ PRThread* _PRI_AttachThread(PRThreadType
         }
     }
     return thread;
 }
 
 PR_IMPLEMENT(PRThread*) PR_AttachThread(PRThreadType type,
     PRThreadPriority priority, PRThreadStack *stack)
 {
-#ifdef XP_MAC
-#pragma unused( type, priority, stack )
-#endif
     return PR_GetCurrentThread();
 }
 
 PR_IMPLEMENT(void) PR_DetachThread(void)
 {
     /*
      * On IRIX, Solaris, and Windows, foreign threads are detached when
      * they terminate.
--- a/nsprpub/pr/src/threads/prcthr.c
+++ b/nsprpub/pr/src/threads/prcthr.c
@@ -299,39 +299,29 @@ PR_IMPLEMENT(void) SetExecutionEnvironme
 }
 
 
 PR_IMPLEMENT(PRInt32) PR_GetThreadAffinityMask(PRThread *thread, PRUint32 *mask)
 {
 #ifdef HAVE_THREAD_AFFINITY
     return _PR_MD_GETTHREADAFFINITYMASK(thread, mask);
 #else
-
-#if defined(XP_MAC)
-#pragma unused (thread, mask)
-#endif
-
     return 0;
 #endif
 }
 
 PR_IMPLEMENT(PRInt32) PR_SetThreadAffinityMask(PRThread *thread, PRUint32 mask )
 {
 #ifdef HAVE_THREAD_AFFINITY
 #ifndef IRIX
     return _PR_MD_SETTHREADAFFINITYMASK(thread, mask);
 #else
 	return 0;
 #endif
 #else
-
-#if defined(XP_MAC)
-#pragma unused (thread, mask)
-#endif
-
     return 0;
 #endif
 }
 
 /* This call is thread unsafe if another thread is calling SetConcurrency()
  */
 PR_IMPLEMENT(PRInt32) PR_SetCPUAffinityMask(PRUint32 mask)
 {
@@ -349,20 +339,16 @@ PR_IMPLEMENT(PRInt32) PR_SetCPUAffinityM
 
         cpu = _PR_CPU_PTR(qp);
         PR_SetThreadAffinityMask(cpu->thread, mask);
 
         qp = qp->next;
     }
 #endif
 
-#if defined(XP_MAC)
-#pragma unused (mask)
-#endif
-
     return 0;
 }
 
 PRUint32 _pr_recycleThreads = 0;
 PR_IMPLEMENT(void) PR_SetThreadRecycleMode(PRUint32 count)
 {
     _pr_recycleThreads = count;
 }
@@ -392,19 +378,16 @@ PR_IMPLEMENT(PRThread*) PR_CreateThreadB
                             stackSize, _PR_BOUND_THREAD);
 }
 #endif
 
 
 PR_IMPLEMENT(PRThread*) PR_AttachThreadGCAble(
     PRThreadType type, PRThreadPriority priority, PRThreadStack *stack)
 {
-#ifdef XP_MAC
-#pragma unused (type, priority, stack)
-#endif
     /* $$$$ not sure how to finese this one */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return NULL;
 }
 
 PR_IMPLEMENT(void) PR_SetThreadGCAble()
 {
     if (!_pr_initialized) _PR_ImplicitInitialization();
@@ -418,19 +401,16 @@ PR_IMPLEMENT(void) PR_ClearThreadGCAble(
     if (!_pr_initialized) _PR_ImplicitInitialization();
     PR_Lock(_pr_activeLock);
         _PR_MD_CURRENT_THREAD()->flags &= (~_PR_GCABLE_THREAD);
         PR_Unlock(_pr_activeLock);
 }
 
 PR_IMPLEMENT(PRThreadScope) PR_GetThreadScope(const PRThread *thread)
 {
-#ifdef XP_MAC
-#pragma unused( thread )
-#endif
     if (!_pr_initialized) _PR_ImplicitInitialization();
 
     if (_PR_IS_NATIVE_THREAD(thread)) {
     	return (thread->flags & _PR_BOUND_THREAD) ? PR_GLOBAL_BOUND_THREAD :
 										PR_GLOBAL_THREAD;
     } else
         return PR_LOCAL_THREAD;
 }
--- a/nsprpub/pr/src/threads/prsem.c
+++ b/nsprpub/pr/src/threads/prsem.c
@@ -31,21 +31,17 @@
  * 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"
-#if defined(XP_MAC)
-#include "prsem.h"
-#else
 #include "obsolete/prsem.h"
-#endif
 
 /************************************************************************/
 
 /*
 ** Create a new semaphore.
 */
 PR_IMPLEMENT(PRSemaphore*) PR_NewSem(PRUintn value)
 {
--- a/nsprpub/pr/tests/Makefile.in
+++ b/nsprpub/pr/tests/Makefile.in
@@ -142,16 +142,17 @@ CSRCS =             \
 	prftest2.c		\
 	primblok.c		\
 	priotest.c		\
 	provider.c		\
 	prpoll.c		\
 	prpollml.c		\
 	ranfile.c       \
 	randseed.c      \
+	reinit.c        \
 	rmdir.c			\
 	rwlocktest.c    \
 	sel_spd.c  		\
 	selct_er.c	    \
 	selct_nm.c	    \
 	selct_to.c	    \
 	select2.c  		\
 	selintr.c  		\
--- a/nsprpub/pr/tests/accept.c
+++ b/nsprpub/pr/tests/accept.c
@@ -78,17 +78,17 @@
 #define ACCEPT_READ_FAST_CB    0x5
 
 #define CLIENT_NORMAL        0x1
 #define CLIENT_TIMEOUT_ACCEPT    0x2
 #define CLIENT_TIMEOUT_SEND    0x3
 
 #define SERVER_MAX_BIND_COUNT        100
 
-#if defined(XP_MAC) || defined(XP_OS2) || defined(SYMBIAN)
+#if defined(XP_OS2) || defined(SYMBIAN)
 #define TIMEOUTSECS 10
 #else
 #define TIMEOUTSECS 2
 #endif
 PRIntervalTime timeoutTime;
 
 static PRInt32 count = 1;
 static PRFileDesc *output;
@@ -484,21 +484,16 @@ int main(int argc, char **argv)
         }
     }
     PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     output = PR_STDERR;
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("accept.log");
-    debug_mode = 1;
-#endif
-
     timeoutTime = PR_SecondsToInterval(TIMEOUTSECS);
     if (debug_mode)
         PR_fprintf(output, "\nRun accept() sucessful connection tests\n");
 
     Measure(AcceptUpdatedTest, "PR_Accept()");
     Measure(AcceptReadTest, "PR_AcceptRead()");
 #ifdef WINNT
     Measure(AcceptNotUpdatedTest, "PR_NTFast_Accept()");
--- a/nsprpub/pr/tests/alarm.c
+++ b/nsprpub/pr/tests/alarm.c
@@ -53,42 +53,32 @@
 ***********************************************************************/
 
 /***********************************************************************
 ** Includes
 ***********************************************************************/
 
 #include "prlog.h"
 #include "prinit.h"
-#ifdef XP_MAC
-#include "pralarm.h"
-#else
 #include "obsolete/pralarm.h"
-#endif
 #include "prlock.h"
 #include "prlong.h"
 #include "prcvar.h"
 #include "prinrval.h"
 #include "prtime.h"
 
 /* Used to get the command line option */
 #include "plgetopt.h"
 #include <stdio.h>
 #include <stdlib.h>
 
 #if defined(XP_UNIX)
 #include <sys/time.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static PRIntn debug_mode;
 static PRIntn failed_already=0;
 static PRThreadScope thread_scope = PR_LOCAL_THREAD;
 
 typedef struct notifyData {
     PRLock *ml;
     PRCondVar *child;
     PRCondVar *parent;
@@ -291,20 +281,16 @@ static PRIntervalTime Alarms1(PRUint32 l
     PR_DestroyLock(ml);
     overhead += (PR_IntervalNow() - timein);
     
     return duration + overhead;
 }  /* Alarms1 */
 
 static PRBool AlarmFn2(PRAlarmID *id, void *clientData, PRUint32 late)
 {
-#if defined(XP_MAC)
-#pragma unused (id)
-#endif
-
     PRBool keepGoing;
     PRStatus rv = PR_SUCCESS;
     AlarmData *ad = (AlarmData*)clientData;
     PRIntervalTime interval, now = PR_IntervalNow();
 
     PR_Lock(ad->ml);
     ad->times += 1;
     keepGoing = ((PRIntervalTime)(now - ad->timein) < ad->duration) ?
@@ -529,20 +515,16 @@ int prmain(int argc, char** argv)
     if (cpus == 0) cpus = 1;
     if (loops == 0) loops = 4;
 
 	if (debug_mode)
 		printf("Alarm: Using %d loops\n", loops);
 
 	if (debug_mode)		
         printf("Alarm: Using %d cpu(s)\n", cpus);
-#ifdef XP_MAC
-	SetupMacPrintfLog("alarm.log");
-	debug_mode = 1;
-#endif
 
     for (cpu = 1; cpu <= cpus; ++cpu)
     {
     if (debug_mode)
         printf("\nAlarm: Using %d CPU(s)\n", cpu);
 
 	PR_SetConcurrency(cpu);
         
--- a/nsprpub/pr/tests/cltsrv.c
+++ b/nsprpub/pr/tests/cltsrv.c
@@ -77,26 +77,20 @@
 
 #include "plstr.h"
 #include "plerror.h"
 #include "plgetopt.h"
 
 #include <stdlib.h>
 #include <string.h>
 
-
 #if defined(XP_UNIX)
 #include <math.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 /*
 ** This is the beginning of the test
 */
 
 #define RECV_FLAGS 0
 #define SEND_FLAGS 0
 #define DEFAULT_LOW 0
 #define DEFAULT_HIGH 0
@@ -1028,20 +1022,16 @@ int main(int argc, char** argv)
     PR_STDIO_INIT();
     TimeOfDayMessage("Client/Server started at", PR_GetCurrentThread());
 
     cltsrv_log_file = PR_NewLogModule("cltsrv_log");
     MY_ASSERT(NULL != cltsrv_log_file);
     boolean = PR_SetLogFile("cltsrv.log");
     MY_ASSERT(boolean);
 
-#ifdef XP_MAC
-    debug_mode = PR_TRUE;
-#endif
-
     rv = PR_SetFDCacheSize(low, high);
     PR_ASSERT(PR_SUCCESS == rv);
 
     if (serverIsLocal)
     {
         /* Establish the server */
         TEST_LOG(
             cltsrv_log_file, TEST_LOG_INFO,
--- a/nsprpub/pr/tests/concur.c
+++ b/nsprpub/pr/tests/concur.c
@@ -45,21 +45,17 @@
 #include "prinrval.h"
 #include "prlock.h"
 #include "prprf.h"
 #include "prmem.h"
 #include "prlog.h"
 
 #include "plgetopt.h"
 
-#if defined(XP_MAC)
-#include "pprio.h"
-#else
 #include "private/pprio.h"
-#endif
 
 #include <stdlib.h>
 
 #define DEFAULT_RANGE 10
 #define DEFAULT_LOOPS 100
 
 static PRThreadScope thread_scope = PR_LOCAL_THREAD;
 
--- a/nsprpub/pr/tests/cvar.c
+++ b/nsprpub/pr/tests/cvar.c
@@ -61,22 +61,16 @@
 
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRMonitor *mon;
 #define DEFAULT_COUNT   1000
 PRInt32 count = 0;
 PRIntn debug_mode;
 
 #define kQSIZE	1
 
 typedef struct {
@@ -297,21 +291,16 @@ static PRIntn PR_CALLBACK RealMain(int a
          default:
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     if (0 == count) count = DEFAULT_COUNT;
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("cvar.log");
-	debug_mode = 1;
-#endif
-
     mon = PR_NewMonitor();
 
     Measure(CondWaitContextSwitchUU, "cond var wait context switch- user/user");
     Measure(CondWaitContextSwitchUK, "cond var wait context switch- user/kernel");
     Measure(CondWaitContextSwitchKK, "cond var wait context switch- kernel/kernel");
 
 	PR_DestroyMonitor(mon);
 
--- a/nsprpub/pr/tests/cvar2.c
+++ b/nsprpub/pr/tests/cvar2.c
@@ -59,22 +59,16 @@
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 int _debug_on = 0;
 #define DPRINTF(arg) if (_debug_on) printf arg
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define DEFAULT_COUNT   100
 #define DEFAULT_THREADS 5
 PRInt32 count = DEFAULT_COUNT;
 
 typedef struct threadinfo {
     PRThread        *thread;
     PRInt32          id;
     PRBool           internal;
@@ -942,20 +936,16 @@ static PRIntn PR_CALLBACK RealMain(int a
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     if (0 == count) count = DEFAULT_COUNT;
     if (0 == default_threads) default_threads = DEFAULT_THREADS;
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("cvar2.log");
-#endif
-
     printf("\n\
 CondVar Test:                                                           \n\
                                                                         \n\
 Simple test creates several local and global threads; half use a single,\n\
 shared condvar, and the other half have their own condvar.  The main    \n\
 thread then loops notifying them to wakeup.                             \n\
                                                                         \n\
 The timeout test is very similar except that the threads are not        \n\
@@ -974,24 +964,18 @@ default_threads, default_threads*2, defa
     PR_SetConcurrency(2);
 
     for (threads = default_threads; threads < default_threads*5; threads+=default_threads) {
         printf("\n%ld Thread tests\n", threads);
         Measure(CondVarTestSUU, threads, "Condvar simple test shared UU");
         Measure(CondVarTestSUK, threads, "Condvar simple test shared UK");
         Measure(CondVarTestPUU, threads, "Condvar simple test priv UU");
         Measure(CondVarTestPUK, threads, "Condvar simple test priv UK");
-#ifdef XP_MAC
-	/* Mac heaps can't handle thread*4 stack allocations at a time for (10, 15, 20)*4 */
-        Measure(CondVarTest, 5, "Condvar simple test All");
-        Measure(CondVarTimeoutTest, 5,  "Condvar timeout test");
-#else
         Measure(CondVarTest, threads, "Condvar simple test All");
         Measure(CondVarTimeoutTest, threads,  "Condvar timeout test");
-#endif
 #if 0
         Measure(CondVarMixedTest, threads,  "Condvar mixed timeout test");
         Measure(CondVarCombinedTest, threads, "Combined condvar test");
 #endif
     }
 
     printf("PASS\n");
 
--- a/nsprpub/pr/tests/fileio.c
+++ b/nsprpub/pr/tests/fileio.c
@@ -61,24 +61,17 @@
 #include "prcvar.h"
 #include "prmon.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prlog.h"
 
 #include <stdio.h>
 
-#ifdef XP_MAC
-#include "prsem.h"
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 
 #define TBSIZE 1024
 
 static PRUint8 tbuf[TBSIZE];
 
 static PRFileDesc *t1, *t2;
 
@@ -190,21 +183,16 @@ static void PR_CALLBACK writer(void *arg
 int main(int argc, char **argv)
 {
 	PRThread *r, *w;
 
 
 	PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("fileio.log");
-	debug_mode = 1;
-#endif
-
     emptyBufs = PR_NewSem(2);	/* two empty buffers */
 
     fullBufs = PR_NewSem(0);	/* zero full buffers */
 
 	/* Create initial temp file setup */
 	InitialSetup();
 	
 	/* create the reader thread */
--- a/nsprpub/pr/tests/inrval.c
+++ b/nsprpub/pr/tests/inrval.c
@@ -49,21 +49,17 @@
 **/
 /***********************************************************************
 ** Includes
 ***********************************************************************/
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include "prinit.h"
-#ifdef XP_MAC
-#include "pralarm.h"
-#else
 #include "obsolete/pralarm.h"
-#endif
 
 #include "prio.h"
 #include "prprf.h"
 #include "prlock.h"
 #include "prlong.h"
 #include "prcvar.h"
 #include "prinrval.h"
 #include "prtime.h"
--- a/nsprpub/pr/tests/intrio.c
+++ b/nsprpub/pr/tests/intrio.c
@@ -41,22 +41,16 @@
  */
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 /* for synchronization between the main thread and iothread */
 static PRLock *lock;
 static PRCondVar *cvar;
 static PRBool iothread_ready;
 
 static void PR_CALLBACK AbortIO(void *arg)
 {
     PRStatus rv;
--- a/nsprpub/pr/tests/intrupt.c
+++ b/nsprpub/pr/tests/intrupt.c
@@ -50,22 +50,16 @@
 #include "prlog.h"
 #include "prthread.h"
 #include "prtypes.h"
 #include "prnetdb.h"
 
 #include <stdio.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define DEFAULT_TCP_PORT 12500
 
 static PRLock *ml = NULL;
 static PRCondVar *cv = NULL;
 
 static PRBool passed = PR_TRUE;
 static PRBool debug_mode = PR_FALSE;
 static PRThreadScope thread_scope = PR_LOCAL_THREAD;
@@ -253,21 +247,16 @@ void PR_CALLBACK Intrupt(void *arg)
     PRStatus rv;
     PRNetAddr netaddr;
     PRFileDesc *listner;
     PRThread *abortCV, *abortIO, *abortJoin, *intrBlock;
 
     ml = PR_NewLock();
     cv = PR_NewCondVar(ml);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("intrupt.log");
-	debug_mode = PR_TRUE;
-#endif
-
     /* Part I */
     if (debug_mode) printf("Part I\n");
     abortCV = PR_CreateThread(
         PR_USER_THREAD, AbortCV, 0, PR_PRIORITY_NORMAL,
         thread_scope, PR_JOINABLE_THREAD, 0);
 
     PR_Sleep(PR_SecondsToInterval(2));
     rv = PR_Interrupt(abortCV);
--- a/nsprpub/pr/tests/io_timeout.c
+++ b/nsprpub/pr/tests/io_timeout.c
@@ -52,22 +52,16 @@
 ** Includes
 ***********************************************************************/
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include <stdio.h>
 #include "nspr.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define NUM_THREADS 1
 #define BASE_PORT   8000
 #define DEFAULT_ACCEPT_TIMEOUT 2
 
 typedef struct threadInfo {
     PRInt16 id;
     PRInt16 accept_timeout;
     PRLock *dead_lock;
@@ -271,21 +265,16 @@ int main(int argc, char **argv)
  /* main test */
 	
     if (0 == num_threads)
         num_threads = NUM_THREADS;
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_LOW, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("io_timeout.log");
-	debug_mode = 1;
-#endif
-
     printf("test with global bound thread\n");
     thread_test(PR_GLOBAL_BOUND_THREAD, num_threads);
 
     printf("test with local thread\n");
     thread_test(PR_LOCAL_THREAD, num_threads);
 
     printf("test with global thread\n");
     thread_test(PR_GLOBAL_THREAD, num_threads);
--- a/nsprpub/pr/tests/join.c
+++ b/nsprpub/pr/tests/join.c
@@ -59,21 +59,16 @@
 #include "prttools.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
 /***********************************************************************
 ** PRIVATE FUNCTION:    Test_Result
 ** DESCRIPTION: Used in conjunction with the regress tool, prints out the
 **		        status of the test case.
 ** INPUTS:      PASS/FAIL
 ** OUTPUTS:     None
 ** RETURN:      None
 ** SIDE EFFECTS:
@@ -222,23 +217,16 @@ static PRIntn PR_CALLBACK RealMain(int a
             debug_mode = 1;
             break;
          default:
             break;
         }
     }
     PL_DestroyOptState(opt);
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("join.log");
-    debug_mode = 1;
-#endif
-
-    
-    
  /* main test */
     printf("User-User test\n");
     runTest(PR_LOCAL_THREAD, PR_LOCAL_THREAD);
     printf("User-Kernel test\n");
     runTest(PR_LOCAL_THREAD, PR_GLOBAL_THREAD);
     printf("Kernel-User test\n");
     runTest(PR_GLOBAL_THREAD, PR_LOCAL_THREAD);
     printf("Kernel-Kernel test\n");
--- a/nsprpub/pr/tests/joinkk.c
+++ b/nsprpub/pr/tests/joinkk.c
@@ -60,21 +60,16 @@
 #include "plgetopt.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 PRIntn failed_already=0;
 PRIntn debug_mode;
 /*
 	Program to test joining of threads.  Two threads are created.  One
 	to be waited upon until it has started.  The other to join after it has
 	completed.
 */
 
@@ -154,22 +149,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
 			debug_mode = 1;
             break;
          default:
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("join.log");
-#endif
-
-	
-	
  /* main test */
 
     if (debug_mode) printf("Kernel-Kernel test\n");
     runTest(PR_GLOBAL_THREAD, PR_GLOBAL_THREAD);
 
 	if(failed_already)	
 	{
         printf("FAIL\n");
--- a/nsprpub/pr/tests/joinku.c
+++ b/nsprpub/pr/tests/joinku.c
@@ -60,20 +60,16 @@
 #include "plgetopt.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 
 /*
 	Program to test joining of threads.  Two threads are created.  One
 	to be waited upon until it has started.  The other to join after it has
 	completed.
@@ -158,22 +154,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("joinku.log");
-#endif
-
-	
-	
  /* main test */
 
     if (debug_mode) printf("Kernel-User test\n");
     runTest(PR_GLOBAL_THREAD, PR_LOCAL_THREAD);
 
 
 	if(failed_already)	
     {
--- a/nsprpub/pr/tests/joinuk.c
+++ b/nsprpub/pr/tests/joinuk.c
@@ -60,20 +60,16 @@
 #include "plgetopt.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
 PRIntn failed_already=0;
 PRIntn debug_mode;
 /*
 	Program to test joining of threads.  Two threads are created.  One
 	to be waited upon until it has started.  The other to join after it has
 	completed.
 */
 
@@ -156,22 +152,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("joinuk.log");
-#endif
-
-	
-	
  /* main test */
 
     if (debug_mode) printf("User-Kernel test\n");
     runTest(PR_LOCAL_THREAD, PR_GLOBAL_THREAD);
 
 
 	if(failed_already)	
 	{
--- a/nsprpub/pr/tests/joinuu.c
+++ b/nsprpub/pr/tests/joinuu.c
@@ -60,20 +60,16 @@
 #include "plgetopt.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 
 /*
 	Program to test joining of threads.  Two threads are created.  One
 	to be waited upon until it has started.  The other to join after it has
 	completed.
@@ -158,22 +154,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("joinuu.log");
-#endif
-
-	
-	
  /* main test */
     if (debug_mode) printf("User-User test\n");
     runTest(PR_LOCAL_THREAD, PR_LOCAL_THREAD);
 
 	if(failed_already)	
 	{
         printf("FAIL\n");
 		return 1;
--- a/nsprpub/pr/tests/lock.c
+++ b/nsprpub/pr/tests/lock.c
@@ -82,22 +82,16 @@
 #include "plstr.h"
 
 #include <stdlib.h>
 
 #if defined(XP_UNIX)
 #include <string.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static PRIntn failed_already=0;
 static PRFileDesc *std_err = NULL;
 static PRBool verbosity = PR_FALSE;
 static PRBool debug_mode = PR_FALSE;
 
 const static PRIntervalTime contention_interval = 50;
 
 typedef struct LockContentious_s {
@@ -494,21 +488,16 @@ int main(int argc,  char **argv)
             }
         }
     	PL_DestroyOptState(opt);
     }
 
  /* main test */
     PR_SetConcurrency(8);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("lock.log");
-	debug_mode = 1;
-#endif
-
     if (loops == 0) loops = 100;
     if (debug_mode)
     {
         std_err = PR_STDERR;
         PR_fprintf(std_err, "Lock: Using %d loops\n", loops);
     }
 
     if (cpus == 0) cpus = 2;
--- a/nsprpub/pr/tests/lockfile.c
+++ b/nsprpub/pr/tests/lockfile.c
@@ -61,32 +61,22 @@
 #include "prinit.h"
 #include "prinrval.h"
 #include "prlock.h"
 #include "prlog.h"
 #include "prmon.h"
 #include "prthread.h"
 #include "prtypes.h"
 
-#ifndef XP_MAC
 #include "private/pprio.h"
-#else
-#include "pprio.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 const static PRIntervalTime contention_interval = 50;
 
 typedef struct LockContentious_s {
     PRLock *ml;
     PRInt32 loops;
@@ -236,21 +226,16 @@ int main(int argc,  char **argv)
     }
 	PL_DestroyOptState(opt);
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("lockfile.log");
-	debug_mode = 1;
-#endif
-
     if (argc > 1) loops = atoi(argv[1]);
     if (loops == 0) loops = 100;
     if (debug_mode) printf("Lock: Using %d loops\n", loops);
 
     cpus = (argc < 3) ? 2 : atoi(argv[2]);
     if (cpus == 0) cpus = 2;
     if (debug_mode) printf("Lock: Using %d cpu(s)\n", cpus);
 
--- a/nsprpub/pr/tests/logger.c
+++ b/nsprpub/pr/tests/logger.c
@@ -44,20 +44,16 @@
 #include "prlog.h"
 #include "prlock.h"
 #include "prcvar.h"
 #include "prthread.h"
 #include "prinrval.h"
 
 #include <stdio.h>
 
-#ifdef XP_MAC
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 /* lth. re-define PR_LOG() */
 #if 0
 #undef PR_LOG_TEST
 #undef PR_LOG
 #define PR_LOG_TEST(_module,_level) ((_module)->level <= (_level))
 #define PR_LOG(_module,_level,_args)    \
   {                                     \
     if (PR_LOG_TEST(_module,_level))    \
@@ -121,28 +117,24 @@ static void UserLogStuff( void )
 
 int main(int argc, char **argv)
 {
     PRThread *thread;
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifndef XP_MAC
     if (argc > 1)
     {
         if (!PR_SetLogFile(argv[1]))
         {
             Error("Access: Cannot create log file");
             goto exit;
         }
     }
-#else
-	SetupMacPrintfLog("logger.log");
-#endif
 
     /* Start logging something here */
     PR_LogPrint("%s logging into %s\n", argv[0], argv[1]);
 
     PR_LogPrint("%s creating new thread\n", argv[0]);
 
     /*
     ** Now change buffering.
--- a/nsprpub/pr/tests/nbconn.c
+++ b/nsprpub/pr/tests/nbconn.c
@@ -56,22 +56,16 @@
  *    return PR_UNKNOWN_ERROR on certain platforms.
  */
 
 #include "nspr.h"
 #include "plgetopt.h"
 #include <stdio.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-static char *hosts[4] = {"cynic", "warp", "gandalf", "neon"};
-#endif
-
 #define SERVER_MAX_BIND_COUNT        100
 #define DATA_BUF_SIZE        		 256
 #define TCP_SERVER_PORT            10000
 #define TCP_UNUSED_PORT            211
 
 typedef struct Server_Param {
     PRFileDesc *sp_fd;		/* server port */
 } Server_Param;
@@ -89,20 +83,16 @@ int main(int argc, char **argv)
     char buf[1024];
     PRNetAddr addr;
     PRPollDesc pd;
     PRStatus rv;
     PRSocketOptionData optData;
 	const char *hostname = NULL;
     PRIntn default_case, n, bytes_read, bytes_sent;
 	PRInt32 failed_already = 0;
-#ifdef XP_MAC
-	int index;
-	PRIntervalTime timeout;
-#endif
 
     /*
      * -d           debug mode
      */
 
     PLOptStatus os;
     PLOptState *opt = PL_CreateOptState(argc, argv, "d");
     while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -117,33 +107,21 @@ int main(int argc, char **argv)
             _debug_on = 1;
             break;
         default:
             break;
         }
     }
     PL_DestroyOptState(opt);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("nbconn.log");
-	for (index=0; index<4; index++) {
-	argv[1] = hosts[index];
-	timeout = PR_INTERVAL_NO_TIMEOUT;
-	if (index == 3)
-		timeout = PR_SecondsToInterval(10UL);
-#endif
-
-
     PR_STDIO_INIT();
-#ifndef XP_MAC
     if (hostname)
 		default_case = 0;
 	else
 		default_case = 1;
-#endif
 
 	if (default_case) {
 
 		/*
 		 * In the default case the following tests are executed:
 		 *	1. successful connection: a server thread accepts a connection
 		 *	   from the main thread
 		 *	2. unsuccessful connection: the main thread tries to connect to a
@@ -170,21 +148,17 @@ int main(int argc, char **argv)
 		PR_SetSocketOption(sock, &optData);
 		rv = PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT);
 		if (rv == PR_FAILURE && PR_GetError() == PR_IN_PROGRESS_ERROR) {
 			printf( "Connect in progress\n");
 		}
 
 		pd.fd = sock;
 		pd.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
-#ifndef XP_MAC
 		n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT);
-#else
-		n = PR_Poll(&pd, 1, timeout);
-#endif
 		if (n == -1) {
 			printf( "PR_Poll failed\n");
 			exit(1);
 		}
 		printf( "PR_Poll returns %d\n", n);
 		if (pd.out_flags & PR_POLL_READ) {
 			printf( "PR_POLL_READ\n");
 		}
@@ -198,44 +172,38 @@ int main(int argc, char **argv)
 			printf( "PR_POLL_ERR\n");
 		}
 		if (pd.out_flags & PR_POLL_NVAL) {
 			printf( "PR_POLL_NVAL\n");
 		}
 
 		if (PR_GetConnectStatus(&pd) == PR_SUCCESS) {
 			printf("PR_GetConnectStatus: connect succeeded\n");
-			/* Mac and Win16 have trouble printing to the console. */
-#if !defined(XP_MAC) && !defined(WIN16)
 			PR_Write(sock, "GET /\r\n\r\n", 9);
 			PR_Shutdown(sock, PR_SHUTDOWN_SEND);
 			pd.in_flags = PR_POLL_READ;
 			while (1) {
 				n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT);
 				printf( "poll returns %d\n", n);
 				n = PR_Read(sock, buf, sizeof(buf));
 				printf( "read returns %d\n", n);
 				if (n <= 0) {
 					break;
 				}
 				PR_Write(PR_STDOUT, buf, n);
 			}
-#endif
 		} else {
 			if (PR_GetError() == PR_IN_PROGRESS_ERROR) {
 				printf( "PR_GetConnectStatus: connect still in progress\n");
 				exit(1);
 			}
 			printf( "PR_GetConnectStatus: connect failed: (%ld, %ld)\n",
 					PR_GetError(), PR_GetOSError());
 		}
 		PR_Close(sock);
-#ifdef XP_MAC
-		} /* end of for loop */
-#endif
     	printf( "PASS\n");
     	return 0;
 
 	}
 }
 
 
 /*
@@ -373,21 +341,17 @@ connection_success_test()
 		fprintf(stderr,"Error - PR_CreateThread failed: (%d,%d)\n",
 									PR_GetError(), PR_GetOSError());
 		failed_already=1;
 		goto def_exit;
 	}
 	DPRINTF(("Created TCP_Server thread [0x%x]\n",thr));
 	pd.fd = conn_fd;
 	pd.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
-#ifndef XP_MAC
 	n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT);
-#else
-	n = PR_Poll(&pd, 1, timeout);
-#endif
 	if (n == -1) {
 		fprintf(stderr,"Error - PR_Poll failed: (%d, %d)\n",
 									PR_GetError(), PR_GetOSError());
 		failed_already=1;
 		goto def_exit;
 	}
 	if (PR_GetConnectStatus(&pd) == PR_SUCCESS) {
 		PRInt32 rv;
@@ -551,21 +515,17 @@ connection_failure_test()
 	} else {
 		PR_ASSERT(rv == PR_SUCCESS);
 		fprintf(stderr,"Error - PR_Connect succeeded, expected to fail\n");
 		failed_already=1;
 		goto def_exit;
 	}
 	pd.fd = conn_fd;
 	pd.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
-#ifndef XP_MAC
 	n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT);
-#else
-	n = PR_Poll(&pd, 1, timeout);
-#endif
 	if (n == -1) {
 		fprintf(stderr,"Error - PR_Poll failed: (%d, %d)\n",
 									PR_GetError(), PR_GetOSError());
 		failed_already=1;
 		goto def_exit;
 	}
 	if (PR_GetConnectStatus(&pd) == PR_SUCCESS) {
 		PRInt32 rv;
--- a/nsprpub/pr/tests/nonblock.c
+++ b/nsprpub/pr/tests/nonblock.c
@@ -37,21 +37,17 @@
 
 #include "nspr.h"
 #include "prio.h"
 #include "prerror.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
 #include "plerror.h"
-#ifndef XP_MAC
 #include "obsolete/probslet.h"
-#else
-#include "probslet.h"
-#endif
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 #define NUMBER_ROUNDS 5
 
 #if defined(WIN16)
@@ -67,26 +63,16 @@
 #define CHUNK_SIZE 10
 #undef USE_PR_SELECT         /* If defined, we use PR_Select.
                               * If not defined, use PR_Poll instead. */
 
 #if defined(USE_PR_SELECT)
 #include "pprio.h"
 #endif
 
-#ifdef XP_MAC
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-PR_LogPrint(fmt);
-return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static void PR_CALLBACK
 clientThreadFunc(void *arg)
 {
     PRUintn port = (PRUintn)arg;
     PRFileDesc *sock;
     PRNetAddr addr;
     char buf[CHUNK_SIZE];
     int i;
@@ -160,20 +146,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
     PRNetAddr addr;
     char buf[CHUNK_SIZE];
     PRThread *clientThread;
     PRInt32 retVal;
     PRSocketOptionData optval;
     PRIntn i;
     PRIntervalTime unitTime = PR_MillisecondsToInterval(UNIT_TIME);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("nonblock.log");
-#endif
-
     /* Create a listening socket */
     if ((listenSock = PR_NewTCPSocket()) == NULL) {
 	fprintf(stderr, "Can't create a new TCP socket\n");
 	exit(1);
     }
     addr.inet.family = PR_AF_INET;
     addr.inet.ip = PR_htonl(PR_INADDR_ANY);
     addr.inet.port = PR_htons(0);
--- a/nsprpub/pr/tests/op_2long.c
+++ b/nsprpub/pr/tests/op_2long.c
@@ -52,22 +52,16 @@
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 #include "plerror.h"
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 static PRFileDesc *t1;
 PRIntn error_code;
 
 /*
  * should exceed any system's maximum file name length
  * Note: was set at 4096. This is legal on some unix (Linux 2.1+) platforms.
  * 
  */
@@ -83,20 +77,16 @@ int main(int argc, char **argv)
 		if (i % 10 == 0) {
 			nameTooLong[i] = '/';
 		} else {
 			nameTooLong[i] = 'a';
 		}
 	}
 	nameTooLong[TOO_LONG - 1] = 0;
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
     PR_STDIO_INIT();
 	t1 = PR_Open(nameTooLong, PR_RDWR, 0666);
 	if (t1 == NULL) {
 		if (PR_GetError() == PR_NAME_TOO_LONG_ERROR) {
             PL_PrintError("error code is");
 			printf ("PASS\n");
 			return 0;
 		}
--- a/nsprpub/pr/tests/op_filnf.c
+++ b/nsprpub/pr/tests/op_filnf.c
@@ -52,34 +52,21 @@
 /* Used to get the command line option */
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 static PRFileDesc *t1;
 PRIntn error_code;
 
 int main(int argc, char **argv)
 {
-
-
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
-
     PR_STDIO_INIT();
 	t1 = PR_Open("/usr/tmp/ttools/err03.tmp", PR_TRUNCATE | PR_RDWR, 0666);
 	if (t1 == NULL) {
 		if (PR_GetError() == PR_FILE_NOT_FOUND_ERROR) {
 				printf ("error code is %d \n", PR_GetError());
 				printf ("PASS\n");
 				return 0;
 		}
--- a/nsprpub/pr/tests/op_filok.c
+++ b/nsprpub/pr/tests/op_filok.c
@@ -50,29 +50,21 @@
 ***********************************************************************/
 /* Used to get the command line option */
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 /*
  * The name of a file that is guaranteed to exist
  * on every machine of a particular OS.
  */
-#ifdef VMS
-#define EXISTING_FILENAME "SYS$LOGIN:LOGIN.COM"
-#elif defined(SYMBIAN)
+#if defined(SYMBIAN)
 #define EXISTING_FILENAME "z:\\system\\install\\Series60v3.0.sis"
 #elif defined (XP_UNIX)
 #define EXISTING_FILENAME "/bin/sh"
 #elif defined(WIN32)
 #define EXISTING_FILENAME "c:/autoexec.bat"
 #elif defined(OS2)
 #define EXISTING_FILENAME "c:/config.sys"
 #elif defined(BEOS)
@@ -80,21 +72,16 @@
 #else
 #error "Unknown OS"
 #endif
 
 static PRFileDesc *t1;
 
 int main(int argc, char **argv)
 {
-
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
     PR_STDIO_INIT();
 
 	t1 = PR_Open(EXISTING_FILENAME, PR_RDONLY, 0666);
 
 	if (t1 == NULL) {
 		printf ("error code is %d \n", PR_GetError());
 		printf ("File %s should be found\n",
 				EXISTING_FILENAME);
--- a/nsprpub/pr/tests/op_noacc.c
+++ b/nsprpub/pr/tests/op_noacc.c
@@ -51,33 +51,21 @@
 /* Used to get the command line option */
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 static PRFileDesc *err01;
 PRIntn error_code;
 
 int main(int argc, char **argv)
 {
-
-
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
 #ifdef XP_PC
     printf("op_noacc: Test not valid on MS-Windows.\n\tNo concept of 'mode' on Open() call\n");
     return(0);
 #endif
 
 	
     PR_STDIO_INIT();
 	err01 = PR_Open("err01.tmp", PR_CREATE_FILE | PR_RDWR, 0);
--- a/nsprpub/pr/tests/op_nofil.c
+++ b/nsprpub/pr/tests/op_nofil.c
@@ -51,36 +51,25 @@
 /* Used to get the command line option */
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 /*
  * A file name that cannot exist
  */
 #define NO_SUCH_FILE "/no/such/file.tmp"
 
 static PRFileDesc *t1;
 
 int main(int argc, char **argv)
 {
-
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
     PR_STDIO_INIT();
 	t1 = PR_Open(NO_SUCH_FILE,  PR_RDONLY, 0666);
 	if (t1 == NULL) {
 		if (PR_GetError() == PR_FILE_NOT_FOUND_ERROR) {
 			printf ("error code is PR_FILE_NOT_FOUND_ERROR, as expected\n");
 			printf ("PASS\n");
 			return 0;
 		} else {
--- a/nsprpub/pr/tests/perf.c
+++ b/nsprpub/pr/tests/perf.c
@@ -40,24 +40,17 @@
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 int _debug_on = 0;
 #define DPRINTF(arg) if (_debug_on) printf arg
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 PRLock *lock;
 PRMonitor *mon;
 PRMonitor *mon2;
 
 #define DEFAULT_COUNT    1000
 
 PRInt32 count;
@@ -423,20 +416,16 @@ int main(int argc, char **argv)
 
     if (0 == count) count = DEFAULT_COUNT;
     
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
 	PR_BlockClockInterrupts();
 	PR_UnblockClockInterrupts();
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("perf.log");
-#endif
-
     lock = PR_NewLock();
     mon = PR_NewMonitor();
     mon2 = PR_NewMonitor();
 
     Measure(LocalProcedureCall, "local procedure call overhead");
     Measure(DLLProcedureCall, "DLL procedure call overhead");
     Measure(Now, "current calendar time");
     Measure(Interval, "interval time");
--- a/nsprpub/pr/tests/poll_er.c
+++ b/nsprpub/pr/tests/poll_er.c
@@ -84,18 +84,16 @@ ClientThreadFunc(void *arg)
      * Make the fd invalid
      */
 #if defined(XP_UNIX)
     close(PR_FileDesc2NativeHandle(badFD));
 #elif defined(XP_OS2)
     soclose(PR_FileDesc2NativeHandle(badFD));
 #elif defined(WIN32) || defined(WIN16)
     closesocket(PR_FileDesc2NativeHandle(badFD));
-#elif defined(XP_MAC)
-    _PR_MD_CLOSE_SOCKET(PR_FileDesc2NativeHandle(badFD));
 #else
 #error "Unknown architecture"
 #endif
 }
 
 int main(int argc, char **argv)
 {
     PRFileDesc *listenSock1, *listenSock2;
--- a/nsprpub/pr/tests/poll_nm.c
+++ b/nsprpub/pr/tests/poll_nm.c
@@ -58,47 +58,29 @@
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
-#ifndef XP_MAC
 #include "obsolete/probslet.h"
-#else
-#include "probslet.h"
-#endif
 
-#ifndef XP_MAC
 #include "private/pprio.h"
-#else
-#include "pprio.h"
-#endif
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 #define NUM_ITERATIONS 5
 
-#ifdef XP_MAC
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-PR_LogPrint(fmt);
-return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static void PR_CALLBACK
 clientThreadFunc(void *arg)
 {
     PRUintn port = (PRUintn) arg;
     PRFileDesc *sock;
     PRNetAddr addr;
     char buf[128];
     int i;
@@ -161,21 +143,16 @@ int main(int argc, char **argv)
     }
 	PL_DestroyOptState(opt);
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	debug_mode = 1;
-	SetupMacPrintfLog("poll_nm.log");
-#endif
-
     if (debug_mode) {
 		printf("This program tests PR_Poll with sockets.\n");
 		printf("Normal operation are tested.\n\n");
 	}
 
     /* Create two listening sockets */
     if ((listenSock1 = PR_NewTCPSocket()) == NULL) {
 	fprintf(stderr, "Can't create a new TCP socket\n");
--- a/nsprpub/pr/tests/poll_to.c
+++ b/nsprpub/pr/tests/poll_to.c
@@ -59,21 +59,17 @@
 #include "plgetopt.h"
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
 
-#ifndef XP_MAC
 #include "private/pprio.h"
-#else
-#include "pprio.h"
-#endif
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
--- a/nsprpub/pr/tests/priotest.c
+++ b/nsprpub/pr/tests/priotest.c
@@ -35,21 +35,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 /*
  * File:        priotest.c
  * Purpose:     testing priorities
  */
 
-#ifdef XP_MAC
-#error "This test does not run on Macintosh"
-#else
-
-
 #include "prcmon.h"
 #include "prinit.h"
 #include "prinrval.h"
 #include "prlock.h"
 #include "prlog.h"
 #include "prmon.h"
 #include "prprf.h"
 #include "prthread.h"
@@ -223,11 +218,9 @@ int main(int argc, char **argv)
 
     PR_ProcessExit((failed) ? 1 : 0);
 
 	PR_ASSERT(!"You can't get here -- but you did!");
 	return 1;  /* or here */
 
 }  /* main */
 
-#endif  /* ifdef XP_MAC */
-
 /* priotest.c */
--- a/nsprpub/pr/tests/provider.c
+++ b/nsprpub/pr/tests/provider.c
@@ -77,26 +77,20 @@
 
 #include "plstr.h"
 #include "plerror.h"
 #include "plgetopt.h"
 
 #include <stdlib.h>
 #include <string.h>
 
-
 #if defined(XP_UNIX)
 #include <math.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 /*
 ** This is the beginning of the test
 */
 
 #define RECV_FLAGS 0
 #define SEND_FLAGS 0
 #define BUFFER_SIZE 1024
 #define DEFAULT_BACKLOG 5
@@ -1198,20 +1192,16 @@ int main(int argc, char **argv)
     PR_STDIO_INIT();
     TimeOfDayMessage("Client/Server started at", PR_GetCurrentThread());
 
     cltsrv_log_file = PR_NewLogModule("cltsrv_log");
     MY_ASSERT(NULL != cltsrv_log_file);
     boolean = PR_SetLogFile("cltsrv.log");
     MY_ASSERT(boolean);
 
-#ifdef XP_MAC
-    debug_mode = PR_TRUE;
-#endif
-
     if (serverIsLocal)
     {
         /* Establish the server */
         TEST_LOG(
             cltsrv_log_file, TEST_LOG_INFO,
             ("main(0x%p): starting server\n", PR_GetCurrentThread()));
 
         server = PR_NEWZAP(CSServer_t);
--- a/nsprpub/pr/tests/prpoll.c
+++ b/nsprpub/pr/tests/prpoll.c
@@ -44,21 +44,17 @@
 #endif
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
 
-#ifndef XP_MAC
 #include "private/pprio.h"
-#else
-#include "pprio.h"
-#endif
 
 #define CLIENT_LOOPS	5
 #define BUF_SIZE		128
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
--- a/nsprpub/pr/tests/ranfile.c
+++ b/nsprpub/pr/tests/ranfile.c
@@ -92,22 +92,16 @@ typedef struct Hammer_s {
 #define DEFAULT_LIMIT		10
 #define DEFAULT_THREADS		2
 #define DEFAULT_LOOPS		1
 
 static PRInt32 pageSize = 1024;
 static const char* baseName = "./";
 static const char *programName = "Random File";
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 /***********************************************************************
 ** PRIVATE FUNCTION:    RandomNum
 ** DESCRIPTION:
 **   Generate a pseudo-random number
 ** INPUTS:      None
 ** OUTPUTS:     None
 ** RETURN:      A pseudo-random unsigned number, 32-bits wide
 ** SIDE EFFECTS:
@@ -323,21 +317,16 @@ int main(int argc, char **argv)
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
     interleave = PR_SecondsToInterval(10);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("ranfile.log");
-	debug_mode = 1;
-#endif
-
     ml = PR_NewLock();
     cv = PR_NewCondVar(ml);
 
     if (loops == 0) loops = DEFAULT_LOOPS;
     if (limit == 0) limit = DEFAULT_LIMIT;
     if (threads == 0) threads = DEFAULT_THREADS;
 
     if (debug_mode) printf(
new file mode 100644
--- /dev/null
+++ b/nsprpub/pr/tests/reinit.c
@@ -0,0 +1,68 @@
+/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* ***** 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):
+ *   Ludovico Cavedon <ludovico.cavedon@gmail.com>
+ *
+ * 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 ***** */
+
+/* This test verifies that NSPR can be cleaned up and reinitialized. */
+
+#include "nspr.h"
+#include <stdio.h>
+
+int main()
+{
+    PRStatus rv;
+
+    fprintf(stderr, "Init 1\n");
+    PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
+    fprintf(stderr, "Cleanup 1\n");
+    rv = PR_Cleanup();
+    if (rv != PR_SUCCESS) {
+        fprintf(stderr, "FAIL\n");
+        return 1;
+    }
+
+    fprintf(stderr, "Init 2\n");
+    PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
+    fprintf(stderr, "Cleanup 2\n");
+    rv = PR_Cleanup();
+    if (rv != PR_SUCCESS) {
+        fprintf(stderr, "FAIL\n");
+        return 1;
+    }
+
+    fprintf(stderr, "PASS\n");
+    return 0;
+}
--- a/nsprpub/pr/tests/runtests.pl
+++ b/nsprpub/pr/tests/runtests.pl
@@ -343,16 +343,17 @@ sub win_test_prog {
 "poll_to",
 "pollable",
 "prftest",
 "primblok",
 "provider",
 "prpollml",
 "ranfile",
 "randseed",
+"reinit",
 "rwlocktest",
 "sel_spd",
 "selct_er",
 "selct_nm",
 "selct_to",
 "selintr",
 "sema",
 "semaerr",
--- a/nsprpub/pr/tests/runtests.sh
+++ b/nsprpub/pr/tests/runtests.sh
@@ -171,16 +171,17 @@ poll_nm
 poll_to
 pollable
 prftest
 primblok
 provider
 prpollml
 ranfile
 randseed
+reinit
 rwlocktest
 sel_spd
 selct_er
 selct_nm
 selct_to
 selintr
 sema
 semaerr
--- a/nsprpub/pr/tests/sel_spd.c
+++ b/nsprpub/pr/tests/sel_spd.c
@@ -46,48 +46,37 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
 #ifdef SYMBIAN
 #include <getopt.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-PR_LogPrint(fmt);
-return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define PORT_BASE 19000
 
 typedef struct timer_slot_t {
 	unsigned long d_connect;
 	unsigned long d_cl_data;
 	unsigned long d_sv_data;
 	unsigned long d_close;
 	unsigned long d_total;
 	unsigned long requests;
 } timer_slot_t;
 
 static long _iterations = 5;
 static long _client_data = 8192;
 
-#if defined(XP_MAC) || defined(SYMBIAN)
+#ifdef SYMBIAN
 /*
- * Mac does not scale well specially the requirement for thread stack
+ * Symbian OS does not scale well specially the requirement for thread stack
  * space and buffer allocation space.  It is easy to get into a fragmented
  * memory and not be able to allocate thread stack or client/server data
  * buffer.
-*/
+ */
 static long _server_data = (8*1024);
 static long _threads_max = 10, _threads = 10;
 #else
 static long _server_data = (128*1024);
 static long _threads_max = 10, _threads = 10;
 #endif
 
 static int verbose=0;
@@ -483,20 +472,16 @@ int main(int argc, char **argv)
 				break;
 		}
 	}
 #endif
 
 	PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("sel_spd.log");
-#endif
-
 	fprintf(stdout, "Running test for %d iterations with %d simultaneous threads.\n", 
 		_iterations, _threads);
 	fprintf(stdout, "\tWill send %d bytes of client data and %d bytes of server data\n", 
 		_client_data, _server_data);
 
 	if ( (exit_cv = PR_NewMonitor()) == NULL) 
 		fprintf(stderr, "Error creating monitor for exit cv\n");
 	if ( (timer_data = (timer_slot_t *)PR_Malloc(2*_threads * sizeof(timer_slot_t))) == NULL) 
--- a/nsprpub/pr/tests/selct_er.c
+++ b/nsprpub/pr/tests/selct_er.c
@@ -195,18 +195,16 @@ int main(int argc, char **argv)
      * Make the fd invalid
      */
 #if defined(XP_UNIX)
     close(PR_FileDesc2NativeHandle(badFD));
 #elif defined(XP_OS2)
     soclose(PR_FileDesc2NativeHandle(badFD));
 #elif defined(WIN32) || defined(WIN16)
     closesocket(PR_FileDesc2NativeHandle(badFD));
-#elif defined(XP_MAC)
-    _PR_MD_CLOSE_SOCKET(PR_FileDesc2NativeHandle(badFD));
 #else
 #error "Unknown architecture"
 #endif
 
     retVal = PR_Select(0 /* unused */, &readFdSet, NULL, NULL,
 	    PR_INTERVAL_NO_TIMEOUT);
     if (retVal != -1 || PR_GetError() != PR_BAD_DESCRIPTOR_ERROR) {
 	fprintf(stderr, "Failed to detect the bad fd: "
--- a/nsprpub/pr/tests/selct_nm.c
+++ b/nsprpub/pr/tests/selct_nm.c
@@ -60,21 +60,17 @@
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prerror.h"
 #include "prnetdb.h"
 
-#ifdef XP_MAC
-#include "probslet.h"
-#else
 #include "obsolete/probslet.h"
-#endif
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
--- a/nsprpub/pr/tests/selct_to.c
+++ b/nsprpub/pr/tests/selct_to.c
@@ -59,21 +59,17 @@
 #include "plgetopt.h"
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
 
-#ifdef XP_MAC
-#include "probslet.h"
-#else
 #include "obsolete/probslet.h"
-#endif
 
 #include "prerror.h"
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 PRIntn failed_already=0;
--- a/nsprpub/pr/tests/sem.c
+++ b/nsprpub/pr/tests/sem.c
@@ -69,24 +69,17 @@ PRIntn debug_mode;
 
 /* 
 	Since we don't have stdin, stdout everywhere, we will fake 
 	it with our in-memory buffers called stdin and stdout.
 */
 
 #define SBSIZE 1024
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 static char stdinBuf[SBSIZE];
 static char stdoutBuf[SBSIZE];
 
 static PRUintn stdinBufIdx = 0;
 static PRUintn stdoutBufIdx = 0;
 static PRStatus finalResult = PR_SUCCESS;
 
@@ -209,21 +202,16 @@ int main(int argc, char **argv)
                 break;
             }
         }
     	PL_DestroyOptState(opt);
     }        
 
  /* main test */
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("sem.log");
-	debug_mode = 1;
-#endif
-
     emptyBufs = PR_NewSem(2);	/* two empty buffers */
 
     fullBufs = PR_NewSem(0);	/* zero full buffers */
 
 	/* create the reader thread */
 	
 	r = PR_CreateThread(PR_USER_THREAD,
 				      reader, 0, 
--- a/nsprpub/pr/tests/socket.c
+++ b/nsprpub/pr/tests/socket.c
@@ -59,29 +59,17 @@
 
 #ifdef WIN32
 #include <process.h>
 #endif
 
 static int _debug_on = 0;
 static int test_cancelio = 0;
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-    PR_LogPrint(fmt);
-    return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 #ifdef XP_PC
 #define mode_t int
 #endif
 
 #define DPRINTF(arg) if (_debug_on) printf arg
 
 #ifdef XP_PC
@@ -124,26 +112,21 @@ char *LARGE_FILE_NAME = "/tmp/prsocket_t
 /*
  * set UDP datagram size small enough that datagrams sent to a port on the
  * local host will not be lost
  */
 #define UDP_DGRAM_SIZE            128
 #define NUM_TCP_CLIENTS            5	/* for a listen queue depth of 5 */
 #define NUM_UDP_CLIENTS            10
 
-#ifndef XP_MAC
 #ifdef SYMBIAN
 #define NUM_TRANSMITFILE_CLIENTS    1
 #else
 #define NUM_TRANSMITFILE_CLIENTS    4
 #endif
-#else
-/* Mac can't handle more than 2* (3Mb) allocations for large file size buffers */
-#define NUM_TRANSMITFILE_CLIENTS    2
-#endif
 
 #define NUM_TCP_CONNECTIONS_PER_CLIENT    5
 #define NUM_TCP_MESGS_PER_CONNECTION    10
 #define NUM_UDP_DATAGRAMS_PER_CLIENT    5
 #define TCP_SERVER_PORT            10000
 #define UDP_SERVER_PORT            TCP_SERVER_PORT
 #define SERVER_MAX_BIND_COUNT        100
 
@@ -1098,22 +1081,17 @@ UDP_Socket_Client_Server_Test(void)
         }
         cparamp->server_addr = udp_server_addr;
         cparamp->exit_mon = mon2;
         cparamp->exit_counter = &thread_count;
         cparamp->datalen = datalen;
         /*
          * Cause every other client thread to connect udp sockets
          */
-#ifndef XP_MAC
         cparamp->udp_connect = udp_connect;
-#else
-        /* No support for UDP connects on Mac */
-        cparamp->udp_connect = 0;
-#endif
         if (udp_connect)
             udp_connect = 0;
         else
             udp_connect = 1;
         DPRINTF(("Creating UDP client %d\n", i));
         t = PR_CreateThread(PR_USER_THREAD,
             UDP_Client, (void *) cparamp,
             PR_PRIORITY_NORMAL,
@@ -2232,19 +2210,16 @@ int main(int argc, char **argv)
             break;
         }
     }
     PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("socket.log");
-#endif
     PR_SetConcurrency(4);
 
     emuSendFileIdentity = PR_GetUniqueIdentity("Emulated SendFile");
     emuSendFileMethods = *PR_GetDefaultIOMethods();
     emuSendFileMethods.transmitfile = emu_TransmitFile;
     emuSendFileMethods.sendfile = emu_SendFile;
 
     /*
--- a/nsprpub/pr/tests/sockopt.c
+++ b/nsprpub/pr/tests/sockopt.c
@@ -34,48 +34,30 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nspr.h"
 #include "prio.h"
 #include "prinit.h"
 #include "prprf.h"
-#ifdef XP_MAC
-#include "probslet.h"
-#else
 #include "obsolete/probslet.h"
-#endif
 
 #include "plerror.h"
 
 static PRFileDesc *err = NULL;
 static PRBool failed = PR_FALSE;
 
-#ifndef XP_MAC
 static void Failed(const char *msg1, const char *msg2)
 {
     if (NULL != msg1) PR_fprintf(err, "%s ", msg1);
     PL_FPrintError(err, msg2);
     failed = PR_TRUE;
 }  /* Failed */
 
-#else
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-static void Failed(const char *msg1, const char *msg2)
-{
-    if (NULL != msg1) printf("%s ", msg1);
-    printf (msg2);
-    failed |= PR_TRUE;
-}  /* Failed */
-
-#endif
-
 static PRSockOption Incr(PRSockOption *option)
 {
     PRIntn val = ((PRIntn)*option) + 1;
     *option = (PRSockOption)val;
     return (PRSockOption)val;
 }  /* Incr */
 
 int main(int argc, char **argv)
@@ -105,20 +87,16 @@ int main(int argc, char **argv)
         "PR_SockOpt_MaxSegment",      /* maximum segment size */
         "PR_SockOpt_Broadcast",       /* Enable broadcast */
         "PR_SockOpt_Last"
     };
 
     err = PR_GetSpecialFD(PR_StandardError);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("sockopt.log");
-#endif
-
     if (NULL == udp) Failed("PR_NewUDPSocket()", NULL);
     else if (NULL == tcp) Failed("PR_NewTCPSocket()", NULL);
     else
     {
         PRSockOption option;
         PRUint32 segment = 1024;
         PRNetAddr addr;
 
@@ -202,18 +180,14 @@ int main(int argc, char **argv)
 			}
 
             rv = PR_GetSocketOption(fd, &data);
             if (PR_FAILURE == rv) Failed("PR_GetSocketOption()", tag[option]);
         }
         PR_Close(udp);
         PR_Close(tcp);
     }
-#ifndef XP_MAC
     PR_fprintf(err, "%s\n", (failed) ? "FAILED" : "PASSED");
-#else
-   printf("%s\n", (failed) ? "FAILED" : "PASSED");
-#endif
     return (failed) ? 1 : 0;
 }  /* main */
 
 /* sockopt.c */
 
--- a/nsprpub/pr/tests/suspend.c
+++ b/nsprpub/pr/tests/suspend.c
@@ -43,31 +43,20 @@ int main()
     return 0;
 }
 #else
 
 #include "nspr.h"
 #include "prpriv.h"
 #include "prinrval.h"
 
-#if defined(XP_MAC)
-#include "gcint.h"
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "gcint.h"
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRMonitor *mon;
 PRInt32 count;
 PRInt32 alive;
 
 #define SLEEP_TIME    4    /* secs */
 
 void PR_CALLBACK
 Level_2_Thread(void *arg)
@@ -196,20 +185,16 @@ static void CreateThreadsKK(void)
 }
 
 
 int main(int argc, char **argv)
 {
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("suspend.log");
-#endif
-
     if (argc > 1) {
         count = atoi(argv[1]);
     } else {
         count = 5;
     }
 
     printf("\n\n%20s%30s\n\n"," ","Suspend_Resume Test");
     CreateThreadsUU();
--- a/nsprpub/pr/tests/switch.c
+++ b/nsprpub/pr/tests/switch.c
@@ -47,22 +47,17 @@
 #include "prlock.h"
 #include "prlog.h"
 #include "prthread.h"
 #include "prprf.h"
 
 #include "plerror.h"
 #include "plgetopt.h"
 
-#if defined(XP_MAC)
-#include "pprio.h"
-#define printf PR_LogPrint
-#else
 #include "private/pprio.h"
-#endif
 
 #include <stdlib.h>
 
 #define INNER_LOOPS 100
 #define DEFAULT_LOOPS 100
 #define DEFAULT_THREADS 10
 
 static PRFileDesc *debug_out = NULL;
--- a/nsprpub/pr/tests/testfile.c
+++ b/nsprpub/pr/tests/testfile.c
@@ -56,24 +56,16 @@
 #define INCL_DOSFILEMGR
 #include <os2.h>
 #include <getopt.h>
 #include <errno.h>
 #endif /* XP_OS2 */
 
 static int _debug_on = 0;
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "primpl.h"
-#define printf PR_LogPrint
-#define setbuf(x,y)
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #ifdef WINCE
 #define setbuf(x,y)
 #endif
 
 #ifdef XP_WIN
 #define mode_t int
 #endif
 
@@ -682,84 +674,36 @@ HANDLE hfile;
 		if (fd_file == NULL) {
 			printf(
 					"testfile failed to create/open file %s [%d, %d]\n",
 					pathname, PR_GetError(), PR_GetOSError());
 			return -1;
 		}
         PR_Close(fd_file);
 	}
-#if defined(XP_UNIX) || defined(XP_MAC) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
 	/*
 	 * Create a hidden file - a platform-dependent operation
 	 */
 	strcpy(pathname, TEST_DIR);
 	strcat(pathname, "/");
 	strcat(pathname, HIDDEN_FILE_NAME);
-#if defined(XP_UNIX) || defined(XP_MAC) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_BEOS)
 	DPRINTF(("Creating hidden test file %s\n",pathname));
 	fd_file = PR_Open(pathname, PR_RDWR | PR_CREATE_FILE, 0777);
 
 	if (fd_file == NULL) {
 		printf(
 				"testfile failed to create/open hidden file %s [%d, %d]\n",
 				pathname, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
 
-#if defined(XP_MAC)
-	{
-#include <files.h>
-
-	OSErr			err;
-	FCBPBRec		fcbpb;
-	CInfoPBRec		pb;
-	Str255			pascalMacPath;
-
-	fcbpb.ioNamePtr = pascalMacPath;
-	fcbpb.ioVRefNum = 0;
-	fcbpb.ioRefNum = fd_file->secret->md.osfd;
-	fcbpb.ioFCBIndx = 0;
-	
-	err = PBGetFCBInfoSync(&fcbpb);
-	if (err != noErr) {
-    	PR_Close(fd_file);
-    	return -1;
-	}
-	
-	pb.hFileInfo.ioNamePtr = pascalMacPath;
-	pb.hFileInfo.ioVRefNum = fcbpb.ioFCBVRefNum;
-	pb.hFileInfo.ioDirID = fcbpb.ioFCBParID;
-	pb.hFileInfo.ioFDirIndex = 0;
-	
-	err = PBGetCatInfoSync(&pb);
-	if (err != noErr) {
-    	PR_Close(fd_file);
-    	return -1;
-	}
-
-	pb.hFileInfo.ioNamePtr = pascalMacPath;
-	pb.hFileInfo.ioVRefNum = fcbpb.ioFCBVRefNum;
-	pb.hFileInfo.ioDirID = fcbpb.ioFCBParID;
-	pb.hFileInfo.ioFDirIndex = 0;
-	
-	pb.hFileInfo.ioFlFndrInfo.fdFlags |= fInvisible;
-
-	err = PBSetCatInfoSync(&pb);
-	if (err != noErr) {
-    	PR_Close(fd_file);
-    	return -1;
-	}
-
-	}
-#endif
-
     PR_Close(fd_file);
 
-	
 #elif defined(WINCE)
 	DPRINTF(("Creating hidden test file %s\n",pathname));
     MultiByteToWideChar(CP_ACP, 0, pathname, -1, wPathname, 256); 
 	hfile = CreateFile(wPathname, GENERIC_READ,
 						FILE_SHARE_READ|FILE_SHARE_WRITE,
 						NULL,
 						CREATE_NEW,
 						FILE_ATTRIBUTE_HIDDEN,
@@ -791,19 +735,19 @@ HANDLE hfile;
 	fd_file = PR_Open(pathname, PR_RDWR | PR_CREATE_FILE, (int)FILE_HIDDEN);
 
 	if (fd_file == NULL) {
 		printf("testfile failed to create/open hidden file %s [%d, %d]\n",
 				pathname, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
 	PR_Close(fd_file);
-#endif	/* XP _UNIX || XP_MAC*/
+#endif	/* XP_UNIX */
 
-#endif	/* XP_UNIX || XP_MAC ||(XP_PC && WIN32) */
+#endif	/* XP_UNIX || (XP_PC && WIN32) */
 
 
 	if (PR_FAILURE == PR_CloseDir(fd_dir))
 	{
 		printf(
 			"testfile failed to close dirctory %s [%d, %d]\n",
 			TEST_DIR, PR_GetError(), PR_GetOSError());
 		return -1;
@@ -815,17 +759,17 @@ HANDLE hfile;
 			TEST_DIR, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
   
 	/*
 	 * List all files, including hidden files
 	 */
 	DPRINTF(("Listing all files in directory %s\n",TEST_DIR));
-#if defined(XP_UNIX) || defined(XP_MAC) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
 	num_files = FILES_IN_DIR + 1;
 #else
 	num_files = FILES_IN_DIR;
 #endif
 	while ((dirEntry = PR_ReadDir(fd_dir, PR_SKIP_BOTH)) != NULL) {
 		num_files--;
 		strcpy(pathname, TEST_DIR);
 		strcat(pathname, "/");
@@ -851,17 +795,17 @@ HANDLE hfile;
 		printf(
 			"testfile failed to find all files in directory %s [%d, %d]\n",
 			TEST_DIR, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
 
     PR_CloseDir(fd_dir);
 
-#if defined(XP_UNIX) || defined(XP_MAC) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
 
 	/*
 	 * List all files, except hidden files
 	 */
 
 	fd_dir = PR_OpenDir(TEST_DIR);
 	if (fd_dir == NULL) {
 		printf(
@@ -888,17 +832,17 @@ HANDLE hfile;
 	if (PR_FAILURE == PR_Delete(pathname)) {
 		printf(
 			"testfile failed to delete hidden file %s [%d, %d]\n",
 			pathname, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
 
     PR_CloseDir(fd_dir);
-#endif	/* XP_UNIX || XP_MAC || (XP_PC && WIN32) */
+#endif	/* XP_UNIX || (XP_PC && WIN32) */
 
 	strcpy(renamename, TEST_DIR);
 	strcat(renamename, ".RENAMED");
 	if (PR_FAILURE == PR_Rename(TEST_DIR, renamename)) {
 		printf(
 			"testfile failed to rename directory %s [%d, %d]\n",
 			TEST_DIR, PR_GetError(), PR_GetOSError());
 		return -1;
@@ -995,20 +939,16 @@ int main(int argc, char **argv)
                         default:
                                 break;
                 }
         }
 #endif
 	PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("testfile.log");
-#endif
-
 	mon = PR_NewMonitor();
 	if (mon == NULL) {
 		printf("testfile: PR_NewMonitor failed\n");
 		exit(2);
 	}
 #ifdef WIN32
 
 #ifdef WINCE
--- a/nsprpub/pr/tests/threads.c
+++ b/nsprpub/pr/tests/threads.c
@@ -38,22 +38,16 @@
 #include "nspr.h"
 #include "prinrval.h"
 #include "plgetopt.h"
 #include "pprthred.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRMonitor *mon;
 PRInt32 count, iterations, alive;
 
 PRBool debug_mode = PR_FALSE, passed = PR_TRUE;
 
 void 
 PR_CALLBACK
 ReallyDumbThread(void *arg)
@@ -195,27 +189,19 @@ int main(int argc, char **argv)
                 break;
              default:
                 break;
             }
         }
     	PL_DestroyOptState(opt);
     }
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("threads.log");
-	count = 10;
-	iterations = 10;
-	debug_mode = PR_TRUE;
-#else
     if (0 == count) count = 50;
     if (0 == iterations) iterations = 10;
 
-#endif
-
     if (debug_mode)
     {
     printf("\
 ** Tests lots of thread creations.  \n\
 ** Create %ld native threads %ld times. \n\
 ** Create %ld user threads %ld times \n", iterations,count,iterations,count);
     }
 
--- a/nsprpub/pr/tests/thrpool_client.c
+++ b/nsprpub/pr/tests/thrpool_client.c
@@ -60,29 +60,17 @@
 #ifdef WIN32
 #include <process.h>
 #endif
 
 static int _debug_on = 0;
 static int server_port = -1;
 static char *program_name = NULL;
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-    PR_LogPrint(fmt);
-    return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 #ifdef XP_PC
 #define mode_t int
 #endif
 
 #define DPRINTF(arg) if (_debug_on) printf arg
 
 #define    BUF_DATA_SIZE    (2 * 1024)
@@ -371,19 +359,16 @@ int main(int argc, char **argv)
             break;
         }
     }
     PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("socket.log");
-#endif
     PR_SetConcurrency(4);
 
 	TCP_Socket_Client_Server_Test();
 
     PR_Cleanup();
     if (failed_already)
 		return 1;
     else
--- a/nsprpub/pr/tests/thrpool_server.c
+++ b/nsprpub/pr/tests/thrpool_server.c
@@ -67,29 +67,17 @@
 #ifdef WIN32
 #include <process.h>
 #endif
 
 static int _debug_on = 0;
 static char *program_name = NULL;
 static void serve_client_write(void *arg);
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-    PR_LogPrint(fmt);
-    return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 #ifdef XP_PC
 #define mode_t int
 #endif
 
 #define DPRINTF(arg) if (_debug_on) printf arg
 
 
@@ -576,19 +564,16 @@ int main(int argc, char **argv)
             break;
         }
     }
     PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("socket.log");
-#endif
     PR_SetConcurrency(4);
 
 	tp = PR_CreateThreadPool(initial_threads, max_threads, stacksize);
     if (NULL == tp) {
         printf("PR_CreateThreadPool failed\n");
         failed_already=1;
         goto done;
 	}
--- a/nsprpub/pr/tests/timemac.c
+++ b/nsprpub/pr/tests/timemac.c
@@ -38,22 +38,16 @@
 /*
  * file: timemac.c
  * description: test time and date routines on the Mac
  */
 #include <stdio.h>
 #include "prinit.h"
 #include "prtime.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 
 static char *dayOfWeek[] =
 	{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "???" };
 static char *month[] =
 	{ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
 	  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "???" };
 
 static void printExplodedTime(const PRExplodedTime *et) {
@@ -86,20 +80,16 @@ static void printExplodedTime(const PREx
 }
 
 int main(int argc, char** argv)
 {
     PR_STDIO_INIT();
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
 
  
-#ifdef XP_MAC
-	SetupMacPrintfLog("timemac.log");
-#endif
-
    /*
      *************************************************************
      **
      **  Testing PR_Now(), PR_ExplodeTime, and PR_ImplodeTime
      **  on the current time
      **
      *************************************************************
      */
--- a/nsprpub/pr/tests/timetest.c
+++ b/nsprpub/pr/tests/timetest.c
@@ -48,22 +48,16 @@
 #include "prinit.h"
 #include "prtime.h"
 #include "prprf.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "macstdlibextras.h"
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 int failed_already=0;
 PRBool debug_mode = PR_FALSE;
 
 static char *dayOfWeek[] =
 	{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "???" };
 static char *month[] =
 	{ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
 	  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "???" };
@@ -201,21 +195,16 @@ int main(int argc, char** argv)
         }
     }
 	PL_DestroyOptState(opt);
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
 
-#ifdef XP_MAC
-	/* Set up the console */
-	InitializeSIOUX(true);
-	debug_mode = PR_TRUE;
-#endif
     /* Testing zero PRTime (the epoch) */
     {
 	PRTime t;
 	PRExplodedTime et;
 
 	LL_I2L(t, 0);
 	if (debug_mode) printf("The NSPR epoch is:\n");
         PR_ExplodeTime(t, PR_LocalTimeParameters, &et);
@@ -771,22 +760,12 @@ int main(int argc, char** argv)
                     }
 
 		    et = et1;
 		}
 	    }
         }
     }
 
-#ifdef XP_MAC
-	if (1)
-	{
-		char dummyChar;
-		
-		printf("Press return to exit\n\n");
-		scanf("%c", &dummyChar);
-	}
-#endif
-
 	if (failed_already) return 1;
 	else return 0;
 
 }
--- a/nsprpub/pr/tests/tmoacc.c
+++ b/nsprpub/pr/tests/tmoacc.c
@@ -38,21 +38,16 @@
 #include "nspr.h"
 
 #include <stdlib.h>
 #include <string.h>
 
 #include "plerror.h"
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 #define BASE_PORT 9867
 #define DEFAULT_THREADS 1
 #define DEFAULT_BACKLOG 10
 #define DEFAULT_TIMEOUT 10
 #define RANDOM_RANGE 100  /* should be significantly smaller than RAND_MAX */
 
 typedef enum {running, stopped} Status;
 
--- a/nsprpub/pr/tests/tmocon.c
+++ b/nsprpub/pr/tests/tmocon.c
@@ -67,21 +67,16 @@
 
 /* for getcwd */
 #if defined(XP_UNIX) || defined (XP_OS2) || defined(XP_BEOS)
 #include <unistd.h>
 #elif defined(XP_PC)
 #include <direct.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 
 #define BASE_PORT 9867
 
 #define DEFAULT_DALLY 1
 #define DEFAULT_THREADS 1
 #define DEFAULT_TIMEOUT 10
 #define DEFAULT_MESSAGES 100
 #define DEFAULT_MESSAGESIZE 100
--- a/nsprpub/pr/tests/tpd.c
+++ b/nsprpub/pr/tests/tpd.c
@@ -42,21 +42,17 @@
 
 #include "prmem.h"
 #include "prinit.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prthread.h"
 #include "prtypes.h"
 
-#if defined(XP_MAC)
-#include "pprio.h"
-#else
 #include "private/pprio.h"
-#endif
 
 #include "plgetopt.h"
 
 static PRUintn key[128];
 static PRIntn debug = 0;
 static PRBool failed = PR_FALSE;
 static PRBool should = PR_TRUE;
 static PRBool did = PR_TRUE;
--- a/nsprpub/pr/tests/udpsrv.c
+++ b/nsprpub/pr/tests/udpsrv.c
@@ -490,20 +490,16 @@ int main(int argc, char **argv)
         }
     }
 	PL_DestroyOptState(opt);
 		
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
     output = PR_STDERR;
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("udpsrv.log");
-#endif
-
     PR_SetConcurrency(4);
     
     /*
     ** Create the Server thread
     */    
     DPRINTF( "udpsrv: Creating Server Thread\n" );
     srv =  PR_CreateThread( PR_USER_THREAD,
             UDP_Server,
--- a/nsprpub/pr/tests/writev.c
+++ b/nsprpub/pr/tests/writev.c
@@ -37,21 +37,16 @@
 
 #include "nspr.h"
 
 #include "plgetopt.h"
 
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 
 #ifndef IOV_MAX
 #define IOV_MAX 16
 #endif
 
 #define BASE_PORT 9867
 
 int PR_CALLBACK Writev(int argc, char **argv)
--- a/nsprpub/pr/tests/y2k.c
+++ b/nsprpub/pr/tests/y2k.c
@@ -51,22 +51,16 @@
 #include "prtime.h"
 #include "prprf.h"
 #include "prlog.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "macstdlibextras.h"
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define PRINT_DETAILS
 
 int failed_already=0;
 PRBool debug_mode = PR_FALSE;
 
 static char *dayOfWeek[] =
 	{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "???" };
 static char *month[] =
@@ -787,22 +781,16 @@ int main(int argc, char** argv)
     }
 	PL_DestroyOptState(opt);
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     lm = PR_NewLogModule("test");
 
-#ifdef XP_MAC
-	/* Set up the console */
-	InitializeSIOUX(true);
-	debug_mode = PR_TRUE;
-#endif
-
     if ( PR_FAILURE == TestExplodeImplodeTime())
     {
         PR_LOG( lm, PR_LOG_ERROR,
             ("TestExplodeImplodeTime() failed"));
     }
     else
     	printf("Test 1: Calendar Time Test passed\n");
 
@@ -817,24 +805,14 @@ int main(int argc, char** argv)
     if ( PR_FAILURE == TestParseTime())
     {
         PR_LOG( lm, PR_LOG_ERROR,
             ("TestParseTime() failed"));
     }
     else
     	printf("Test 3: Parse Time Test passed\n");
 
-#ifdef XP_MAC
-	if (1)
-	{
-		char dummyChar;
-		
-		printf("Press return to exit\n\n");
-		scanf("%c", &dummyChar);
-	}
-#endif
-
 	if (failed_already) 
 	    return 1;
 	else 
 	    return 0;
 } /* end main() y2k.c */