fixup commit for tag 'Mac_CW4_BASE' Mac_CW4_BASE
authorcvs2hg
Thu, 13 Aug 1998 04:35:21 +0000
changeset 213 146527b7c135b60379c53e9f3115fabb2fd5874f
parent 212 110aadf986a0b4708ff0f36ef852cdaf9c43fd45
child 214 4e70483b7b38978e07d75501079e84ed3d6599d8
push idunknown
push userunknown
push dateunknown
fixup commit for tag 'Mac_CW4_BASE'
Makefile
config/.cvsignore
config/AIX.mk
config/BSD_OS.mk
config/FreeBSD.mk
config/HP-UX.mk
config/IRIX.mk
config/Linux.mk
config/Makefile
config/NCR.mk
config/NEC.mk
config/NEWS-OS.mk
config/NetBSD.mk
config/OS2.mk
config/OSF1.mk
config/Rhapsody.mk
config/SCOOS.mk
config/SINIX.mk
config/SunOS.mk
config/SunOS4.mk
config/SunOS5.mk
config/UNIX.mk
config/UNIXWARE.mk
config/WIN32.mk
config/WIN95.mk
config/WINNT.mk
config/arch.mk
config/config.mk
config/libc_r.h
config/module.df
config/nfspwd.pl
config/nsinstall.c
config/pathsub.c
config/pathsub.h
config/prmkdir.bat
config/rules.mk
config/win16.mk
lib/Makefile
lib/ds/MANIFEST
lib/ds/Makefile
lib/ds/export.mac
lib/ds/plarena.c
lib/ds/plarena.h
lib/ds/plarenas.h
lib/ds/plevent.c
lib/ds/plevent.h
lib/ds/plhash.c
lib/ds/plhash.h
lib/ds/plvector.c
lib/ds/plvector.h
lib/libc/Makefile
lib/libc/README
lib/libc/include/MANIFEST
lib/libc/include/Makefile
lib/libc/include/README
lib/libc/include/export.mac
lib/libc/include/plbase64.h
lib/libc/include/plerror.h
lib/libc/include/plgetopt.h
lib/libc/include/plresolv.h
lib/libc/include/plstr.h
lib/libc/src/Makefile
lib/libc/src/README
lib/libc/src/base64.c
lib/libc/src/plerror.c
lib/libc/src/plgetopt.c
lib/libc/src/strcat.c
lib/libc/src/strccmp.c
lib/libc/src/strchr.c
lib/libc/src/strcmp.c
lib/libc/src/strcpy.c
lib/libc/src/strcstr.c
lib/libc/src/strdup.c
lib/libc/src/strlen.c
lib/libc/src/strpbrk.c
lib/libc/src/strstr.c
lib/msgc/Makefile
lib/msgc/include/MANIFEST
lib/msgc/include/Makefile
lib/msgc/include/export.mac
lib/msgc/include/gcint.h
lib/msgc/include/prgc.h
lib/msgc/src/Makefile
lib/msgc/src/macgc.c
lib/msgc/src/os2gc.c
lib/msgc/src/prgcapi.c
lib/msgc/src/prmsgc.c
lib/msgc/src/unixgc.c
lib/msgc/src/win16gc.c
lib/msgc/src/win32gc.c
lib/msgc/tests/Makefile
lib/msgc/tests/gc1.c
lib/msgc/tests/thrashgc.c
lib/prstreams/Makefile
lib/prstreams/prstrms.cpp
lib/prstreams/prstrms.h
lib/prstreams/tests/testprstrm/Makefile
lib/prstreams/tests/testprstrm/testprstrm.cpp
lib/tests/Makefile
lib/tests/base64t.c
lib/tests/string.c
macbuild/NSPR.Debug.Prefix
macbuild/NSPR.Prefix
macbuild/NSPR20.prj2
macbuild/NSPR20PPC.mcp
macbuild/NSPR20PPCDebug.mcp
macbuild/NSPRConfig.h
macbuild/NSPRDebug.Prefix
makefile.win
pr/Makefile
pr/include/MANIFEST
pr/include/Makefile
pr/include/export.mac
pr/include/gencfg.c
pr/include/md/Makefile
pr/include/md/_aix.cfg
pr/include/md/_aix.h
pr/include/md/_bsdi.cfg
pr/include/md/_bsdi.h
pr/include/md/_darwin.cfg
pr/include/md/_darwin.h
pr/include/md/_dgux.cfg
pr/include/md/_dgux.h
pr/include/md/_freebsd.cfg
pr/include/md/_freebsd.h
pr/include/md/_hpux.cfg
pr/include/md/_hpux.h
pr/include/md/_irix.cfg
pr/include/md/_irix.h
pr/include/md/_linux.cfg
pr/include/md/_linux.h
pr/include/md/_macos.h
pr/include/md/_ncr.cfg
pr/include/md/_ncr.h
pr/include/md/_nec.cfg
pr/include/md/_nec.h
pr/include/md/_netbsd.cfg
pr/include/md/_netbsd.h
pr/include/md/_nspr_pthread.h
pr/include/md/_os2.cfg
pr/include/md/_os2.h
pr/include/md/_os2_errors.h
pr/include/md/_osf1.cfg
pr/include/md/_osf1.h
pr/include/md/_pcos.h
pr/include/md/_pth.h
pr/include/md/_reliantunix.cfg
pr/include/md/_reliantunix.h
pr/include/md/_rhapsody.cfg
pr/include/md/_rhapsody.h
pr/include/md/_scoos.cfg
pr/include/md/_scoos.h
pr/include/md/_solaris.cfg
pr/include/md/_solaris.h
pr/include/md/_sony.cfg
pr/include/md/_sony.h
pr/include/md/_sunos4.cfg
pr/include/md/_sunos4.h
pr/include/md/_unix_errors.h
pr/include/md/_unixos.h
pr/include/md/_unixware.cfg
pr/include/md/_unixware.h
pr/include/md/_win16.cfg
pr/include/md/_win16.h
pr/include/md/_win32_errors.h
pr/include/md/_win95.cfg
pr/include/md/_win95.h
pr/include/md/_winnt.cfg
pr/include/md/_winnt.h
pr/include/md/prosdep.h
pr/include/md/sunos4.h
pr/include/nspr.h
pr/include/obsolete/Makefile
pr/include/obsolete/pralarm.h
pr/include/obsolete/probslet.h
pr/include/obsolete/protypes.h
pr/include/obsolete/prsem.h
pr/include/pratom.h
pr/include/prbit.h
pr/include/prclist.h
pr/include/prcmon.h
pr/include/prcvar.h
pr/include/prdtoa.h
pr/include/prenv.h
pr/include/prerror.h
pr/include/prinet.h
pr/include/prinit.h
pr/include/prinrval.h
pr/include/prio.h
pr/include/private/Makefile
pr/include/private/pprio.h
pr/include/private/pprthred.h
pr/include/private/primpl.h
pr/include/private/prpriv.h
pr/include/prlink.h
pr/include/prlock.h
pr/include/prlog.h
pr/include/prlong.h
pr/include/prmem.h
pr/include/prmon.h
pr/include/prmwait.h
pr/include/prnetdb.h
pr/include/prpdce.h
pr/include/prprf.h
pr/include/prproces.h
pr/include/prsystem.h
pr/include/prthread.h
pr/include/prtime.h
pr/include/prtypes.h
pr/include/prwin16.h
pr/src/Makefile
pr/src/io/Makefile
pr/src/io/pprmwait.h
pr/src/io/prdir.c
pr/src/io/prfile.c
pr/src/io/prio.c
pr/src/io/priometh.c
pr/src/io/pripv6.c
pr/src/io/prlayer.c
pr/src/io/prlog.c
pr/src/io/prmapopt.c
pr/src/io/prmmap.c
pr/src/io/prmwait.c
pr/src/io/prprf.c
pr/src/io/prscanf.c
pr/src/io/prsocket.c
pr/src/io/prstdio.c
pr/src/linking/Makefile
pr/src/linking/prlink.c
pr/src/malloc/Makefile
pr/src/malloc/prmalloc.c
pr/src/malloc/prmem.c
pr/src/md/Makefile
pr/src/md/mac/MANIFEST
pr/src/md/mac/MacErrorHandling.h
pr/src/md/mac/export.mac
pr/src/md/mac/macdll.c
pr/src/md/mac/macio.c
pr/src/md/mac/macsockclient.c
pr/src/md/mac/macsocket.h
pr/src/md/mac/macsockotpt.c
pr/src/md/mac/macthr.c
pr/src/md/mac/mactime.c
pr/src/md/mac/mdmac.c
pr/src/md/mac/prcpucfg.h
pr/src/md/os2/Makefile
pr/src/md/os2/os2_errors.c
pr/src/md/os2/os2cv.c
pr/src/md/os2/os2gc.c
pr/src/md/os2/os2inrval.c
pr/src/md/os2/os2io.c
pr/src/md/os2/os2misc.c
pr/src/md/os2/os2poll.c
pr/src/md/os2/os2sem.c
pr/src/md/os2/os2sock.c
pr/src/md/os2/os2thred.c
pr/src/md/prosdep.c
pr/src/md/unix/Makefile
pr/src/md/unix/aix.c
pr/src/md/unix/aixwrap.c
pr/src/md/unix/bsdi.c
pr/src/md/unix/darwin.c
pr/src/md/unix/dgux.c
pr/src/md/unix/freebsd.c
pr/src/md/unix/hpux.c
pr/src/md/unix/irix.c
pr/src/md/unix/linux.c
pr/src/md/unix/ncr.c
pr/src/md/unix/nec.c
pr/src/md/unix/netbsd.c
pr/src/md/unix/objs.mk
pr/src/md/unix/os_AIX.s
pr/src/md/unix/os_BSD_386_2.s
pr/src/md/unix/os_ReliantUNIX.s
pr/src/md/unix/os_SunOS.s
pr/src/md/unix/os_SunOS_ultrasparc.s
pr/src/md/unix/os_SunOS_x86.s
pr/src/md/unix/osf1.c
pr/src/md/unix/pthreads_user.c
pr/src/md/unix/reliantunix.c
pr/src/md/unix/rhapsody.c
pr/src/md/unix/scoos.c
pr/src/md/unix/solaris.c
pr/src/md/unix/sony.c
pr/src/md/unix/sunos4.c
pr/src/md/unix/unix.c
pr/src/md/unix/unix_errors.c
pr/src/md/unix/unixware.c
pr/src/md/unix/uxproces.c
pr/src/md/unix/uxwrap.c
pr/src/md/windows/Makefile
pr/src/md/windows/ntgc.c
pr/src/md/windows/ntinrval.c
pr/src/md/windows/ntio.c
pr/src/md/windows/ntmisc.c
pr/src/md/windows/ntsem.c
pr/src/md/windows/ntthread.c
pr/src/md/windows/w16callb.c
pr/src/md/windows/w16error.c
pr/src/md/windows/w16fmem.c
pr/src/md/windows/w16gc.c
pr/src/md/windows/w16io.c
pr/src/md/windows/w16mem.c
pr/src/md/windows/w16null.c
pr/src/md/windows/w16proc.c
pr/src/md/windows/w16sock.c
pr/src/md/windows/w16stdio.c
pr/src/md/windows/w16thred.c
pr/src/md/windows/w32poll.c
pr/src/md/windows/w95cv.c
pr/src/md/windows/w95io.c
pr/src/md/windows/w95sock.c
pr/src/md/windows/w95thred.c
pr/src/md/windows/win32_errors.c
pr/src/memory/Makefile
pr/src/memory/prseg.c
pr/src/misc/Makefile
pr/src/misc/pralarm.c
pr/src/misc/pratom.c
pr/src/misc/prdtoa.c
pr/src/misc/prenv.c
pr/src/misc/prerror.c
pr/src/misc/prinit.c
pr/src/misc/prinrval.c
pr/src/misc/prlog2.c
pr/src/misc/prlong.c
pr/src/misc/prnetdb.c
pr/src/misc/prsystem.c
pr/src/misc/prthinfo.c
pr/src/misc/prtime.c
pr/src/nspr.rc
pr/src/pthreads/Makefile
pr/src/pthreads/ptio.c
pr/src/pthreads/ptmisc.c
pr/src/pthreads/ptsynch.c
pr/src/pthreads/ptthread.c
pr/src/resource.h
pr/src/threads/Makefile
pr/src/threads/combined/Makefile
pr/src/threads/combined/README
pr/src/threads/combined/prucpu.c
pr/src/threads/combined/prucv.c
pr/src/threads/combined/prulock.c
pr/src/threads/combined/prustack.c
pr/src/threads/combined/pruthr.c
pr/src/threads/prcmon.c
pr/src/threads/prcthr.c
pr/src/threads/prdump.c
pr/src/threads/prmon.c
pr/src/threads/prsem.c
pr/src/threads/prtpd.c
pr/tests/Makefile
pr/tests/accept.c
pr/tests/alarm.c
pr/tests/atomic.c
pr/tests/attach.c
pr/tests/bigfile.c
pr/tests/bug1test.c
pr/tests/cleanup.c
pr/tests/cltsrv.c
pr/tests/concur.c
pr/tests/cvar.c
pr/tests/cvar2.c
pr/tests/dbmalloc.c
pr/tests/dbmalloc1.c
pr/tests/dceemu.c
pr/tests/depend.c
pr/tests/dll/Makefile
pr/tests/dll/mygetval.c
pr/tests/dll/mysetval.c
pr/tests/dlltest.c
pr/tests/dtoa.c
pr/tests/exit.c
pr/tests/fileio.c
pr/tests/forktest.c
pr/tests/fsync.c
pr/tests/getproto.c
pr/tests/i2l.c
pr/tests/inrval.c
pr/tests/intrupt.c
pr/tests/io_timeout.c
pr/tests/io_timeoutk.c
pr/tests/io_timeoutu.c
pr/tests/ipv6.c
pr/tests/join.c
pr/tests/joinkk.c
pr/tests/joinku.c
pr/tests/joinuk.c
pr/tests/joinuu.c
pr/tests/layer.c
pr/tests/lazyinit.c
pr/tests/lltest.c
pr/tests/lock.c
pr/tests/lockfile.c
pr/tests/logger.c
pr/tests/many_cv.c
pr/tests/multiwait.c
pr/tests/nbconn.c
pr/tests/nblayer.c
pr/tests/nonblock.c
pr/tests/op_2long.c
pr/tests/op_filnf.c
pr/tests/op_filok.c
pr/tests/op_noacc.c
pr/tests/op_nofil.c
pr/tests/parent.c
pr/tests/perf.c
pr/tests/poll_er.c
pr/tests/poll_nm.c
pr/tests/poll_to.c
pr/tests/prftest.c
pr/tests/prftest1.c
pr/tests/prftest2.c
pr/tests/priotest.c
pr/tests/prpoll.c
pr/tests/prselect.c
pr/tests/prttools.h
pr/tests/ranfile.c
pr/tests/sel_spd.c
pr/tests/selct_er.c
pr/tests/selct_nm.c
pr/tests/selct_to.c
pr/tests/select2.c
pr/tests/sem.c
pr/tests/server_test.c
pr/tests/servr_kk.c
pr/tests/servr_ku.c
pr/tests/servr_uk.c
pr/tests/servr_uu.c
pr/tests/short_thread.c
pr/tests/sigpipe.c
pr/tests/sleep.c
pr/tests/socket.c
pr/tests/sockopt.c
pr/tests/sprintf.c
pr/tests/sproc_ch.c
pr/tests/sproc_p.c
pr/tests/stat.c
pr/tests/stdio.c
pr/tests/strod.c
pr/tests/suspend.c
pr/tests/switch.c
pr/tests/system.c
pr/tests/testbit.c
pr/tests/testfile.c
pr/tests/threads.c
pr/tests/thruput.c
pr/tests/time.c
pr/tests/timemac.c
pr/tests/timetest.c
pr/tests/tmoacc.c
pr/tests/tmocon.c
pr/tests/tpd.c
pr/tests/udpsrv.c
pr/tests/ut_ttools.h
pr/tests/w16gui/Makefile
pr/tests/w16gui/popfile.c
pr/tests/w16gui/popfind.c
pr/tests/w16gui/popfont.c
pr/tests/w16gui/poppad.c
pr/tests/w16gui/poppad.h
pr/tests/w16gui/poppad.ico
pr/tests/w16gui/poppad.rc
pr/tests/w16gui/popprnt0.c
pr/tests/w16gui/readme.1st
pr/tests/writev.c
pr/tests/xnotify.c
pr/tests/yield.c
tools/Makefile
tools/httpget.c
tools/tail.c
deleted file mode 100644
--- a/Makefile
+++ /dev/null
@@ -1,105 +0,0 @@
-#! gmake
-
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-MOD_DEPTH = .
-
-DIRS = config pr lib
-
-ifdef MOZILLA_CLIENT
-PR_CLIENT_BUILD = 1
-PR_CLIENT_BUILD_UNIX = 1
-endif
-
-include $(MOD_DEPTH)/config/rules.mk
-
-#
-# The -ll option of zip converts CR LF to LF.
-#
-ifeq ($(OS_ARCH),WINNT)
-ZIP_ASCII_OPT = -ll
-endif
-
-ifdef PR_CLIENT_BUILD
-export::
-	rm -r -f $(DIST)/../public/nspr
-ifdef PR_CLIENT_BUILD_UNIX
-	rm -f $(DIST)/lib/libnspr.a
-	rm -f $(DIST)/bin/libnspr.$(DLL_SUFFIX)
-endif
-endif
-
-release::
-	echo $(BUILD_NUMBER) > $(RELEASE_DIR)/$(BUILD_NUMBER)/version.df
-	@if test -f imports.df; then \
-	    echo "cp -f imports.df $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
-	    cp -f imports.df $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df; \
-	else \
-	    echo "echo > $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df"; \
-	    echo > $(RELEASE_DIR)/$(BUILD_NUMBER)/imports.df; \
-	fi
-	cd $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
-	rm -rf META-INF; mkdir META-INF; cd META-INF; \
-	echo "Manifest-Version: 1.0" > MANIFEST.MF; \
-	echo "" >> MANIFEST.MF; \
-	cd ..; rm -f mdbinary.jar; zip -r mdbinary.jar META-INF lib; \
-	rm -rf META-INF; \
-	cd include; \
-	rm -rf META-INF; mkdir META-INF; cd META-INF; \
-	echo "Manifest-Version: 1.0" > MANIFEST.MF; \
-	echo "" >> MANIFEST.MF; \
-	cd ..; rm -f mdheader.jar; zip $(ZIP_ASCII_OPT) -r mdheader.jar *; \
-	rm -rf META-INF
-ifeq ($(OS_ARCH),WINNT)
-	@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); then \
-		rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
-		echo "making directory /m/dist/$(MOD_NAME)/$(BUILD_NUMBER)"; \
-		config/prmkdir.bat $(MDIST_DOS)\\$(MOD_NAME)\\$(BUILD_NUMBER); \
-	fi
-	@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); then \
-		rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
-		echo "making directory /m/dist/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)"; \
-		config/prmkdir.bat $(MDIST_DOS)\\$(MOD_NAME)\\$(BUILD_NUMBER)\\$(OBJDIR_NAME); \
-	fi
-else
-	@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); then \
-		rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
-		echo "making directory /m/dist/$(MOD_NAME)/$(BUILD_NUMBER)"; \
-		$(NSINSTALL) -D $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
-		chmod 775 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
-	fi
-	@if test ! -d $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); then \
-		rm -rf $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
-		echo "making directory /m/dist/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)"; \
-		$(NSINSTALL) -D $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
-		chmod 775 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
-	fi
-endif
-	cd $(RELEASE_DIR)/$(BUILD_NUMBER); \
-	cp -f version.df imports.df $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER); \
-	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/version.df; \
-	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/imports.df; \
-	cd $(OBJDIR_NAME); \
-	cp -f mdbinary.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
-	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/mdbinary.jar; \
-	cd include; \
-	cp -f mdheader.jar $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME); \
-	chmod 664 $(MDIST)/$(MOD_NAME)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/mdheader.jar
-
-depend:
-	@echo "NSPR20 has no dependencies.  Skipped."
deleted file mode 100644
--- a/config/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-nfspwd
-revdepth
deleted file mode 100644
--- a/config/AIX.mk
+++ /dev/null
@@ -1,99 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for AIX.
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-CLASSIC_NSPR = 1
-endif
-
-#
-# There are three implementation strategies available on AIX:
-# pthreads, classic, and pthreads-user.  The default is pthreads.
-# 
-ifeq ($(CLASSIC_NSPR),1)
-	PTHREADS_USER =
-	USE_PTHREADS =
-	IMPL_STRATEGY = _CLASSIC
-	DEFINES += -D_PR_LOCAL_THREADS_ONLY
-else
-ifeq ($(PTHREADS_USER),1)
-	USE_PTHREADS =
-	IMPL_STRATEGY = _PTH_USER
-else
-	USE_PTHREADS = 1
-endif
-endif
-
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-IMPL_STRATEGY =
-endif
-
-ifeq ($(CLASSIC_NSPR),1)
-CC		= xlC
-CCC		= xlC
-else
-CC		= xlC_r
-CCC		= xlC_r
-endif
-
-CPU_ARCH	= rs6000
-
-RANLIB		= ranlib
-
-OS_CFLAGS 	= -qro -qroconst -DAIX -DSYSV
-ifeq ($(CC),xlC_r)
-OS_CFLAGS 	+= -qarch=com
-endif
-
-ifeq ($(OS_RELEASE),4.1)
-OS_CFLAGS	+= -DAIX4_1
-else
-DSO_LDOPTS	= -brtl -bM:SRE -bnoentry -bexpall
-MKSHLIB		= $(LD) $(DSO_LDOPTS)
-ifeq ($(OS_RELEASE),4.3)
-OS_CFLAGS	+= -DAIX4_3
-endif
-endif
-
-#
-# Special link info for constructing AIX programs. On AIX we have to
-# statically link programs that use NSPR into a single .o, rewriting the
-# calls to select to call "aix". Once that is done we then can
-# link that .o with a .o built in nspr which implements the system call.
-#
-ifneq ($(OS_RELEASE),4.1)
-AIX_LINK_OPTS	= -brtl -bnso -berok
-else
-AIX_LINK_OPTS	= -bnso -berok
-#AIX_LINK_OPTS	= -bnso -berok -brename:.select,.wrap_select -brename:.poll,.wrap_poll -bI:/usr/lib/syscalls.exp
-endif
-
-AIX_WRAP	= $(DIST)/lib/aixwrap.o
-AIX_TMP		= $(OBJDIR)/_aix_tmp.o
deleted file mode 100644
--- a/config/BSD_OS.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for BSDI Unix for x86.
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-#CC		= gcc -Wall -Wno-format
-#CCC		= g++
-CC		= shlicc2
-CCC		= shlicc2
-RANLIB		= ranlib
-
-DEFINES		+= -D_PR_LOCAL_THREADS_ONLY
-OS_CFLAGS	= -DBSDI -DHAVE_STRERROR -D__386BSD__ -DNEED_BSDREGEX -Di386
-OS_LIBS		= -lcompat -ldl
-
-ifeq ($(OS_RELEASE),2.1)
-OS_CFLAGS	+= -DBSDI_2
-endif
-
-G++INCLUDES	= -I/usr/include/g++
-
-CPU_ARCH	= x86
-
-NOSUCHFILE	= /no-such-file
-
-MKSHLIB		= $(LD) $(DSO_LDOPTS)
-DSO_LDOPTS	= -r
deleted file mode 100644
--- a/config/FreeBSD.mk
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for FreeBSD
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CC			= gcc
-CCC			= g++
-RANLIB			= ranlib
-
-OS_REL_CFLAGS		= -mno-486 -Di386
-CPU_ARCH		= x86
-
-OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK -D_PR_NEED_POLL
-
-ifeq ($(USE_PTHREADS),1)
-OS_LIBS			= -lc_r
-# XXX probably should define _THREAD_SAFE too.
-DEFINES			+= -D_PR_NEED_FAKE_POLL
-else
-OS_LIBS			= -lc
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-endif
-
-ARCH			= freebsd
-
-DLL_SUFFIX		= so.1.0
-
-DSO_CFLAGS		= -fPIC
-DSO_LDOPTS		= -Bshareable
-DSO_LDFLAGS		=
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-G++INCLUDES		= -I/usr/include/g++
deleted file mode 100644
--- a/config/HP-UX.mk
+++ /dev/null
@@ -1,175 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for HP-UX
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-DLL_SUFFIX	= sl
-
-ifdef NS_USE_GCC
-CC			= gcc
-CCC			= g++
-OS_CFLAGS		=
-else
-CC			= cc -Ae
-CCC			= CC
-OS_CFLAGS		= +ESlit
-endif
-
-RANLIB			= echo
-
-CPU_ARCH		= hppa
-
-OS_CFLAGS		+= $(DSO_CFLAGS) -DHPUX -D$(CPU_ARCH) -D_HPUX_SOURCE
-
-#
-# The header netdb.h on HP-UX 9 does not declare h_errno.
-# On 10.10 and 10.20, netdb.h declares h_errno only if
-# _XOPEN_SOURCE_EXTENDED is defined.  So we need to declare
-# h_errno ourselves.
-#
-ifeq ($(basename $(OS_RELEASE)),A.09)
-OS_CFLAGS		+= -D_PR_NEED_H_ERRNO
-endif
-ifeq (,$(filter-out B.10.10 B.10.20,$(OS_RELEASE)))
-OS_CFLAGS		+= -D_PR_NEED_H_ERRNO
-endif
-
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-CLASSIC_NSPR = 1
-endif
-
-#
-# On HP-UX 9, the default (and only) implementation strategy is
-# classic nspr.
-#
-# On HP-UX 10.10 and 10.20, the default implementation strategy is
-# pthreads (actually DCE threads).  Classic nspr is also available.
-#
-# On HP-UX 10.30 and 11.00, the default implementation strategy is
-# pthreads.  Classic nspr and pthreads-user are also available.
-#
-ifeq ($(basename $(OS_RELEASE)),A.09)
-OS_CFLAGS		+= -DHPUX9
-DEFAULT_IMPL_STRATEGY = _CLASSIC
-endif
-
-ifeq ($(OS_RELEASE),B.10.01)
-OS_CFLAGS		+= -DHPUX10
-DEFAULT_IMPL_STRATEGY = _CLASSIC
-endif
-
-ifeq ($(OS_RELEASE),B.10.10)
-OS_CFLAGS		+= -DHPUX10 -DHPUX10_10
-DEFAULT_IMPL_STRATEGY = _PTH
-endif
-
-ifeq ($(OS_RELEASE),B.10.20)
-OS_CFLAGS		+= -DHPUX10 -DHPUX10_20
-DEFAULT_IMPL_STRATEGY = _PTH
-endif
-
-#
-# On 10.30 and 11.00, we use the new ANSI C++ compiler aCC.
-#
-
-ifeq ($(OS_RELEASE),B.10.30)
-ifndef NS_USE_GCC
-CCC			= /opt/aCC/bin/aCC
-OS_CFLAGS		+= +DAportable +DS1.1
-endif
-OS_CFLAGS		+= -DHPUX10 -DHPUX10_30
-DEFAULT_IMPL_STRATEGY = _PTH
-endif
-
-# 11.00 is similar to 10.30.
-ifeq ($(OS_RELEASE),B.11.00)
-ifndef NS_USE_GCC
-CCC			= /opt/aCC/bin/aCC
-OS_CFLAGS		+= +DAportable +DS1.1
-endif
-OS_CFLAGS		+= -DHPUX10 -DHPUX11
-DEFAULT_IMPL_STRATEGY = _PTH
-endif
-
-ifeq ($(DEFAULT_IMPL_STRATEGY),_CLASSIC)
-CLASSIC_NSPR = 1
-endif
-
-ifeq ($(DEFAULT_IMPL_STRATEGY),_PTH)
-USE_PTHREADS = 1
-ifeq ($(CLASSIC_NSPR),1)
-USE_PTHREADS =
-IMPL_STRATEGY = _CLASSIC
-endif
-ifeq ($(PTHREADS_USER),1)
-USE_PTHREADS =
-IMPL_STRATEGY = _PTH_USER
-endif
-endif
-
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-IMPL_STRATEGY =
-endif
-
-ifeq ($(CLASSIC_NSPR),1)
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-endif
-
-#
-# To use the true pthread (kernel thread) library on 10.30 and
-# 11.00, we should define _POSIX_C_SOURCE to be 199506L.
-# The _REENTRANT macro is deprecated.
-#
-
-ifdef USE_PTHREADS
-ifeq (,$(filter-out B.10.10 B.10.20,$(OS_RELEASE)))
-OS_CFLAGS		+= -D_REENTRANT -D_PR_DCETHREADS
-else
-OS_CFLAGS		+= -D_POSIX_C_SOURCE=199506L
-endif
-endif
-
-ifdef PTHREADS_USER
-OS_CFLAGS		+= -D_POSIX_C_SOURCE=199506L
-endif
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-DSO_LDOPTS		= -b
-DSO_LDFLAGS		=
-
-# -fPIC or +Z generates position independent code for use in shared
-# libraries.
-ifdef NS_USE_GCC
-DSO_CFLAGS		= -fPIC
-else
-DSO_CFLAGS		= +Z
-endif
-
-HAVE_PURIFY		= 1
deleted file mode 100644
--- a/config/IRIX.mk
+++ /dev/null
@@ -1,113 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for IRIX
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-#
-# The default implementation strategy for Irix is classic nspr.
-#
-ifeq ($(USE_PTHREADS),1)
-IMPL_STRATEGY = _PTH
-endif
-
-ifdef NS_USE_GCC
-CC			= gcc
-COMPILER_TAG		= _gcc
-AS			= $(CC) -x assembler-with-cpp
-ODD_CFLAGS		= -Wall -Wno-format
-ifdef BUILD_OPT
-OPTIMIZER		= -O6
-endif
-else
-CC			= cc
-CCC         = CC
-ODD_CFLAGS		= -fullwarn -xansi
-ifdef BUILD_OPT
-
-ifeq ($(USE_N32),1)
-OPTIMIZER		= -O -OPT:Olimit=4000
-else
-OPTIMIZER		= -O -Olimit 4000
-endif
-
-endif
-
-# For 6.x machines, include this flag
-ifeq ($(basename $(OS_RELEASE)),6)
-ifeq ($(USE_N32),1)
-ODD_CFLAGS		+= -n32 -exceptions -woff 1209,1642,3201
-COMPILER_TAG		= _n32
-else
-ODD_CFLAGS		+=  -32 -multigot
-endif
-else
-ODD_CFLAGS		+= -xgot
-endif
-endif
-
-ODD_CFLAGS		+= -DSVR4 -DIRIX
-
-
-CPU_ARCH		= mips
-
-RANLIB			= /bin/true
-
-# For purify
-# XXX: should always define _SGI_MP_SOURCE
-NOMD_OS_CFLAGS		= $(ODD_CFLAGS) -D_SGI_MP_SOURCE
-
-ifeq ($(OS_RELEASE),5.3)
-OS_CFLAGS               += -DIRIX5_3
-endif
-
-ifeq ($(OS_RELEASE),6.2)
-OS_CFLAGS               += -DIRIX6_2
-endif
-
-ifeq ($(OS_RELEASE),6.3)
-OS_CFLAGS               += -DIRIX6_3
-endif
-
-ifndef NO_MDUPDATE
-OS_CFLAGS		+= $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
-else
-OS_CFLAGS		+= $(NOMD_OS_CFLAGS)
-endif
-
-# catch unresolved symbols
-ifeq ($(basename $(OS_RELEASE)),6)
-SHLIB_LD_OPTS = -no_unresolved
-ifeq ($(USE_N32),1)
-SHLIB_LD_OPTS		+= -n32
-else
-SHLIB_LD_OPTS		+= -32
-endif
-endif
-
-MKSHLIB			= $(LD) $(SHLIB_LD_OPTS) -rdata_shared -shared -soname $(@:$(OBJDIR)/%.so=%.so)
-
-HAVE_PURIFY		= 1
-
-DSO_LDOPTS		= -elf -shared -all
-
-ifdef DSO_BACKEND
-DSO_LDOPTS		+= -soname $(DSO_NAME)
-endif
deleted file mode 100644
--- a/config/Linux.mk
+++ /dev/null
@@ -1,104 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-######################################################################
-# Config stuff for Linux (all architectures)
-######################################################################
-
-######################################################################
-# Version-independent
-######################################################################
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-#
-# The default implementation strategy for Linux is classic nspr.
-#
-ifeq ($(USE_PTHREADS),1)
-IMPL_STRATEGY = _PTH
-DEFINES			+= -D_REENTRANT
-else
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-endif
-
-ifeq (86,$(findstring 86,$(OS_TEST)))
-CPU_ARCH		:= x86
-else
-CPU_ARCH		:= $(OS_TEST)
-CPU_ARCH_TAG		= _$(CPU_ARCH)
-endif
-
-CC			= gcc
-CCC			= g++
-RANLIB			= ranlib
-
-OS_INCLUDES		=
-G++INCLUDES		= -I/usr/include/g++
-
-PLATFORM_FLAGS		= -ansi -Wall -pipe -DLINUX -Dlinux
-PORT_FLAGS		= -D_POSIX_SOURCE -D_BSD_SOURCE -DHAVE_STRERROR
-
-OS_CFLAGS		= $(DSO_CFLAGS) $(PLATFORM_FLAGS) $(PORT_FLAGS)
-
-######################################################################
-# Version-specific stuff
-######################################################################
-
-ifeq ($(CPU_ARCH),alpha)
-PLATFORM_FLAGS		+= -D_ALPHA_ -D__alpha -mieee
-PORT_FLAGS		+= -D_XOPEN_SOURCE
-endif
-ifeq ($(CPU_ARCH),ppc)
-PLATFORM_FLAGS		+= -DMKLINUX
-OS_INCLUDES		+= -I/usr/local/include
-endif
-ifeq ($(CPU_ARCH),x86)
-PLATFORM_FLAGS		+= -mno-486 -Di386
-PORT_FLAGS		+= -D_XOPEN_SOURCE
-endif
-ifeq ($(CPU_ARCH),m68k)
-#
-# gcc on Linux/m68k either has a bug or triggers a code-sequence
-# bug in the 68060 which causes gcc to crash.  The simplest way to
-# avoid this is to enable a minimum level of optimization.
-#
-ifndef BUILD_OPT
-OPTIMIZER		+= -O
-endif
-PLATFORM_FLAGS		+= -m68020-40
-endif
-
-#
-# Linux ppc and 2.0 have shared libraries.
-#
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS) -soname $(@:$(OBJDIR)/%.so=%.so)
-ifdef BUILD_OPT
-OPTIMIZER		= -O2
-endif
-
-######################################################################
-# Overrides for defaults in config.mk (or wherever)
-######################################################################
-
-######################################################################
-# Other
-######################################################################
-
-DSO_CFLAGS		= -fPIC
-DSO_LDOPTS		= -shared
-DSO_LDFLAGS		=
deleted file mode 100644
--- a/config/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-#! gmake
-
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-MOD_DEPTH	= ..
-
-include $(MOD_DEPTH)/config/config.mk
-
-CSRCS	= nsinstall.c pathsub.c
-
-PLSRCS	= nfspwd.pl
-
-ifneq ($(OS_ARCH),WINNT)
-PROGRAM	= $(OBJDIR)/nsinstall
-TARGETS = $(PROGRAM) $(PLSRCS:.pl=)
-endif
-
-include $(MOD_DEPTH)/config/rules.mk
-
-# Redefine MAKE_OBJDIR for just this directory
-define MAKE_OBJDIR
-if test ! -d $(@D); then rm -rf $(@D); mkdir $(@D); fi
-endef
-
-export:: $(TARGETS)
deleted file mode 100644
--- a/config/NCR.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for NCR SVR4 MP-RAS
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-###
-NS_USE_NATIVE = 1
-
-# NS_USE_GCC = 1
-
-export PATH:=$(PATH):/opt/ncc/bin
-###
-
-RANLIB          = true
-GCC_FLAGS_EXTRA = -pipe
-
-DEFINES		+= -DSVR4 -DSYSV -DHAVE_STRERROR -DNCR -D_PR_LOCAL_THREADS_ONLY
-
-ifdef NS_USE_NATIVE
-CC              = cc
-CCC             = ncc
-OS_CFLAGS	= -Hnocopyr
-#OS_LIBS         = -L/opt/ncc/lib 
-else
-#OS_LIBS		=
-endif
-
-CCC	= g++
-
-#OS_LIBS	       += -lsocket -lnsl -ldl -lc
-
-MKSHLIB		= $(LD) $(DSO_LDOPTS)
-#DSO_LDOPTS	= -G -z defs
-DSO_LDOPTS	= -G
-
-CPU_ARCH	= x86
-ARCH		= ncr
-
-NOSUCHFILE	= /no-such-file
-
-# now take care of default GCC (rus@5/5/97)
- 
-ifdef NS_USE_GCC
-# if gcc-settings are redefined already - don't touch it
-#
-ifeq (,$(findstring gcc, $(CC)))
-CC      = gcc
-CCC     = g++
-CXX     = g++
-COMPILER_TAG = _gcc
-# always use -fPIC - some makefiles are still broken and don't distinguish
-# situation when they build shared and static libraries
-CFLAGS  += -fPIC -Wall $(GCC_FLAGS_EXTRA)
-#OS_LIBS += -L/usr/local/lib -lstdc++ -lg++ -lgcc
-endif
-endif
-###
-
deleted file mode 100644
--- a/config/NEC.mk
+++ /dev/null
@@ -1,45 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for NEC Mips SYSV
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CPU_ARCH		= mips
-
-ifdef NS_USE_GCC
-CC			= gcc
-CCC			= g++
-else
-CC			= $(NSDEPTH)/build/hcc -Xa -KGnum=0 -KOlimit=4000
-CCC			= g++
-endif
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-RANLIB			= /bin/true
-
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-OS_CFLAGS		= $(ODD_CFLAGS) -DSVR4 -D__SVR4 -DNEC -Dnec_ews -DHAVE_STRERROR
-OS_LIBS			= -lsocket -lnsl -ldl $(LDOPTIONS)
-LDOPTIONS		= -lc -L/usr/ucblib -lucb
-
-NOSUCHFILE		= /no-such-file
-
-DSO_LDOPTS		= -G
deleted file mode 100644
--- a/config/NEWS-OS.mk
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-######################################################################
-# Config stuff for Sony NEWS-OS
-######################################################################
- 
-######################################################################
-# Version-independent
-######################################################################
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-ARCH			:= sony
-CPU_ARCH		:= mips
- 
-CC			= cc
-CCC			= CC
-RANLIB			= /bin/true
-
-OS_INCLUDES		= -I/usr/include
-G++INCLUDES		=
-#OS_LIBS			= -lsocket -lnsl -lgen -lresolv
-
-PLATFORM_FLAGS		= -Xa -fullwarn -DSONY
-PORT_FLAGS		= -DSYSV -DSVR4 -D__svr4 -D__svr4__ -D_PR_LOCAL_THREADS_ONLY -DHAVE_SVID_GETTOD
-
-OS_CFLAGS		= $(PLATFORM_FLAGS) $(PORT_FLAGS)
-
-######################################################################
-# Version-specific stuff
-######################################################################
-
-######################################################################
-# Overrides for defaults in config.mk (or wherever)
-######################################################################
-
-######################################################################
-# Other
-######################################################################
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
- 
-DSO_LDOPTS		= -G
-DSO_LDFLAGS		=
deleted file mode 100644
--- a/config/NetBSD.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for NetBSD
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CC			= gcc
-CCC			= g++
-RANLIB			= ranlib
-
-OS_REL_CFLAGS		=
-ifeq (86,$(findstring 86,$(OS_TEST)))
-CPU_ARCH		= x86
-else
-CPU_ARCH		= $(OS_TEST)
-endif
-
-OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DNETBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
-
-ifeq ($(USE_PTHREADS),1)
-OS_LIBS			= -lc_r
-# XXX probably should define _THREAD_SAFE too.
-else
-OS_LIBS			= -lc
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-endif
-
-ARCH			= netbsd
-
-DSO_CFLAGS		= -fPIC
-DSO_LDFLAGS		=
-DSO_LDOPTS		= -Bshareable
-ifeq ($(OS_TEST),alpha)
-DSO_LDOPTS		= -shared
-endif
-ifeq ($(OS_TEST),mips)
-DSO_LDOPTS		= -shared
-endif
-ifeq ($(OS_TEST),pmax)  
-DSO_LDOPTS		= -shared
-endif
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-G++INCLUDES		= -I/usr/include/g++
deleted file mode 100644
--- a/config/OS2.mk
+++ /dev/null
@@ -1,87 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Configuration common to all (supported) versions of OS/2
-#
-# OS_CFLAGS is the command line options for the compiler when
-#   building the .DLL object files.
-# OS_EXE_CFLAGS is the command line options for the compiler
-#   when building the .EXE object files; this is for the test
-#   programs.
-# the macro OS_CFLAGS is set to OS_EXE_CFLAGS inside of the
-#   makefile for the pr/tests directory. ... Hack.
-
-
-#
-# On OS/2 we proudly support gbash...
-#
-SHELL = GBASH.EXE
-
-CC			= icc -q -DXP_OS2 -N10
-CCC			= icc -q -DXP_OS2 -DOS2=4 -N10
-LINK			= flipper ilink
-AR			= flipper ilibo //noignorecase //nologo $@
-RANLIB = echo
-BSDECHO = echo
-NSINSTALL = nsinstall
-INSTALL	= $(NSINSTALL)
-MAKE_OBJDIR = mkdir $(OBJDIR)
-IMPLIB = flipper implib -nologo -noignorecase
-FILTER = flipper cppfilt -q
-RC = rc.exe
-
-GARBAGE =
-
-XP_DEFINE = -DXP_PC
-OBJ_SUFFIX = obj
-LIB_SUFFIX = lib
-DLL_SUFFIX = dll
-
-OS_CFLAGS     = -I. -W3 -gm -gd+ -sd- -su4 -ge-
-OS_EXE_CFLAGS = -I. -W3 -gm -gd+ -sd- -su4 
-AR_EXTRA_ARGS = ,,
-
-ifdef BUILD_OPT
-OPTIMIZER	= -O+ -Oi 
-DEFINES = -UDEBUG -U_DEBUG -DNDEBUG
-DLLFLAGS	= -DLL -OUT:$@ -MAP:$(@:.dll=.map)
-OBJDIR_TAG = _OPT
-else
-OPTIMIZER	= -Ti+
-DEFINES = -DDEBUG -D_DEBUG -UNDEBUG
-DLLFLAGS	= -DEBUG -DLL -OUT:$@ -MAP:$(@:.dll=.map)
-OBJDIR_TAG = _DBG
-LDFLAGS = -DEBUG 
-endif
-
-DEFINES += -DOS2=4 -DBSD_SELECT
-DEFINES += -D_X86_
-DEFINES += -D_PR_GLOBAL_THREADS_ONLY
-
-# Name of the binary code directories
-ifeq ($(CPU_ARCH),x86)
-ifdef MOZ_LITE
-OBJDIR_NAME = $(subst OS2,NAV,$(OS_CONFIG))$(OBJDIR_TAG).OBJ
-else
-OBJDIR_NAME = $(OS_CONFIG)$(OBJDIR_TAG).OBJ
-endif
-else
-OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH)$(OBJDIR_TAG).OBJ
-endif
-
-OS_DLLFLAGS = -nologo -DLL -FREE -NOE
deleted file mode 100644
--- a/config/OSF1.mk
+++ /dev/null
@@ -1,95 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for DEC OSF/1
-#
-
-#
-# The Bourne shell (sh) on OSF1 doesn't handle "set -e" correctly,
-# which we use to stop LOOP_OVER_DIRS submakes as soon as any
-# submake fails.  So we use the Korn shell instead.
-#
-SHELL			= /usr/bin/ksh
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-ifneq ($(USE_PTHREADS),1)
-CLASSIC_NSPR = 1
-endif
-endif
-
-#
-# On OSF1 V3.2, classic nspr is the default (and only) implementation
-# strategy.
-#
-# On OSF1 V4.0, pthreads is the default implementation strategy.
-# Classic nspr is also available.
-#
-ifneq ($(OS_RELEASE),V3.2)
-USE_PTHREADS = 1
-ifeq ($(CLASSIC_NSPR), 1)
-	USE_PTHREADS =
-	IMPL_STRATEGY := _CLASSIC
-	DEFINES += -D_PR_LOCAL_THREADS_ONLY
-endif
-endif
-
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-IMPL_STRATEGY =
-endif
-
-CC			= cc $(NON_LD_FLAGS) -std1 -readonly_strings
-# The C++ compiler cxx has -readonly_strings on by default.
-CCC			= cxx
-
-RANLIB			= /bin/true
-
-CPU_ARCH		= alpha
-
-ifdef BUILD_OPT
-OPTIMIZER		+= -Olimit 4000
-endif
-
-NON_LD_FLAGS		= -ieee_with_inexact
-
-OS_CFLAGS		= -DOSF1 -D_REENTRANT -taso
-
-ifeq ($(OS_RELEASE),V3.2)
-OS_CFLAGS		+= -DOSF1V3
-endif
-
-ifeq (V4,$(findstring V4,$(OS_RELEASE)))
-OS_CFLAGS		+= -DOSF1V4
-endif
-
-ifeq ($(USE_PTHREADS),1)
-OS_CFLAGS		+= -pthread
-endif
-
-# The command to build a shared library on OSF1.
-MKSHLIB = ld -shared -all -expect_unresolved "*"
-DSO_LDOPTS		= -shared
deleted file mode 100644
--- a/config/Rhapsody.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for Rhapsody
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CC			= cc
-ifeq ($(OS_RELEASE),5.0)
-CCC			= cc++
-else
-CCC			= c++
-endif
-RANLIB			= ranlib
-
-OS_REL_CFLAGS		= -Dppc
-CPU_ARCH		= ppc
-
-#OS_REL_CFLAGS		= -mno-486 -Di386
-#CPU_ARCH		= x86
-
-# "Commons" are tentative definitions in a global scope, like this:
-#     int x;
-# The meaning of a common is ambiguous.  It may be a true definition:
-#     int x = 0;
-# or it may be a declaration of a symbol defined in another file:
-#     extern int x;
-# Use the -fno-common option to force all commons to become true
-# definitions so that the linker can catch multiply-defined symbols.
-# Also, common symbols are not allowed with Rhapsody dynamic libraries.
-
-OS_CFLAGS		= $(DSO_CFLAGS) $(OS_REL_CFLAGS) -Wmost -fno-common -pipe -DRHAPSODY -DHAVE_STRERROR -DHAVE_BSD_FLOCK
-
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY -D_PR_NEED_FAKE_POLL
-
-ARCH			= rhapsody
-
-# May override this with -bundle to create a loadable module.
-DSO_LDOPTS		= -dynamiclib
-
-MKSHLIB			= $(CC) -arch $(CPU_ARCH) $(DSO_LDOPTS)
-DLL_SUFFIX		= dylib
-
-#G++INCLUDES		= -I/usr/include/g++
deleted file mode 100644
--- a/config/SCOOS.mk
+++ /dev/null
@@ -1,75 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SCO OpenServer for x86.
-# SCO OpenServer 5, based on SVR3.2, is intended for small to
-# medium customers.
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CC			= cc -b elf -KPIC
-CCC			= g++ -b elf -I/usr/local/lib/g++-include
-# CCC			= $(DEPTH)/build/hcpp +.cpp +w
-RANLIB			= /bin/true
-
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-#
-# -DSCO - Changes to Netscape source (consistent with AIX, LINUX, etc..)
-# -Dsco - Needed for /usr/include/X11/*
-#
-OS_CFLAGS		= -DSYSV -D_SVID3 -DHAVE_STRERROR -D_PR_NEED_H_ERRNO -DSCO -Dsco
-#OS_LIBS			= -lpmapi -lsocket -lc
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-XINC			= /usr/include/X11
-MOTIFLIB		= -lXm
-INCLUDES		+= -I$(XINC)
-
-CPU_ARCH		= x86
-GFX_ARCH		= x
-ARCH			= sco
-
-LOCALE_MAP		= $(DEPTH)/cmd/xfe/intl/sco.lm
-EN_LOCALE		= C
-DE_LOCALE		= de_DE.ISO8859-1
-FR_LOCALE		= fr_FR.ISO8859-1
-JP_LOCALE		= ja
-SJIS_LOCALE		= ja_JP.SJIS
-KR_LOCALE		= ko_KR.EUC
-CN_LOCALE		= zh
-TW_LOCALE		= zh
-I2_LOCALE		= i2
-
-LOC_LIB_DIR		= /usr/lib/X11
-
-NOSUCHFILE		= /no-such-file
-
-BSDECHO			= /bin/echo
-
-#
-# These defines are for building unix plugins
-#
-BUILD_UNIX_PLUGINS	= 1
-#DSO_LDOPTS		= -b elf -G -z defs
-DSO_LDOPTS		= -b elf -G
-DSO_LDFLAGS		= -nostdlib -L/lib -L/usr/lib -lXm -lXt -lX11 -lgen
-
-# Used for Java compiler
-EXPORT_FLAGS = -W l,-Bexport
deleted file mode 100644
--- a/config/SINIX.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SNI SINIX (aka ReliantUNIX)
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-# use gcc -tf-
-NS_USE_GCC		= 1
-
-ifeq ($(NS_USE_GCC),1)
-## gcc-2.7.2 homebrewn
-CC			= gcc
-COMPILER_TAG		= _gcc
-CCC			= g++
-AS			= $(CC) -x assembler-with-cpp
-LD			= gld
-ODD_CFLAGS		= -pipe -Wall -Wno-format
-ifdef BUILD_OPT
-OPTIMIZER		= -O
-#OPTIMIZER		= -O6
-endif
-MKSHLIB			= $(LD) -G -z defs -h $(@:$(OBJDIR)/%.so=%.so)
-#DSO_LDOPTS		= -G -Xlinker -Blargedynsym
-else
-## native compiler (CDS++ 1.0)
-CC			= /usr/bin/cc
-CCC			= /usr/bin/CC
-AS			= /usr/bin/cc
-#ODD_CFLAGS		= -fullwarn -xansi
-ODD_CFLAGS		= 
-ifdef BUILD_OPT
-#OPTIMIZER		= -Olimit 4000
-OPTIMIZER		= -O -F Olimit,4000
-endif
-MKSHLIB			= $(LD) -G -z defs -h $(@:$(OBJDIR)/%.so=%.so)
-#DSO_LDOPTS		= -G -W l,-Blargedynsym
-endif
-
-ODD_CFLAGS		+= -DSVR4 -DSNI -DRELIANTUNIX -Dsinix -DHAVE_SVID_GETTOD
-
-# On SINIX 5.43, need to define IP_MULTICAST in order to get the
-# IP multicast macro and struct definitions in netinet/in.h.
-# (SINIX 5.42 does not have IP multicast at all.)
-ifeq ($(OS_RELEASE),5.43)
-ODD_CFLAGS		+= -DIP_MULTICAST
-endif
-
-CPU_ARCH		= mips
-
-RANLIB			= /bin/true
-
-# For purify
-NOMD_OS_CFLAGS		= $(ODD_CFLAGS)
-
-# we do not have -MDupdate ...
-OS_CFLAGS		= $(NOMD_OS_CFLAGS)
-OS_LIBS			= -lsocket -lnsl -lresolv -ldl -lc
-NOSUCHFILE		= /no-such-file
-
-HAVE_PURIFY		= 0
-
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
deleted file mode 100644
--- a/config/SunOS.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SunOS.
-# 4 and 5 are vastly different, so we use 2 different files.
-#
-ifeq ($(basename $(OS_RELEASE)),4.1)
-include $(MOD_DEPTH)/config/SunOS4.mk
-else
-include $(MOD_DEPTH)/config/SunOS5.mk
-endif
deleted file mode 100644
--- a/config/SunOS4.mk
+++ /dev/null
@@ -1,48 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SunOS4.1
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-# SunOS 4 _requires_ that shared libs have a version number.
-# XXX FIXME: Version number should use NSPR_VERSION_NUMBER?
-DLL_SUFFIX	= so.1.0
-
-CC			= gcc
-COMPILER_TAG		= _gcc
-
-RANLIB			= ranlib
-
-CPU_ARCH		= sparc
-
-DEFINES			+= -D_PR_LOCAL_THREADS_ONLY
-# Purify doesn't like -MDupdate
-NOMD_OS_CFLAGS		= -Wall -Wno-format -DSUNOS4
-OS_CFLAGS		= $(DSO_CFLAGS) $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-HAVE_PURIFY		= 1
-
-NOSUCHFILE		= /no-such-file
-
-DSO_LDOPTS		=
-# -fPIC generates position-independent code for use in a shared library.
-DSO_CFLAGS		= -fPIC
deleted file mode 100644
--- a/config/SunOS5.mk
+++ /dev/null
@@ -1,166 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SunOS 5.x on sparc and x86
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-LOCAL_THREADS_ONLY = 1
-ifndef NS_USE_NATIVE
-NS_USE_GCC = 1
-endif
-endif
-
-#
-# The default implementation strategy on Solaris is global threads only.
-# Local threads only and pthreads are also available.
-#
-ifeq ($(USE_PTHREADS),1)
-  IMPL_STRATEGY = _PTH
-else
-  ifeq ($(LOCAL_THREADS_ONLY),1)
-    IMPL_STRATEGY = _LOCAL
-    DEFINES += -D_PR_LOCAL_THREADS_ONLY
-  else
-    DEFINES += -D_PR_GLOBAL_THREADS_ONLY
-  endif
-endif
-
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-IMPL_STRATEGY =
-endif
-
-ifdef NS_USE_GCC
-CC			= gcc -Wall
-CCC			= g++ -Wall
-#
-# XXX
-# Temporary define for the Client; to be removed when binary release is used
-#
-ifdef MOZILLA_CLIENT
-#COMPILER_TAG		= _gcc
-else
-COMPILER_TAG		= _gcc
-endif
-#ASFLAGS			+= -x assembler-with-cpp
-ifdef NO_MDUPDATE
-OS_CFLAGS		= $(NOMD_OS_CFLAGS)
-else
-OS_CFLAGS		= $(NOMD_OS_CFLAGS) -MDupdate $(DEPENDENCIES)
-endif
-else
-CC			= cc -xstrconst
-CCC			= CC -Qoption cg -xstrconst
-ASFLAGS			+= -Wa,-P
-OS_CFLAGS		= $(NOMD_OS_CFLAGS)
-#
-# If we are building for a release, we want to put all symbol
-# tables in the debug executable or share library instead of
-# the .o files, so that our clients can run dbx on the debug
-# library without having the .o files around.
-#
-ifdef BUILD_NUMBER
-ifndef BUILD_OPT
-OS_CFLAGS		+= -xs
-endif
-endif
-endif
-
-RANLIB			= echo
-
-OS_DEFINES		= -DSVR4 -DSYSV -D__svr4 -D__svr4__ -DSOLARIS
-
-ifeq ($(OS_TEST),i86pc)
-CPU_ARCH		= x86
-CPU_ARCH_TAG		= _i86pc
-OS_DEFINES		+= -Di386
-# The default debug format, DWARF (-g), is not supported by gcc
-# on i386-ANY-sysv4/solaris, but the stabs format is.  It is
-# assumed that the Solaris assembler /usr/ccs/bin/as is used.
-# If your gcc uses GNU as, you do not need the -Wa,-s option.
-ifndef BUILD_OPT
-ifdef NS_USE_GCC
-OPTIMIZER		= -Wa,-s -gstabs
-endif
-endif
-else
-CPU_ARCH		= sparc
-endif
-
-ifeq (5.5,$(findstring 5.5,$(OS_RELEASE)))
-OS_DEFINES		+= -DSOLARIS2_5
-endif
-
-ifneq ($(LOCAL_THREADS_ONLY),1)
-OS_DEFINES		+= -D_REENTRANT
-endif
-
-# Purify doesn't like -MDupdate
-NOMD_OS_CFLAGS		= $(DSO_CFLAGS) $(OS_DEFINES) $(SOL_CFLAGS)
-
-MKSHLIB			= $(LD) $(DSO_LDOPTS)
-
-# ld options:
-# -G: produce a shared object
-# -z defs: no unresolved symbols allowed
-DSO_LDOPTS		= -G
-
-# -KPIC generates position independent code for use in shared libraries.
-# (Similarly for -fPIC in case of gcc.)
-ifdef NS_USE_GCC
-DSO_CFLAGS		= -fPIC
-else
-DSO_CFLAGS		= -KPIC
-endif
-
-HAVE_PURIFY		= 1
-
-NOSUCHFILE		= /no-such-file
-
-#
-# Library of atomic functions for UltraSparc systems
-#
-# The nspr makefiles build ULTRASPARC_LIBRARY (which contains assembly language
-# implementation of the nspr atomic functions for UltraSparc systems) in addition
-# to libnspr.so. (The actual name of the library is
-# lib$(ULTRASPARC_LIBRARY)$(MOD_VERSION).so
-#
-# The actual name of the filter-library, recorded in libnspr.so, is set to the
-# value of $(ULTRASPARC_FILTER_LIBRARY).
-# For an application to use the assembly-language implementation, a link should be
-# made so that opening ULTRASPARC_FILTER_LIBRARY results in opening
-# ULTRASPARC_LIBRARY. This indirection requires the user to explicitly set up
-# library for use on UltraSparc systems, thereby helping to avoid using it by
-# accident on non-UltraSparc systems.
-# The directory containing the ultrasparc libraries should be in LD_LIBRARY_PATH.
-#
-ifeq ($(OS_TEST),sun4u)
-ULTRASPARC_LIBRARY = ultrasparc
-ULTRASPARC_FILTER_LIBRARY = libatomic.so
-DSO_LDOPTS		+= -f $(ULTRASPARC_FILTER_LIBRARY)
-endif
deleted file mode 100644
--- a/config/UNIX.mk
+++ /dev/null
@@ -1,70 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-XP_DEFINE	= -DXP_UNIX
-OBJ_SUFFIX	= o
-LIB_SUFFIX	= a
-DLL_SUFFIX	= so
-AR		= ar cr $@
-
-ifdef BUILD_OPT
-OPTIMIZER	= -O
-DEFINES		= -UDEBUG -DNDEBUG
-OBJDIR_TAG	= _OPT
-else
-OPTIMIZER	= -g
-DEFINES		= -DDEBUG -UNDEBUG -DDEBUG_$(shell whoami)
-OBJDIR_TAG	= _DBG
-endif
-
-# Name of the binary code directories
-OBJDIR_NAME	= $(OS_CONFIG)$(CPU_ARCH_TAG)$(COMPILER_TAG)$(IMPL_STRATEGY)$(OBJDIR_TAG).OBJ
-
-MKDEPEND_DIR    = $(DEPTH)/config/mkdepend
-MKDEPEND 	= $(MKDEPEND_DIR)/$(OBJDIR_NAME)/mkdepend
-MKDEPENDENCIES  = $(OBJDIR)/depend.mk
-
-####################################################################
-#
-# One can define the makefile variable NSDISTMODE to control
-# how files are published to the 'dist' directory.  If not
-# defined, the default is "install using relative symbolic
-# links".  The two possible values are "copy", which copies files
-# but preserves source mtime, and "absolute_symlink", which
-# installs using absolute symbolic links.  The "absolute_symlink"
-# option requires NFSPWD.
-#
-####################################################################
-
-NSINSTALL	= $(MOD_DEPTH)/config/$(OBJDIR_NAME)/nsinstall
-
-ifeq ($(NSDISTMODE),copy)
-# copy files, but preserve source mtime
-INSTALL		= $(NSINSTALL) -t
-else
-ifeq ($(NSDISTMODE),absolute_symlink)
-# install using absolute symbolic links
-INSTALL		= $(NSINSTALL) -L `$(NFSPWD)`
-else
-# install using relative symbolic links
-INSTALL		= $(NSINSTALL) -R
-endif
-endif
-
-define MAKE_OBJDIR
-if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
-endef
deleted file mode 100644
--- a/config/UNIXWARE.mk
+++ /dev/null
@@ -1,44 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for SCO UnixWare
-# UnixWare is intended for high-end enterprise customers.
-# UnixWare 2.1 and 2.1.1 are based on SVR4.  (2.1.2 is a maintenance
-# release.)
-# UnixWare 7 (codename Gemini) is based on what SCO calls SVR5.
-# The somewhat odd version number 7 was chosen to suggest that
-#     UnixWare 2 + OpenServer 5 = UnixWare 7
-#
-
-include $(MOD_DEPTH)/config/UNIX.mk
-
-CC		= $(NSDEPTH)/build/hcc
-CCC		= $(NSDEPTH)/build/hcpp
-
-RANLIB		= true
-
-DEFINES		+= -D_PR_LOCAL_THREADS_ONLY
-OS_CFLAGS	= -DSVR4 -DSYSV -DUNIXWARE
-
-MKSHLIB		= $(LD) $(DSO_LDOPTS)
-DSO_LDOPTS	= -G
-
-CPU_ARCH	= x86
-ARCH		= sco
-
-NOSUCHFILE	= /no-such-file
deleted file mode 100644
--- a/config/WIN32.mk
+++ /dev/null
@@ -1,166 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Configuration common to all versions of Windows NT
-# and Windows 95.
-#
-
-#
-# Client build: make sure we use the shmsdos.exe under $(MOZ_TOOLS).
-# $(MOZ_TOOLS_FLIPPED) is $(MOZ_TOOLS) with all the backslashes
-# flipped, so that gmake won't interpret them as escape characters.
-#
-ifdef PR_CLIENT_BUILD_WINDOWS
-SHELL = $(MOZ_TOOLS_FLIPPED)/bin/shmsdos.exe
-endif
-
-#
-# On NT, we use static thread local storage by default because it
-# gives us better performance.  However, we can't use static TLS
-# on Alpha NT because the Alpha version of MSVC does not seem to
-# support the -GT flag, which is necessary to make static TLS safe
-# for fibers.
-#
-# On Win95, we use the TlsXXX() functions by default because that
-# allows us to load the NSPR DLL at run time using LoadLibrary().
-#
-ifeq ($(OS_TARGET),WINNT)
-ifneq ($(CPU_ARCH),ALPHA)
-USE_STATIC_TLS = 1
-endif
-endif
-
-CC = cl
-CCC = cl
-LINK = link
-AR = lib -NOLOGO -OUT:"$@"
-RANLIB = echo
-BSDECHO = echo
-NSINSTALL = nsinstall
-INSTALL	= $(NSINSTALL)
-define MAKE_OBJDIR
-if test ! -d $(@D); then rm -rf $(@D); $(NSINSTALL) -D $(@D); fi
-endef
-RC = rc.exe
-
-GARBAGE = $(OBJDIR)/vc20.pdb $(OBJDIR)/vc40.pdb
-
-XP_DEFINE = -DXP_PC
-OBJ_SUFFIX = obj
-LIB_SUFFIX = lib
-DLL_SUFFIX = dll
-
-OS_CFLAGS = -W3 -nologo -GF -Gy
-
-ifdef BUILD_OPT
-OS_CFLAGS += -MD
-OPTIMIZER = -O2
-DEFINES = -UDEBUG -U_DEBUG -DNDEBUG
-DLLFLAGS = -OUT:"$@"
-OBJDIR_TAG = _OPT
-
-# Add symbolic information for use by a profiler
-ifdef MOZ_PROF
-OPTIMIZER += -Z7
-DLLFLAGS += -DEBUG -DEBUGTYPE:CV
-LDFLAGS += -DEBUG -DEBUGTYPE:CV
-endif
-
-else
-#
-# Define USE_DEBUG_RTL if you want to use the debug runtime library
-# (RTL) in the debug build
-#
-ifdef USE_DEBUG_RTL
-OS_CFLAGS += -MDd
-else
-OS_CFLAGS += -MD
-endif
-OPTIMIZER = -Od -Z7
-#OPTIMIZER = -Zi -Fd$(OBJDIR)/ -Od
-DEFINES = -DDEBUG -D_DEBUG -UNDEBUG
-
-DLLFLAGS = -DEBUG -DEBUGTYPE:CV -OUT:"$@"
-ifeq ($(MOZ_BITS),32)
-ifdef GLOWCODE
-ifdef MOZ_DEBUG
-DLLFLAGS = -DEBUG -DEBUGTYPE:both -INCLUDE:_GlowCode -OUT:"$@"
-endif
-endif
-endif
-
-OBJDIR_TAG = _DBG
-LDFLAGS = -DEBUG -DEBUGTYPE:CV
-endif
-
-DEFINES += -DWIN32
-ifeq ($(USE_STATIC_TLS),1)
-DEFINES += -D_PR_USE_STATIC_TLS
-endif
-
-#
-# NSPR uses fibers on NT.  Therefore, if we use static local
-# storage (i.e., __declspec(thread) variables), we need the -GT
-# flag to turn off certain compiler optimizations so that fibers
-# can use static TLS safely.
-#
-# Also, we optimize for Pentium (-G5) on NT.
-#
-ifeq ($(OS_TARGET),WINNT)
-ifeq ($(USE_STATIC_TLS),1)
-OS_CFLAGS += -GT
-endif
-ifeq ($(CPU_ARCH),x86)
-OS_CFLAGS += -G5
-endif
-DEFINES += -DWINNT
-else
-DEFINES += -DWIN95 -D_PR_GLOBAL_THREADS_ONLY
-endif
-
-ifeq ($(CPU_ARCH),x86)
-DEFINES += -D_X86_
-else
-ifeq ($(CPU_ARCH),MIPS)
-DEFINES += -D_MIPS_
-else
-ifeq ($(CPU_ARCH),ALPHA)
-DEFINES += -D_ALPHA_=1
-else
-CPU_ARCH = processor_is_undefined
-endif
-endif
-endif
-
-# Name of the binary code directories
-
-ifeq ($(CPU_ARCH),x86)
-CPU_ARCH_TAG =
-else
-CPU_ARCH_TAG = $(CPU_ARCH)
-endif
-
-ifdef USE_DEBUG_RTL
-OBJDIR_SUFFIX = OBJD
-else
-OBJDIR_SUFFIX = OBJ
-endif
-
-OBJDIR_NAME = $(OS_CONFIG)$(CPU_ARCH_TAG)$(OBJDIR_TAG).$(OBJDIR_SUFFIX)
-
-OS_DLLFLAGS = -nologo -DLL -SUBSYSTEM:WINDOWS -PDB:NONE
deleted file mode 100644
--- a/config/WIN95.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for WIN95
-#
-
-include $(MOD_DEPTH)/config/WIN32.mk
deleted file mode 100644
--- a/config/WINNT.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# Config stuff for WINNT
-#
-
-include $(MOD_DEPTH)/config/WIN32.mk
deleted file mode 100644
--- a/config/arch.mk
+++ /dev/null
@@ -1,203 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#######################################################################
-# Master "Core Components" macros for getting the OS architecture     #
-#######################################################################
-
-#
-# Important internal static macros
-#
-
-OS_ARCH		:= $(subst /,_,$(shell uname -s))
-OS_RELEASE	:= $(shell uname -r)
-OS_TEST		:= $(shell uname -m)
-
-#
-# Tweak the default OS_ARCH and OS_RELEASE macros as needed.
-#
-ifeq ($(OS_ARCH),AIX)
-OS_RELEASE	:= $(shell uname -v).$(shell uname -r)
-endif
-ifeq ($(OS_ARCH),BSD_386)
-OS_ARCH		:= BSD_OS
-endif
-ifeq ($(OS_ARCH),IRIX64)
-OS_ARCH		:= IRIX
-endif
-ifeq ($(OS_ARCH),UNIX_SV)
-ifneq ($(findstring NCR,$(shell grep NCR /etc/bcheckrc | head -1 )),)
-OS_ARCH		:= NCR
-else
-OS_ARCH		:= UNIXWARE
-OS_RELEASE	:= $(shell uname -v)
-endif
-endif
-ifeq ($(OS_ARCH),ncr)
-OS_ARCH		:= NCR
-endif
-# This is the only way to correctly determine the actual OS version on NCR boxes.
-ifeq ($(OS_ARCH),NCR)
-OS_RELEASE	:= $(shell awk '{print $$3}' /etc/.relid | sed 's/^\([0-9]\)\(.\)\(..\)\(.*\)$$/\2.\3/')
-endif
-ifeq ($(OS_ARCH),UNIX_System_V)
-OS_ARCH		:= NEC
-endif
-ifeq ($(OS_ARCH),SCO_SV)
-OS_ARCH		:= SCOOS
-OS_RELEASE	:= 5.0
-endif
-ifeq ($(OS_ARCH),SINIX-N)
-OS_ARCH		:= SINIX
-endif
-ifeq ($(OS_ARCH),SINIX-Y)
-OS_ARCH		:= SINIX
-endif
-# SINIX changes name to ReliantUNIX with 5.43
-ifeq ($(OS_ARCH),ReliantUNIX-N)
-OS_ARCH		:= SINIX
-endif
-ifeq ($(OS_ARCH),UnixWare)
-OS_ARCH		:= UNIXWARE
-OS_RELEASE	:= $(shell uname -v)
-endif
-
-#
-# Handle FreeBSD 2.2-STABLE and Linux 2.0.30-osfmach3
-#
-
-ifeq (,$(filter-out Linux FreeBSD,$(OS_ARCH)))
-OS_RELEASE	:= $(shell echo $(OS_RELEASE) | sed 's/-.*//')
-endif
-
-#
-# Distinguish between OSF1 V4.0B and V4.0D
-#
-
-ifeq ($(OS_ARCH)$(OS_RELEASE),OSF1V4.0)
-	OS_VERSION := $(shell uname -v)
-	ifeq ($(OS_VERSION),564)
-		OS_RELEASE := V4.0B
-	endif
-	ifeq ($(OS_VERSION),878)
-		OS_RELEASE := V4.0D
-	endif
-endif
-
-#######################################################################
-# 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
-# the WinNT target uses Windows NT specific features not available
-# in Windows 95. The Win95 target will run on Windows NT, but (supposedly)
-# at lesser performance (the Win95 target uses threads; the WinNT target
-# uses fibers).
-#
-# When OS_TARGET=WIN16 is specified, then a Windows 3.11 (16bit) target
-# is built. See: win16_3.11.mk for lots more about the Win16 target.
-#
-# If OS_TARGET is not specified, it defaults to $(OS_ARCH), i.e., no
-# cross-compilation.
-#
-
-#
-# The following hack allows one to build on a WIN95 machine (as if
-# s/he were cross-compiling on a WINNT host for a WIN95 target).
-# It also accomodates for MKS's uname.exe.  If you never intend
-# to do development on a WIN95 machine, you don't need this hack.
-#
-ifeq ($(OS_ARCH),WIN95)
-	OS_ARCH   := WINNT
-	OS_TARGET := WIN95
-endif
-ifeq ($(OS_ARCH),Windows_95)
-	OS_ARCH   := Windows_NT
-	OS_TARGET := WIN95
-endif
-ifeq ($(OS_ARCH), OS2)
-	OS_ARCH   := WINNT
-	OS_TARGET := OS2
-endif
-
-#
-# On WIN32, we also define the variable CPU_ARCH.
-#
-
-ifeq ($(OS_ARCH), WINNT)
-	CPU_ARCH := $(shell uname -p)
-	ifeq ($(CPU_ARCH),I386)
-		CPU_ARCH = x86
-	endif
-else
-#
-# If uname -s returns "Windows_NT", we assume that we are using
-# the uname.exe in MKS toolkit.
-#
-# The -r option of MKS uname only returns the major version number.
-# So we need to use its -v option to get the minor version number.
-# Moreover, it doesn't have the -p option, so we need to use uname -m.
-#
-ifeq ($(OS_ARCH), Windows_NT)
-	OS_ARCH = WINNT
-	OS_MINOR_RELEASE := $(shell uname -v)
-	ifeq ($(OS_MINOR_RELEASE),00)
-		OS_MINOR_RELEASE = 0
-	endif
-	OS_RELEASE := $(OS_RELEASE).$(OS_MINOR_RELEASE)
-	CPU_ARCH := $(shell uname -m)
-	#
-	# MKS's uname -m returns "586" on a Pentium machine.
-	#
-	ifneq (,$(findstring 86,$(CPU_ARCH)))
-		CPU_ARCH = x86
-	endif
-else
-#
-# If uname -s returns "CYGWIN32/NT", we assume that we are using
-# the uname.exe in the GNU-Win32 tools.
-#
-ifeq ($(OS_ARCH), CYGWIN32_NT)
-	OS_ARCH = WINNT
-	CPU_ARCH := $(shell uname -m)
-	#
-	# GNU-Win32's uname -m returns "i686" on a Pentium Pro machine.
-	#
-	ifneq (,$(findstring 86,$(CPU_ARCH)))
-		CPU_ARCH = x86
-	endif
-endif
-endif
-endif
-
-ifndef OS_TARGET
-	OS_TARGET := $(OS_ARCH)
-endif
-
-ifeq ($(OS_TARGET), WIN95)
-	OS_RELEASE := 4.0
-endif
-
-ifeq ($(OS_TARGET), WIN16)
-	OS_RELEASE :=
-#	OS_RELEASE := _3.11
-endif
-
-OS_CONFIG := $(OS_TARGET)$(OS_RELEASE)
deleted file mode 100644
--- a/config/config.mk
+++ /dev/null
@@ -1,112 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-# Configuration information for building in the NSPR source module
-
-# Define an include-at-most-once-flag
-NSPR_CONFIG_MK	= 1
-
-include $(MOD_DEPTH)/config/module.df
-
-include $(MOD_DEPTH)/config/arch.mk
-
-ifndef NSDEPTH
-NSDEPTH = $(MOD_DEPTH)/..
-endif
-
-#
-# Default command macros; can be overridden in <arch>.mk.
-#
-# XXX FIXME: I removed CCF and LINKEXE.
-AS		= $(CC)
-ASFLAGS		= $(CFLAGS)
-PURIFY		= purify $(PURIFYOPTIONS)
-LINK_DLL	= $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
-NFSPWD		= $(MOD_DEPTH)/config/nfspwd
-
-LIBNSPR		= $(DIST)/lib/libnspr.$(LIB_SUFFIX)
-PURELIBNSPR	= $(DIST)/lib/libpurenspr.$(LIB_SUFFIX)
-
-CFLAGS		= $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
-				$(XCFLAGS)
-# For purify
-NOMD_CFLAGS	= $(OPTIMIZER) $(NOMD_OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
-				$(XCFLAGS)
-
-include $(MOD_DEPTH)/config/$(OS_TARGET).mk
-
-# Figure out where the binary code lives.
-BUILD		= $(OBJDIR_NAME)
-OBJDIR		= $(OBJDIR_NAME)
-DIST		= $(NSDEPTH)/dist/$(OBJDIR_NAME)
-ifeq ($(MOZ_BITS),16)
-MOZ_INCL	= $(NSDEPTH)/dist/public/win16
-MOZ_DIST	= $(NSDEPTH)/dist/WIN16D_D.OBJ
-endif
-
-VPATH		= $(OBJDIR)
-DEPENDENCIES	= $(OBJDIR)/.md
-
-ifdef BUILD_DEBUG_GC
-DEFINES		+= -DDEBUG_GC
-endif
-
-GARBAGE		+= $(DEPENDENCIES) core $(wildcard core.[0-9]*)
-
-####################################################################
-#
-# The NSPR-specific configuration
-#
-####################################################################
-
-OS_CFLAGS += -DFORCE_PR_LOG
-
-ifeq ($(_PR_NO_CLOCK_TIMER),1)
-OS_CFLAGS += -D_PR_NO_CLOCK_TIMER
-endif
-
-ifeq ($(USE_PTHREADS), 1)
-OS_CFLAGS += -D_PR_PTHREADS -UHAVE_CVAR_BUILT_ON_SEM
-endif
-
-ifeq ($(PTHREADS_USER), 1)
-OS_CFLAGS += -DPTHREADS_USER -UHAVE_CVAR_BUILT_ON_SEM
-endif
-
-ifeq ($(USE_IPV6),1)
-OS_CFLAGS += -D_PR_INET6
-endif
-
-####################################################################
-#
-# Configuration for the release process
-#
-####################################################################
-
-MDIST = /m/dist
-ifeq ($(OS_ARCH),WINNT)
-MDIST = //helium/dist
-MDIST_DOS = \\\\helium\\dist
-endif
-
-# RELEASE_DIR is ns/dist/<module name>
-
-RELEASE_DIR = $(NSDEPTH)/dist/release/$(MOD_NAME)
-
-RELEASE_INCLUDE_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/include
-RELEASE_LIB_DIR = $(RELEASE_DIR)/$(BUILD_NUMBER)/$(OBJDIR_NAME)/lib
deleted file mode 100644
--- a/config/libc_r.h
+++ /dev/null
@@ -1,139 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-/* libc_r.h  --  macros, defines, etc. to make using reentrant libc calls */
-/*               a bit easier.  This was initially done for AIX pthreads, */
-/*               but should be usable for anyone...                       */
-
-/* Most of these use locally defined space instead of static library space. */
-/* Because of this, we use the _INIT_R to declare/allocate space (stack),   */
-/* and the plain routines to actually do it..._WARNING_: avoid allocating   */
-/* memory wherever possible.  Memory allocation is fairly expensive, at     */
-/* least on AIX...use arrays instead (which allocate from the stack.)       */
-/* I know the names are a bit strange, but I wanted to be fairly certain    */
-/* that we didn't have any namespace corruption...in general, the inits are */
-/* R_<name>_INIT_R(), and the actual calls are R_<name>_R().                */
-
-#ifndef _LIBC_R_H
-#define _LIBC_R_H
-
-/************/
-/*  strtok  */
-/************/
-#define R_STRTOK_INIT_R() \
-    char *r_strtok_r=NULL
-
-#define R_STRTOK_R(return,source,delim) \     
-    return=strtok_r(source,delim,&r_strtok_r)
-
-#define R_STRTOK_NORET_R(source,delim) \
-    strtok_r(source,delim,&r_strtok_r)
-
-/**************/
-/*  strerror  */
-/**************/
-#define R_MAX_STRERROR_LEN_R 8192     /* Straight from limits.h */
-
-#define R_STRERROR_INIT_R() \
-    char r_strerror_r[R_MAX_STRERROR_LEN_R]
-
-#define R_STRERROR_R(val) \
-    strerror_r(val,r_strerror_r,R_MAX_STRERROR_LEN_R)
-
-/*****************/
-/*  time things  */
-/*****************/
-#define R_ASCTIME_INIT_R() \
-    char r_asctime_r[26]
-
-#define R_ASCTIME_R(val) \
-    asctime_r(val,r_asctime_r)
-
-#define R_CTIME_INIT_R() \
-    char r_ctime_r[26]
-
-#define R_CTIME_R(val) \
-    ctime_r(val,r_ctime_r)
-
-#define R_GMTIME_INIT_R() \
-    struct tm r_gmtime_r
-
-#define R_GMTIME_R(time) \
-    gmtime_r(time,&r_gmtime_r)
-
-#define R_LOCALTIME_INIT_R() \
-   struct tm r_localtime_r
-
-#define R_LOCALTIME_R(val) \
-   localtime_r(val,&r_localtime_r)
-    
-/***********/
-/*  crypt  */
-/***********/
-#include <crypt.h>
-#define R_CRYPT_INIT_R() \
-    CRYPTD r_cryptd_r; \
-    bzero(&r_cryptd_r,sizeof(CRYPTD)) 
-
-#define R_CRYPT_R(pass,salt) \
-    crypt_r(pass,salt,&r_cryptd_r)
-
-/**************/
-/*  pw stuff  */
-/**************/
-#define R_MAX_PW_LEN_R 1024
-/* The following must be after the last declaration, but */
-/* before the first bit of code...                       */
-#define R_GETPWNAM_INIT_R(pw_ptr) \
-    struct passwd r_getpwnam_pw_r; \
-    char r_getpwnam_line_r[R_MAX_PW_LEN_R]; \
-    pw_ptr = &r_getpwnam_pw_r
-
-#define R_GETPWNAM_R(name) \
-    getpwnam_r(name,&r_getpwnam_pw_r,r_getpwnam_line_r,R_MAX_PW_LEN_R)
-
-/*******************/
-/*  gethost stuff  */
-/*******************/
-#define R_GETHOSTBYADDR_INIT_R() \
-    struct hostent r_gethostbyaddr_r; \
-    struct hostent_data r_gethostbyaddr_data_r
-
-#define R_GETHOSTBYADDR_R(addr,len,type,xptr_ent) \
-    bzero(&r_gethostbyaddr_r,sizeof(struct hostent)); \
-    bzero(&r_gethostbyaddr_data_r,sizeof(struct hostent_data)); \
-    xptr_ent = &r_gethostbyaddr_r; \
-    if (gethostbyaddr_r(addr,len,type, \
-       &r_gethostbyaddr_r,&r_gethostbyaddr_data_r) == -1) { \
-           xptr_ent = NULL; \
-    }
-
-#define R_GETHOSTBYNAME_INIT_R() \
-    struct hostent r_gethostbyname_r; \
-    struct hostent_data r_gethostbyname_data_r
-
-#define R_GETHOSTBYNAME_R(name,xptr_ent) \
-    bzero(&r_gethostbyname_r,sizeof(struct hostent)); \
-    bzero(&r_gethostbyname_data_r,sizeof(struct hostent_data)); \
-    xptr_ent = &r_gethostbyname_r; \
-    if (gethostbyname_r(name, \
-       &r_gethostbyname_r,&r_gethostbyname_data_r) == -1) { \
-          xptr_ent = NULL; \
-    }
-
-#endif /* _LIBC_R_H */
deleted file mode 100644
--- a/config/module.df
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-# Module description file
-#
-# A module is also called a component or a subsystem.
-
-MOD_NAME = nspr20
-MOD_VERSION = 21
deleted file mode 100644
--- a/config/nfspwd.pl
+++ /dev/null
@@ -1,30 +0,0 @@
-#! perl
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-require "fastcwd.pl";
-
-$_ = &fastcwd;
-if (m@^/[uh]/@o || s@^/tmp_mnt/@/@o) {
-    print("$_\n");
-} elsif ((($user, $rest) = m@^/usr/people/(\w+)/(.*)@o)
-      && readlink("/u/$user") eq "/usr/people/$user") {
-    print("/u/$user/$rest\n");
-} else {
-    chop($host = `hostname`);
-    print("/h/$host$_\n");
-}
deleted file mode 100644
--- a/config/nsinstall.c
+++ /dev/null
@@ -1,336 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-/*
-** Netscape portable install command.
-**
-** Brendan Eich, 7/20/95
-*/
-#include <stdio.h>  /* OSF/1 requires this before grp.h, so put it first */
-#include <assert.h>
-#include <fcntl.h>
-#include <grp.h>
-#include <pwd.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <utime.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include "pathsub.h"
-
-#define HAVE_LCHOWN
-
-#if defined(AIX) || defined(BSDI) || defined(HPUX) || defined(LINUX) || defined(SUNOS4) || defined(SCO) || defined(UNIXWARE) || defined(RHAPSODY)
-#undef HAVE_LCHOWN
-#endif
-
-/*
- * Does getcwd() take NULL as the first argument and malloc
- * the result buffer?
- */
-#if !defined(RHAPSODY)
-#define GETCWD_CAN_MALLOC
-#endif
-
-#ifdef LINUX
-#include <getopt.h>
-#endif
-
-#if defined(SCO) || defined(UNIXWARE) || defined(SNI) || defined(NCR) || defined(NEC)
-#if !defined(S_ISLNK) && defined(S_IFLNK)
-#define S_ISLNK(a)	(((a) & S_IFMT) == S_IFLNK)
-#endif
-#endif
-
-#if defined(SNI)
-extern int fchmod(int fildes, mode_t mode);
-#endif
-
-static void
-usage(void)
-{
-    fprintf(stderr,
-	"usage: %s [-C cwd] [-L linkprefix] [-m mode] [-o owner] [-g group]\n"
-	"       %*s [-DdltR] file [file ...] directory\n",
-	program, strlen(program), "");
-    exit(2);
-}
-
-static int
-mkdirs(char *path, mode_t mode)
-{
-    char *cp;
-    struct stat sb;
-    
-    while (*path == '/' && path[1] == '/')
-	path++;
-    while ((cp = strrchr(path, '/')) && cp[1] == '\0')
-	*cp = '\0';
-    if (cp && cp != path) {
-	*cp = '\0';
-	if ((lstat(path, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
-	    mkdirs(path, mode) < 0) {
-	    return -1;
-	}
-	*cp = '/';
-    }
-    return mkdir(path, mode);
-}
-
-static uid_t
-touid(char *owner)
-{
-    struct passwd *pw;
-    uid_t uid;
-    char *cp;
-
-    pw = getpwnam(owner);
-    if (pw)
-	return pw->pw_uid;
-    uid = strtol(owner, &cp, 0);
-    if (uid == 0 && cp == owner)
-	fail("cannot find uid for %s", owner);
-    return uid;
-}
-
-static gid_t
-togid(char *group)
-{
-    struct group *gr;
-    gid_t gid;
-    char *cp;
-
-    gr = getgrnam(group);
-    if (gr)
-	return gr->gr_gid;
-    gid = strtol(group, &cp, 0);
-    if (gid == 0 && cp == group)
-	fail("cannot find gid for %s", group);
-    return gid;
-}
-
-int
-main(int argc, char **argv)
-{
-    int onlydir, dodir, dolink, dorelsymlink, dotimes, opt, len, lplen, tdlen, bnlen, exists, fromfd, tofd, cc, wc;
-    mode_t mode = 0755;
-    char *linkprefix, *owner, *group, *cp, *cwd, *todir, *toname, *name, *base, *linkname, *bp, buf[BUFSIZ];
-    uid_t uid;
-    gid_t gid;
-    struct stat sb, tosb;
-    struct utimbuf utb;
-
-    program = argv[0];
-    cwd = linkname = linkprefix = owner = group = 0;
-    onlydir = dodir = dolink = dorelsymlink = dotimes = lplen = 0;
-
-    while ((opt = getopt(argc, argv, "C:DdlL:Rm:o:g:t")) != EOF) {
-	switch (opt) {
-	  case 'C':
-	    cwd = optarg;
-	    break;
-	  case 'D':
-	    onlydir = 1;
-	    break;
-	  case 'd':
-	    dodir = 1;
-	    break;
-	  case 'l':
-	    dolink = 1;
-	    break;
-	  case 'L':
-	    linkprefix = optarg;
-	    lplen = strlen(linkprefix);
-	    dolink = 1;
-	    break;
-	  case 'R':
-	    dolink = dorelsymlink = 1;
-	    break;
-	  case 'm':
-	    mode = strtoul(optarg, &cp, 8);
-	    if (mode == 0 && cp == optarg)
-		usage();
-	    break;
-	  case 'o':
-	    owner = optarg;
-	    break;
-	  case 'g':
-	    group = optarg;
-	    break;
-	  case 't':
-	    dotimes = 1;
-	    break;
-	  default:
-	    usage();
-	}
-    }
-
-    argc -= optind;
-    argv += optind;
-    if (argc < 2 - onlydir)
-	usage();
-
-    todir = argv[argc-1];
-    if ((stat(todir, &sb) < 0 || !S_ISDIR(sb.st_mode)) &&
-	mkdirs(todir, 0777) < 0) {
-	fail("cannot make directory %s", todir);
-    }
-    if (onlydir)
-	return 0;
-
-    if (!cwd) {
-#ifdef GETCWD_CAN_MALLOC
-	cwd = getcwd(0, PATH_MAX);
-#else
-	cwd = malloc(PATH_MAX + 1);
-	cwd = getcwd(cwd, PATH_MAX);
-#endif
-    }
-    xchdir(todir);
-#ifdef GETCWD_CAN_MALLOC
-    todir = getcwd(0, PATH_MAX);
-#else
-    todir = malloc(PATH_MAX + 1);
-    todir = getcwd(todir, PATH_MAX);
-#endif
-    tdlen = strlen(todir);
-    xchdir(cwd);
-    tdlen = strlen(todir);
-
-    uid = owner ? touid(owner) : -1;
-    gid = group ? togid(group) : -1;
-
-    while (--argc > 0) {
-	name = *argv++;
-	len = strlen(name);
-	base = xbasename(name);
-	bnlen = strlen(base);
-	toname = (char*)xmalloc(tdlen + 1 + bnlen + 1);
-	sprintf(toname, "%s/%s", todir, base);
-	exists = (lstat(toname, &tosb) == 0);
-
-	if (dodir) {
-	    /* -d means create a directory, always */
-	    if (exists && !S_ISDIR(tosb.st_mode)) {
-		(void) unlink(toname);
-		exists = 0;
-	    }
-	    if (!exists && mkdir(toname, mode) < 0)
-		fail("cannot make directory %s", toname);
-	    if ((owner || group) && chown(toname, uid, gid) < 0)
-		fail("cannot change owner of %s", toname);
-	} else if (dolink) {
-	    if (*name == '/') {
-		/* source is absolute pathname, link to it directly */
-		linkname = 0;
-	    } else {
-		if (linkprefix) {
-		    /* -L implies -l and prefixes names with a $cwd arg. */
-		    len += lplen + 1;
-		    linkname = (char*)xmalloc(len + 1);
-		    sprintf(linkname, "%s/%s", linkprefix, name);
-		} else if (dorelsymlink) {
-		    /* Symlink the relative path from todir to source name. */
-		    linkname = (char*)xmalloc(PATH_MAX);
-
-		    if (*todir == '/') {
-			/* todir is absolute: skip over common prefix. */
-			lplen = relatepaths(todir, cwd, linkname);
-			strcpy(linkname + lplen, name);
-		    } else {
-			/* todir is named by a relative path: reverse it. */
-			reversepath(todir, name, len, linkname);
-			xchdir(cwd);
-		    }
-
-		    len = strlen(linkname);
-		}
-		name = linkname;
-	    }
-
-	    /* Check for a pre-existing symlink with identical content. */
-	    if (exists &&
-		(!S_ISLNK(tosb.st_mode) ||
-		 readlink(toname, buf, sizeof buf) != len ||
-		 strncmp(buf, name, len) != 0)) {
-		(void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
-		exists = 0;
-	    }
-	    if (!exists && symlink(name, toname) < 0)
-		fail("cannot make symbolic link %s", toname);
-#ifdef HAVE_LCHOWN
-	    if ((owner || group) && lchown(toname, uid, gid) < 0)
-		fail("cannot change owner of %s", toname);
-#endif
-
-	    if (linkname) {
-		free(linkname);
-		linkname = 0;
-	    }
-	} else {
-	    /* Copy from name to toname, which might be the same file. */
-	    fromfd = open(name, O_RDONLY);
-	    if (fromfd < 0 || fstat(fromfd, &sb) < 0)
-		fail("cannot access %s", name);
-	    if (exists && (!S_ISREG(tosb.st_mode) || access(toname, W_OK) < 0))
-		(void) (S_ISDIR(tosb.st_mode) ? rmdir : unlink)(toname);
-	    tofd = open(toname, O_CREAT | O_WRONLY, 0666);
-	    if (tofd < 0)
-		fail("cannot create %s", toname);
-
-	    bp = buf;
-	    while ((cc = read(fromfd, bp, sizeof buf)) > 0) {
-		while ((wc = write(tofd, bp, cc)) > 0) {
-		    if ((cc -= wc) == 0)
-			break;
-		    bp += wc;
-		}
-		if (wc < 0)
-		    fail("cannot write to %s", toname);
-	    }
-	    if (cc < 0)
-		fail("cannot read from %s", name);
-
-	    if (ftruncate(tofd, sb.st_size) < 0)
-		fail("cannot truncate %s", toname);
-	    if (dotimes) {
-		utb.actime = sb.st_atime;
-		utb.modtime = sb.st_mtime;
-		if (utime(toname, &utb) < 0)
-		    fail("cannot set times of %s", toname);
-	    }
-	    if (fchmod(tofd, mode) < 0)
-		fail("cannot change mode of %s", toname);
-	    if ((owner || group) && fchown(tofd, uid, gid) < 0)
-		fail("cannot change owner of %s", toname);
-
-	    /* Must check for delayed (NFS) write errors on close. */
-	    if (close(tofd) < 0)
-		fail("cannot write to %s", toname);
-	    close(fromfd);
-	}
-
-	free(toname);
-    }
-
-    free(cwd);
-    free(todir);
-    return 0;
-}
deleted file mode 100644
--- a/config/pathsub.c
+++ /dev/null
@@ -1,219 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-/*
-** Pathname subroutines.
-**
-** Brendan Eich, 8/29/95
-*/
-#include <assert.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <sys/stat.h>
-#include "pathsub.h"
-#ifdef USE_REENTRANT_LIBC
-#include "libc_r.h"
-#endif /* USE_REENTRANT_LIBC */
-
-char *program;
-
-void
-fail(char *format, ...)
-{
-    int error;
-    va_list ap;
-
-#ifdef USE_REENTRANT_LIBC
-    R_STRERROR_INIT_R();
-#endif
-
-    error = errno;
-    fprintf(stderr, "%s: ", program);
-    va_start(ap, format);
-    vfprintf(stderr, format, ap);
-    va_end(ap);
-    if (error)
-
-#ifdef USE_REENTRANT_LIBC
-    R_STRERROR_R(errno);
-	fprintf(stderr, ": %s", r_strerror_r);
-#else
-	fprintf(stderr, ": %s", strerror(errno));
-#endif
-
-    putc('\n', stderr);
-    exit(1);
-}
-
-char *
-getcomponent(char *path, char *name)
-{
-    if (*path == '\0')
-	return 0;
-    if (*path == '/') {
-	*name++ = '/';
-    } else {
-	do {
-	    *name++ = *path++;
-	} while (*path != '/' && *path != '\0');
-    }
-    *name = '\0';
-    while (*path == '/')
-	path++;
-    return path;
-}
-
-#ifdef UNIXWARE
-/* Sigh.  The static buffer in Unixware's readdir is too small. */
-struct dirent * readdir(DIR *d)
-{
-        static struct dirent *buf = NULL;
-#define MAX_PATH_LEN 1024
-
-
-        if(buf == NULL)
-                buf = (struct dirent *) malloc(sizeof(struct dirent) + MAX_PATH_LEN)
-;
-        return(readdir_r(d, buf));
-}
-#endif
-
-char *
-ino2name(ino_t ino, char *dir)
-{
-    DIR *dp;
-    struct dirent *ep;
-    char *name;
-
-    dp = opendir("..");
-    if (!dp)
-	fail("cannot read parent directory");
-    for (;;) {
-	if (!(ep = readdir(dp)))
-	    fail("cannot find current directory");
-	if (ep->d_ino == ino)
-	    break;
-    }
-    name = xstrdup(ep->d_name);
-    closedir(dp);
-    return name;
-}
-
-void *
-xmalloc(size_t size)
-{
-    void *p = malloc(size);
-    if (!p)
-	fail("cannot allocate %u bytes", size);
-    return p;
-}
-
-char *
-xstrdup(char *s)
-{
-    return strcpy((char*)xmalloc(strlen(s) + 1), s);
-}
-
-char *
-xbasename(char *path)
-{
-    char *cp;
-
-    while ((cp = strrchr(path, '/')) && cp[1] == '\0')
-	*cp = '\0';
-    if (!cp) return path;
-    return cp + 1;
-}
-
-void
-xchdir(char *dir)
-{
-    if (chdir(dir) < 0)
-	fail("cannot change directory to %s", dir);
-}
-
-int
-relatepaths(char *from, char *to, char *outpath)
-{
-    char *cp, *cp2;
-    int len;
-    char buf[NAME_MAX];
-
-    assert(*from == '/' && *to == '/');
-    for (cp = to, cp2 = from; *cp == *cp2; cp++, cp2++)
-	if (*cp == '\0')
-	    break;
-    while (cp[-1] != '/')
-	cp--, cp2--;
-    if (cp - 1 == to) {
-	/* closest common ancestor is /, so use full pathname */
-	len = strlen(strcpy(outpath, to));
-	if (outpath[len] != '/') {
-	    outpath[len++] = '/';
-	    outpath[len] = '\0';
-	}
-    } else {
-	len = 0;
-	while ((cp2 = getcomponent(cp2, buf)) != 0) {
-	    strcpy(outpath + len, "../");
-	    len += 3;
-	}
-	while ((cp = getcomponent(cp, buf)) != 0) {
-	    sprintf(outpath + len, "%s/", buf);
-	    len += strlen(outpath + len);
-	}
-    }
-    return len;
-}
-
-void
-reversepath(char *inpath, char *name, int len, char *outpath)
-{
-    char *cp, *cp2;
-    char buf[NAME_MAX];
-    struct stat sb;
-
-    cp = strcpy(outpath + PATH_MAX - (len + 1), name);
-    cp2 = inpath;
-    while ((cp2 = getcomponent(cp2, buf)) != 0) {
-	if (strcmp(buf, ".") == 0)
-	    continue;
-	if (strcmp(buf, "..") == 0) {
-	    if (stat(".", &sb) < 0)
-		fail("cannot stat current directory");
-	    name = ino2name(sb.st_ino, "..");
-	    len = strlen(name);
-	    cp -= len + 1;
-	    strcpy(cp, name);
-	    cp[len] = '/';
-	    free(name);
-	    xchdir("..");
-	} else {
-	    cp -= 3;
-	    strncpy(cp, "../", 3);
-	    xchdir(buf);
-	}
-    }
-    strcpy(outpath, cp);
-}
deleted file mode 100644
--- a/config/pathsub.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-#ifndef pathsub_h___
-#define pathsub_h___
-/*
-** Pathname subroutines.
-**
-** Brendan Eich, 8/29/95
-*/
-#include <limits.h>
-#include <sys/types.h>
-
-#if SUNOS4
-#include "../pr/include/md/sunos4.h"
-#endif
-
-#ifndef PATH_MAX
-#define PATH_MAX 1024
-#endif
-
-/*
- * Just prevent stupidity
- */
-#undef NAME_MAX
-#define NAME_MAX 256
-
-extern char *program;
-
-extern void fail(char *format, ...);
-extern char *getcomponent(char *path, char *name);
-extern char *ino2name(ino_t ino, char *dir);
-extern void *xmalloc(size_t size);
-extern char *xstrdup(char *s);
-extern char *xbasename(char *path);
-extern void xchdir(char *dir);
-
-/* Relate absolute pathnames from and to returning the result in outpath. */
-extern int relatepaths(char *from, char *to, char *outpath);
-
-/* XXX changes current working directory -- caveat emptor */
-extern void reversepath(char *inpath, char *name, int len, char *outpath);
-
-#endif /* pathsub_h___ */
deleted file mode 100755
--- a/config/prmkdir.bat
+++ /dev/null
@@ -1,18 +0,0 @@
-REM
-REM The contents of this file are subject to the Netscape Public License
-REM Version 1.0 (the "NPL"); you may not use this file except in
-REM compliance with the NPL.  You may obtain a copy of the NPL at
-REM http://www.mozilla.org/NPL/
-REM 
-REM Software distributed under the NPL is distributed on an "AS IS" basis,
-REM WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-REM for the specific language governing rights and limitations under the
-REM NPL.
-REM 
-REM The Initial Developer of this code under the NPL is Netscape
-REM Communications Corporation.  Portions created by Netscape are
-REM Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-REM Reserved.
-REM
-
-mkdir %1
deleted file mode 100644
--- a/config/rules.mk
+++ /dev/null
@@ -1,366 +0,0 @@
-#! gmake
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-################################################################################
-# We have a 4 pass build process:
-#
-# Pass 1. export - Create generated headers and stubs. Publish public headers to
-#		dist/<arch>/include.
-#
-# Pass 2. libs - Create libraries. Publish libraries to dist/<arch>/lib.
-#
-# Pass 3. all - Create programs. 
-#
-# Pass 4. install - Publish programs to dist/<arch>/bin.
-#
-# Parameters to this makefile (set these before including):
-#
-# a)
-#	TARGETS	-- the target to create 
-#			(defaults to $LIBRARY $PROGRAM)
-# b)
-#	DIRS	-- subdirectories for make to recurse on
-#			(the 'all' rule builds $TARGETS $DIRS)
-# c)
-#	CSRCS   -- .c files to compile
-#			(used to define $OBJS)
-# d)
-#	PROGRAM	-- the target program name to create from $OBJS
-#			($OBJDIR automatically prepended to it)
-# e)
-#	LIBRARY	-- the target library name to create from $OBJS
-#			($OBJDIR automatically prepended to it)
-#
-################################################################################
-
-ifndef NSPR_CONFIG_MK
-include $(MOD_DEPTH)/config/config.mk
-endif
-
-#
-# This makefile contains rules for building the following kinds of
-# libraries:
-# - LIBRARY: a static (archival) library
-# - SHARED_LIBRARY: a shared (dynamic link) library
-# - IMPORT_LIBRARY: an import library, used only on Windows and OS/2
-# - PURE_LIBRARY: a library for Purify
-#
-# The names of these libraries can be generated by simply specifying
-# LIBRARY_NAME and LIBRARY_VERSION.
-#
-
-ifdef LIBRARY_NAME
-ifeq ($(OS_ARCH), WINNT)
-
-#
-# Win16 and OS/2 require library names conforming to the 8.3 rule.
-# other platforms do not.
-#
-ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
-LIBRARY		= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.lib
-SHARED_LIBRARY	= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
-IMPORT_LIBRARY	= $(OBJDIR)/$(LIBRARY_NAME)$(LIBRARY_VERSION).lib
-else
-LIBRARY		= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_s.lib
-SHARED_LIBRARY	= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).dll
-IMPORT_LIBRARY	= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).lib
-endif
-
-else
-
-LIBRARY		= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
-SHARED_LIBRARY	= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION)_shr.a
-else
-SHARED_LIBRARY	= $(OBJDIR)/lib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
-endif
-ifdef HAVE_PURIFY
-ifdef DSO_BACKEND
-PURE_LIBRARY	= $(OBJDIR)/purelib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(DLL_SUFFIX)
-else
-PURE_LIBRARY	= $(OBJDIR)/purelib$(LIBRARY_NAME)$(LIBRARY_VERSION).$(LIB_SUFFIX)
-endif
-endif
-
-endif
-endif
-
-ifndef TARGETS
-ifeq ($(OS_ARCH), WINNT)
-TARGETS		= $(LIBRARY) $(SHARED_LIBRARY) $(IMPORT_LIBRARY)
-else
-TARGETS		= $(LIBRARY) $(SHARED_LIBRARY)
-ifdef HAVE_PURIFY
-TARGETS		+= $(PURE_LIBRARY)
-endif
-endif
-endif
-
-#
-# OBJS is the list of object files.  It can be constructed by
-# specifying CSRCS (list of C source files) and ASFILES (list
-# of assembly language source files).
-#
-
-ifndef OBJS
-OBJS		= $(addprefix $(OBJDIR)/,$(CSRCS:.c=.$(OBJ_SUFFIX))) \
-		  $(addprefix $(OBJDIR)/,$(ASFILES:.s=.$(OBJ_SUFFIX)))
-endif
-
-ifeq ($(OS_TARGET), WIN16)
-	comma := ,
-	empty :=
-	space := $(empty) $(empty)
-	W16OBJS = $(subst $(space),$(comma)$(space),$(strip $(OBJS)))
-	W16TEMP =$(OS_LIBS) $(EXTRA_LIBS)
-    ifeq ($(strip $(W16TEMP)),)
-		W16LIBS =
-    else
-		W16LIBS = library $(subst $(space),$(comma)$(space),$(strip $(W16TEMP)))
-    endif
-	W16DEF = $(notdir $(basename $(SHARED_LIBRARY))).DEF
-endif
-
-ifeq ($(OS_ARCH), WINNT)
-ifneq ($(OS_TARGET), WIN16)
-ifneq ($(OS_TARGET), OS2)
-OBJS += $(RES)
-endif
-endif
-endif
-
-ALL_TRASH		= $(TARGETS) $(OBJS) $(OBJDIR) LOGS TAGS $(GARBAGE) \
-			  $(NOSUCHFILE) \
-			  so_locations
-
-ifdef DIRS
-LOOP_OVER_DIRS		=					\
-	@for d in $(DIRS); do					\
-		if test -d $$d; then				\
-			set -e;					\
-			echo "cd $$d; $(MAKE) $@";		\
-			$(MAKE) -C $$d $@;			\
-			set +e;					\
-		else						\
-			echo "Skipping non-directory $$d...";	\
-		fi;						\
-	done
-endif
-
-################################################################################
-
-all:: export libs install
-
-export::
-	+$(LOOP_OVER_DIRS)
-
-libs::
-	+$(LOOP_OVER_DIRS)
-
-install::
-	+$(LOOP_OVER_DIRS)
-
-clean::
-	rm -rf $(OBJS) so_locations $(NOSUCHFILE)
-	+$(LOOP_OVER_DIRS)
-
-clobber::
-	rm -rf $(OBJS) $(TARGETS) $(OBJDIR) $(GARBAGE) so_locations $(NOSUCHFILE)
-	+$(LOOP_OVER_DIRS)
-
-realclean clobber_all::
-	rm -rf $(wildcard *.OBJ *.OBJD) dist $(ALL_TRASH)
-	+$(LOOP_OVER_DIRS)
-
-release:: export
-ifdef RELEASE_LIBS
-	@echo "Copying libraries to release directory"
-	@if test -z "$(BUILD_NUMBER)"; then \
-		echo "BUILD_NUMBER must be defined"; \
-		false; \
-	fi
-	@if test ! -d $(RELEASE_LIB_DIR); then \
-		rm -rf $(RELEASE_LIB_DIR); \
-		$(NSINSTALL) -D $(RELEASE_LIB_DIR);\
-	fi
-	cp $(RELEASE_LIBS) $(RELEASE_LIB_DIR)
-endif
-ifdef RELEASE_HEADERS
-	@echo "Copying header files to release directory"
-	@if test -z "$(BUILD_NUMBER)"; then \
-		echo "BUILD_NUMBER must be defined"; \
-		false; \
-	fi
-	@if test ! -d $(RELEASE_HEADERS_DEST); then \
-		rm -rf $(RELEASE_HEADERS_DEST); \
-		$(NSINSTALL) -D $(RELEASE_HEADERS_DEST);\
-	fi
-	cp $(RELEASE_HEADERS) $(RELEASE_HEADERS_DEST)
-endif
-	+$(LOOP_OVER_DIRS)
-
-alltags:
-	rm -f TAGS tags
-	find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs etags -a
-	find . -name dist -prune -o \( -name '*.[hc]' -o -name '*.cp' -o -name '*.cpp' \) -print | xargs ctags -a
-
-$(NFSPWD):
-	cd $(@D); $(MAKE) $(@F)
-
-$(PROGRAM): $(OBJS)
-	@$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH),WINNT)
-	$(CC) $(OBJS) -Fe$@ -link $(LDFLAGS) $(OS_LIBS) $(EXTRA_LIBS)
-else
-	$(CC) -o $@ $(CFLAGS) $(OBJS) $(LDFLAGS)
-endif
-
-$(LIBRARY): $(OBJS)
-	@$(MAKE_OBJDIR)
-	rm -f $@
-	$(AR) $(OBJS) $(AR_EXTRA_ARGS)
-	$(RANLIB) $@
-
-ifeq ($(OS_TARGET), WIN16)
-$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
-	wlib $(OS_LIB_FLAGS) $@ +$(SHARED_LIBRARY)
-endif
-
-ifeq ($(OS_TARGET), OS2)
-$(IMPORT_LIBRARY): $(SHARED_LIBRARY)
-	$(IMPLIB) $@ $(SHARED_LIBRARY).def
-endif
-    
-$(SHARED_LIBRARY): $(OBJS)
-	@$(MAKE_OBJDIR)
-	rm -f $@
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
-	echo "#!" > $(OBJDIR)/lib$(LIBRARY_NAME)_syms
-	nm -B -C -g $(OBJS) \
-		| awk '/ [T,D] / {print $$3}' \
-		| sed -e 's/^\.//' \
-		| sort -u >> $(OBJDIR)/lib$(LIBRARY_NAME)_syms
-	$(LD) $(XCFLAGS) -o $@ $(OBJS) -bE:$(OBJDIR)/lib$(LIBRARY_NAME)_syms \
-		-bM:SRE -bnoentry $(OS_LIBS) $(EXTRA_LIBS)
-else
-ifeq ($(OS_ARCH), WINNT)
-ifeq ($(OS_TARGET), WIN16)
-	echo system windows dll initinstance >w16link
-	echo option map >>w16link
-	echo option oneautodata >>w16link
-	echo option heapsize=32K >>w16link
-	echo option $(OS_DLL_OPTION) >>w16link
-	echo debug $(DEBUGTYPE) all >>w16link
-	echo name $@ >>w16link
-	echo file >>w16link
-	echo $(W16OBJS) >>w16link
-	echo $(W16IMPORTS) >>w16link
-	echo $(W16LIBS) >>w16link
-	echo $(W16_EXPORTS) >>w16link
-	echo libfile libentry >>w16link
-	$(LINK) @w16link.
-	rm w16link
-else
-ifeq ($(OS_TARGET), OS2)
-# append ( >> ) doesn't seem to be working under OS/2 gmake. Run through OS/2 shell instead.	
-	@cmd /C "echo LIBRARY $(notdir $(basename $(SHARED_LIBRARY))) INITINSTANCE TERMINSTANCE >$@.def"
-	@cmd /C "echo PROTMODE >>$@.def"
-	@cmd /C "echo CODE    LOADONCALL MOVEABLE DISCARDABLE >>$@.def"
-	@cmd /C "echo DATA    PRELOAD MOVEABLE MULTIPLE NONSHARED >>$@.def"	
-	@cmd /C "echo EXPORTS >>$@.def"
-	@cmd /C "$(FILTER) -B -P $(LIBRARY) >> $@.def"
-	$(LINK_DLL) -MAP $(DLLBASE) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS) $@.def
-else
-	$(LINK_DLL) -MAP $(DLLBASE) $(OS_LIBS) $(EXTRA_LIBS) $(OBJS)
-endif
-endif
-else
-	$(MKSHLIB) -o $@ $(OBJS) $(EXTRA_LIBS) $(OS_LIBS)
-endif
-endif
-
-$(PURE_LIBRARY):
-	rm -f $@
-ifneq ($(OS_ARCH), WINNT)
-	$(AR) $(OBJS)
-endif
-	$(RANLIB) $@
-
-ifeq ($(OS_ARCH), WINNT)
-$(RES): $(RESNAME)
-	@$(MAKE_OBJDIR)
-ifeq ($(OS_TARGET),OS2)
-	$(RC) -DOS2 -r $(RESNAME) $(RES)
-else
-	$(RC) -Fo$(RES) $(RESNAME)
-endif
-	@echo $(RES) finished
-endif
-
-$(OBJDIR)/%.$(OBJ_SUFFIX): %.cpp
-	@$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH), WINNT)
-	$(CCC) -Fo$@ -c $(CFLAGS) $<
-else
-	$(CCC) -o $@ -c $(CFLAGS) $< 
-endif
-
-WCCFLAGS1 = $(subst /,\\,$(CFLAGS))
-WCCFLAGS2 = $(subst -I,-i=,$(WCCFLAGS1))
-WCCFLAGS3 = $(subst -D,-d,$(WCCFLAGS2))
-$(OBJDIR)/%.$(OBJ_SUFFIX): %.c
-	@$(MAKE_OBJDIR)
-ifeq ($(OS_ARCH), WINNT)
-ifeq ($(OS_TARGET), WIN16)
-#	$(MOD_DEPTH)/config/w16opt $(WCCFLAGS3)
-	echo $(WCCFLAGS3) >w16wccf
-	$(CC) -zq -fo$(OBJDIR)\\$*.$(OBJ_SUFFIX)  @w16wccf $*.c
-	rm w16wccf
-else
-	$(CC) -Fo$@ -c $(CFLAGS) $*.c
-endif
-else
-	$(CC) -o $@ -c $(CFLAGS) $*.c
-endif
-
-$(OBJDIR)/%.$(OBJ_SUFFIX): %.s
-	@$(MAKE_OBJDIR)
-	$(AS) -o $@ $(ASFLAGS) -c $*.s
-
-%.i: %.c
-	$(CC) -C -E $(CFLAGS) $< > $*.i
-
-%: %.pl
-	rm -f $@; cp $*.pl $@; chmod +x $@
-
-################################################################################
-# Special gmake rules.
-################################################################################
-
-#
-# Re-define the list of default suffixes, so gmake won't have to churn through
-# hundreds of built-in suffix rules for stuff we don't need.
-#
-.SUFFIXES:
-.SUFFIXES: .a .$(OBJ_SUFFIX) .c .cpp .s .h .i .pl
-
-#
-# Fake targets.  Always run these rules, even if a file/directory with that
-# name already exists.
-#
-.PHONY: all alltags clean export install libs realclean release
deleted file mode 100644
--- a/config/win16.mk
+++ /dev/null
@@ -1,99 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#
-# win16_3.11.mk -- Make configuration for Win16
-#
-# This file configures gmake to build the Win16 variant of
-# NSPR 2.0. This file has the function of two files commonly
-# used on other platforms, for example: winnt.mk and
-# winnt4.0.mk. ... The packaging is easier and there is only
-# one variant of the Win16 target.
-# 
-# Win16 is built using the Watcom C/C++ version 11.0
-# compiler. You gotta set up the compiler first. Follow the
-# directions in the manual (Ha! ... really, its not a
-# problem). The Watcom compiler depends on a few environment
-# variables; these environment variables define where the
-# compiler components are installed; they must be set before
-# running the make.
-# 
-# Notes:
-# OS_CFLAGS is the command line options for the compiler when
-#   building the .DLL object files.
-# OS_EXE_CFLAGS is the command line options for the compiler
-#   when building the .EXE object files; this is for the test
-#   programs.
-# the macro OS_CFLAGS is set to OS_EXE_CFLAGS inside of the
-#   makefile for the pr/tests directory. ... Hack.
-# 
-# USE_WATCOM_DEBUG_DATA environment variable causes the
-#   watcom compiler flag to be set to -hw (otherwise
-#   it is set to -hc (codeview debug data)) for debug builds.
-#
-
-# -- configuration -----------------------------------------
-
-CC = wcc
-CCC = wcl
-LINK = wlink
-AR = wlib -q $@
-RC = wrc.exe /r /dWIN16=1 /bt=windows
-RANLIB = echo
-BSDECHO = echo
-NSINSTALL = nsinstall
-INSTALL	= $(NSINSTALL)
-MAKE_OBJDIR = mkdir $(OBJDIR)
-
-XP_DEFINE = -DXP_PC
-OBJ_SUFFIX = obj
-LIB_SUFFIX = lib
-DLL_SUFFIX = dll
-
-ifdef BUILD_OPT
-OBJDIR_TAG = _O
-OPTIMIZER = -oneatx -oh -oi -ei -3 -fpi87 -fp3 -s
-else
-ifdef USE_WATCOM_DEBUG_DATA
-OPTIMIZER = -d2 -hw -s -DDEBUG
-DEBUGTYPE = watcom
-else
-OPTIMIZER = -d2 -hc -s -DDEBUG
-DEBUGTYPE = codeview
-endif
-OBJDIR_TAG = _D
-endif
-
-# XXX FIXME: I doubt we use this.  It is redundant with
-# SHARED_LIBRARY.
-ifdef DLL
-DLL := $(addprefix $(OBJDIR)/, $(DLL))
-endif
-
-
-CPU_ARCH = x86
-OS_CFLAGS = -ml -3 -bd -zc -zu -bt=windows -d_X86_ -dWIN16 -d_WINDLL
-OS_EXE_CFLAGS = -ml -3 -bt=windows -d_X86_ -dWIN16
-OS_LIB_FLAGS = -c -iro -n
-
-# Name of the binary code directories
-OBJDIR_NAME     = $(OS_CONFIG)$(OBJDIR_TAG).OBJ
-
-OS_DLL_OPTION = CASEEXACT
-OS_DLLFLAGS =
-OS_LIBS =
-W16_EXPORTS = #
deleted file mode 100644
--- a/lib/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#! gmake
-
-MOD_DEPTH = ..
-
-export NSPR20=1
-
-include $(MOD_DEPTH)/config/config.mk
-
-DIRS = ds libc msgc
-
-include $(MOD_DEPTH)/config/rules.mk
-
-export:: $(TARGETS)
-
-install:: export
deleted file mode 100644
--- a/lib/ds/MANIFEST
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# This is a list of local files which get copied to the mozilla:dist directory
-#
-
-plarenas.h
-plarena.h
-plevent.h
-plhash.h
-plvector.h
deleted file mode 100644
--- a/lib/ds/Makefile
+++ /dev/null
@@ -1,117 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#! gmake
-
-MOD_DEPTH = ../..
-
-include $(MOD_DEPTH)/config/config.mk
-
-# Disable optimization of the nspr on SunOS4.1.3
-ifeq ($(OS_ARCH),SunOS)
-ifeq ($(OS_RELEASE),4.1.3_U1)
-OPTIMIZER =
-endif
-endif
-
-INCLUDES = -I$(DIST)/include/private -I$(DIST)/include
-
-CSRCS = \
-	plarena.c \
-	plevent.c \
-	plhash.c \
-	plvector.c \
-	$(NULL)
-
-HEADERS = \
-	plarenas.h \
-	plarena.h \
-	plevent.h \
-	plhash.h \
-	plvector.h \
-	$(NULL)
-
-ifeq ($(OS_ARCH), WINNT)
-ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
-# OS_CFLAGS = $(OS_EXE_CFLAGS)
-EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
-else
-DLLBASE=/BASE:0x30000000
-RES=$(OBJDIR)/ds.res
-RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
-OS_LIBS = user32.lib
-EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
-
-ifdef MOZ_DEBUG
-ifdef GLOWCODE
-EXTRA_LIBS += $(GLOWDIR)/glowcode.lib
-endif
-endif
-
-endif
-else
-ifeq ($(OS_ARCH), AIX)
-ifeq ($(CLASSIC_NSPR),1)
-OS_LIBS += -lc
-else
-OS_LIBS += -lc_r
-endif
-endif
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
-EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)_shr
-else
-EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)
-endif
-endif
-
-# On NCR and SCOOS, we can't link with extra libraries when
-# we build a shared library.  If we do so, the linker doesn't
-# complain, but we would run into weird problems at run-time.
-# Therefore on these platforms, we link just the .o files.
-ifeq ($(OS_ARCH),NCR)
-EXTRA_LIBS =
-endif
-ifeq ($(OS_ARCH),SCOOS)
-EXTRA_LIBS =
-endif
-
-LIBRARY_NAME	= plds
-LIBRARY_VERSION	= $(MOD_VERSION)
-
-RELEASE_HEADERS = $(HEADERS)
-RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
-RELEASE_LIBS	= $(TARGETS)
-
-include $(MOD_DEPTH)/config/rules.mk
-
-#
-# The Client build wants the shared libraries in $(DIST)/bin,
-# so we also install them there.
-#
-
-export:: $(TARGETS)
-	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include
-	$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
-	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
-ifeq ($(MOZ_BITS),16)
-	$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)
-	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
-	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin
-endif
-
-install:: export
-
deleted file mode 100644
--- a/lib/ds/export.mac
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# This is a list of local files which get copied to the mozilla:dist directory
-#
-
-plarenas.h
-plarena.h
-plevent.h
-plhash.h
deleted file mode 100644
--- a/lib/ds/plarena.c
+++ /dev/null
@@ -1,299 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-/*
- * Lifetime-based fast allocation, inspired by much prior art, including
- * "Fast Allocation and Deallocation of Memory Based on Object Lifetimes"
- * David R. Hanson, Software -- Practice and Experience, Vol. 20(1).
- */
-#include <stdlib.h>
-#include <string.h>
-#include "plarena.h"
-#include "prmem.h"
-#include "prbit.h"
-#include "prlog.h"
-
-static PLArena *arena_freelist;
-
-#ifdef PL_ARENAMETER
-static PLArenaStats *arena_stats_list;
-
-#define COUNT(pool,what)  (pool)->stats.what++
-#else
-#define COUNT(pool,what)  /* nothing */
-#endif
-
-#define PL_ARENA_DEFAULT_ALIGN  sizeof(double)
-
-PR_IMPLEMENT(void) PL_InitArenaPool(
-    PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align)
-{
-#if defined(XP_MAC)
-#pragma unused (name)
-#endif
-
-    if (align == 0)
-        align = PL_ARENA_DEFAULT_ALIGN;
-    pool->mask = PR_BITMASK(PR_CeilingLog2(align));
-    pool->first.next = NULL;
-    pool->first.base = pool->first.avail = pool->first.limit =
-        (PRUword)PL_ARENA_ALIGN(pool, &pool->first + 1);
-    pool->current = &pool->first;
-    pool->arenasize = size;
-#ifdef PL_ARENAMETER
-    memset(&pool->stats, 0, sizeof pool->stats);
-    pool->stats.name = strdup(name);
-    pool->stats.next = arena_stats_list;
-    arena_stats_list = &pool->stats;
-#endif
-}
-
-PR_IMPLEMENT(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb)
-{
-    PLArena **ap, *a, *b;
-    PRUint32 sz;
-    void *p;
-
-    PR_ASSERT((nb & pool->mask) == 0);
-#if defined(WIN16)
-    if (nb >= 60000U)
-        return 0;
-#endif  /* WIN16 */
-    ap = &arena_freelist;
-    for (a = pool->current; a->avail + nb > a->limit; pool->current = a) {
-        if (a->next) {                          /* move to next arena */
-            a = a->next;
-            continue;
-        }
-        while ((b = *ap) != 0) {                /* reclaim a free arena */
-            if (b->limit - b->base == pool->arenasize) {
-                *ap = b->next;
-                b->next = 0;
-                a = a->next = b;
-                COUNT(pool, nreclaims);
-                goto claim;
-            }
-            ap = &b->next;
-        }
-        sz = PR_MAX(pool->arenasize, nb);        /* allocate a new arena */
-        sz += sizeof *a + pool->mask;           /* header and alignment slop */
-        b = (PLArena*)PR_MALLOC(sz);
-        if (!b)
-            return 0;
-        a = a->next = b;
-        a->next = 0;
-        a->limit = (PRUword)a + sz;
-        PL_COUNT_ARENA(pool,++);
-        COUNT(pool, nmallocs);
-    claim:
-        a->base = a->avail = (PRUword)PL_ARENA_ALIGN(pool, a + 1);
-    }
-    p = (void *)a->avail;
-    a->avail += nb;
-    return p;
-}
-
-PR_IMPLEMENT(void *) PL_ArenaGrow(
-    PLArenaPool *pool, void *p, PRUint32 size, PRUint32 incr)
-{
-    void *newp;
-
-    PL_ARENA_ALLOCATE(newp, pool, size + incr);
-    if (newp)
-        memcpy(newp, p, size);
-    return newp;
-}
-
-/*
- * Free tail arenas linked after head, which may not be the true list head.
- * Reset pool->current to point to head in case it pointed at a tail arena.
- */
-static void FreeArenaList(PLArenaPool *pool, PLArena *head, PRBool reallyFree)
-{
-    PLArena **ap, *a;
-
-    ap = &head->next;
-    a = *ap;
-    if (!a)
-        return;
-
-#ifdef DEBUG
-    do {
-        PR_ASSERT(a->base <= a->avail && a->avail <= a->limit);
-        a->avail = a->base;
-        PL_CLEAR_UNUSED(a);
-    } while ((a = a->next) != 0);
-    a = *ap;
-#endif
-
-    if (reallyFree) {
-        do {
-            *ap = a->next;
-            PL_CLEAR_ARENA(a);
-            PL_COUNT_ARENA(pool,--);
-            PR_DELETE(a);
-        } while ((a = *ap) != 0);
-    } else {
-        /* Insert the whole arena chain at the front of the freelist. */
-        do {
-            ap = &(*ap)->next;
-        } while (*ap);
-        *ap = arena_freelist;
-        arena_freelist = a;
-        head->next = 0;
-    }
-
-    pool->current = head;
-}
-
-PR_IMPLEMENT(void) PL_ArenaRelease(PLArenaPool *pool, char *mark)
-{
-    PLArena *a;
-
-    for (a = pool->first.next; a; a = a->next) {
-        if (PR_UPTRDIFF(mark, a) < PR_UPTRDIFF(a->avail, a)) {
-            a->avail = (PRUword)PL_ARENA_ALIGN(pool, mark);
-            FreeArenaList(pool, a, PR_TRUE);
-            return;
-        }
-    }
-}
-
-PR_IMPLEMENT(void) PL_FreeArenaPool(PLArenaPool *pool)
-{
-    FreeArenaList(pool, &pool->first, PR_FALSE);
-    COUNT(pool, ndeallocs);
-}
-
-PR_IMPLEMENT(void) PL_FinishArenaPool(PLArenaPool *pool)
-{
-    FreeArenaList(pool, &pool->first, PR_TRUE);
-#ifdef PL_ARENAMETER
-    {
-        PLArenaStats *stats, **statsp;
-
-        if (pool->stats.name)
-            PR_DELETE(pool->stats.name);
-        for (statsp = &arena_stats_list; (stats = *statsp) != 0;
-             statsp = &stats->next) {
-            if (stats == &pool->stats) {
-                *statsp = stats->next;
-                return;
-            }
-        }
-    }
-#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()
-{
-    PLArena *a, *next;
-
-    for (a = arena_freelist; a; a = next) {
-        next = a->next;
-        PR_DELETE(a);
-    }
-    arena_freelist = NULL;
-}
-
-#ifdef PL_ARENAMETER
-PR_IMPLEMENT(void) PL_ArenaCountAllocation(PLArenaPool *pool, PRUint32 nb)
-{
-    pool->stats.nallocs++;
-    pool->stats.nbytes += nb;
-    if (nb > pool->stats.maxalloc)
-        pool->stats.maxalloc = nb;
-    pool->stats.variance += nb * nb;
-}
-
-PR_IMPLEMENT(void) PL_ArenaCountInplaceGrowth(
-    PLArenaPool *pool, PRUint32 size, PRUint32 incr)
-{
-    pool->stats.ninplace++;
-}
-
-PR_IMPLEMENT(void) PL_ArenaCountGrowth(
-    PLArenaPool *pool, PRUint32 size, PRUint32 incr)
-{
-    pool->stats.ngrows++;
-    pool->stats.nbytes += incr;
-    pool->stats.variance -= size * size;
-    size += incr;
-    if (size > pool->stats.maxalloc)
-        pool->stats.maxalloc = size;
-    pool->stats.variance += size * size;
-}
-
-PR_IMPLEMENT(void) PL_ArenaCountRelease(PLArenaPool *pool, char *mark)
-{
-    pool->stats.nreleases++;
-}
-
-PR_IMPLEMENT(void) PL_ArenaCountRetract(PLArenaPool *pool, char *mark)
-{
-    pool->stats.nfastrels++;
-}
-
-#include <math.h>
-#include <stdio.h>
-
-PR_IMPLEMENT(void) PL_DumpArenaStats(FILE *fp)
-{
-    PLArenaStats *stats;
-    double mean, variance;
-
-    for (stats = arena_stats_list; stats; stats = stats->next) {
-        if (stats->nallocs != 0) {
-            mean = (double)stats->nbytes / stats->nallocs;
-            variance = fabs(stats->variance / stats->nallocs - mean * mean);
-        } else {
-            mean = variance = 0;
-        }
-
-        fprintf(fp, "\n%s allocation statistics:\n", stats->name);
-        fprintf(fp, "              number of arenas: %u\n", stats->narenas);
-        fprintf(fp, "         number of allocations: %u\n", stats->nallocs);
-        fprintf(fp, " number of free arena reclaims: %u\n", stats->nreclaims);
-        fprintf(fp, "        number of malloc calls: %u\n", stats->nmallocs);
-        fprintf(fp, "       number of deallocations: %u\n", stats->ndeallocs);
-        fprintf(fp, "  number of allocation growths: %u\n", stats->ngrows);
-        fprintf(fp, "    number of in-place growths: %u\n", stats->ninplace);
-        fprintf(fp, "number of released allocations: %u\n", stats->nreleases);
-        fprintf(fp, "       number of fast releases: %u\n", stats->nfastrels);
-        fprintf(fp, "         total bytes allocated: %u\n", stats->nbytes);
-        fprintf(fp, "          mean allocation size: %g\n", mean);
-        fprintf(fp, "            standard deviation: %g\n", sqrt(variance));
-        fprintf(fp, "       maximum allocation size: %u\n", stats->maxalloc);
-    }
-}
-#endif /* PL_ARENAMETER */
deleted file mode 100644
--- a/lib/ds/plarena.h
+++ /dev/null
@@ -1,193 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-#ifndef plarena_h___
-#define plarena_h___
-/*
- * Lifetime-based fast allocation, inspired by much prior art, including
- * "Fast Allocation and Deallocation of Memory Based on Object Lifetimes"
- * David R. Hanson, Software -- Practice and Experience, Vol. 20(1).
- *
- * Also supports LIFO allocation (PL_ARENA_MARK/PL_ARENA_RELEASE).
- */
-#include "prtypes.h"
-#include "plarenas.h"
-
-PR_BEGIN_EXTERN_C
-
-typedef struct PLArena          PLArena;
-
-struct PLArena {
-    PLArena     *next;          /* next arena for this lifetime */
-    PRUword     base;           /* aligned base address, follows this header */
-    PRUword     limit;          /* one beyond last byte in arena */
-    PRUword     avail;          /* points to next available byte */
-};
-
-#ifdef PL_ARENAMETER
-typedef struct PLArenaStats PLArenaStats;
-
-struct PLArenaStats {
-    PLArenaStats  *next;        /* next in arenaStats list */
-    char          *name;        /* name for debugging */
-    PRUint32      narenas;      /* number of arenas in pool */
-    PRUint32      nallocs;      /* number of PL_ARENA_ALLOCATE() calls */
-    PRUint32      nreclaims;    /* number of reclaims from freeArenas */
-    PRUint32      nmallocs;     /* number of malloc() calls */
-    PRUint32      ndeallocs;    /* number of lifetime deallocations */
-    PRUint32      ngrows;       /* number of PL_ARENA_GROW() calls */
-    PRUint32      ninplace;     /* number of in-place growths */
-    PRUint32      nreleases;    /* number of PL_ARENA_RELEASE() calls */
-    PRUint32      nfastrels;    /* number of "fast path" releases */
-    PRUint32      nbytes;       /* total bytes allocated */
-    PRUint32      maxalloc;     /* maximum allocation size in bytes */
-    PRFloat64     variance;     /* size variance accumulator */
-};
-#endif
-
-struct PLArenaPool {
-    PLArena     first;          /* first arena in pool list */
-    PLArena     *current;       /* arena from which to allocate space */
-    PRUint32    arenasize;      /* net exact size of a new arena */
-    PRUword     mask;           /* alignment mask (power-of-2 - 1) */
-#ifdef PL_ARENAMETER
-    PLArenaStats stats;
-#endif
-};
-
-/*
- * If the including .c file uses only one power-of-2 alignment, it may define
- * PL_ARENA_CONST_ALIGN_MASK to the alignment mask and save a few instructions
- * per ALLOCATE and GROW.
- */
-#ifdef PL_ARENA_CONST_ALIGN_MASK
-#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + PL_ARENA_CONST_ALIGN_MASK) \
-                                & ~PL_ARENA_CONST_ALIGN_MASK)
-
-#define PL_INIT_ARENA_POOL(pool, name, size) \
-        PL_InitArenaPool(pool, name, size, PL_ARENA_CONST_ALIGN_MASK + 1)
-#else
-#define PL_ARENA_ALIGN(pool, n) (((PRUword)(n) + (pool)->mask) & ~(pool)->mask)
-#endif
-
-#define PL_ARENA_ALLOCATE(p, pool, nb) \
-    PR_BEGIN_MACRO \
-        PLArena *_a = (pool)->current; \
-        PRUint32 _nb = PL_ARENA_ALIGN(pool, nb); \
-        PRUword _p = _a->avail; \
-        PRUword _q = _p + _nb; \
-        if (_q > _a->limit) \
-            _p = (PRUword)PL_ArenaAllocate(pool, _nb); \
-        else \
-            _a->avail = _q; \
-        p = (void *)_p; \
-        PL_ArenaCountAllocation(pool, nb); \
-    PR_END_MACRO
-
-#define PL_ARENA_GROW(p, pool, size, incr) \
-    PR_BEGIN_MACRO \
-        PLArena *_a = (pool)->current; \
-        PRUint32 _incr = PL_ARENA_ALIGN(pool, incr); \
-        PRUword _p = _a->avail; \
-        PRUword _q = _p + _incr; \
-        if (_p == (PRUword)(p) + PL_ARENA_ALIGN(pool, size) && \
-            _q <= _a->limit) { \
-            _a->avail = _q; \
-            PL_ArenaCountInplaceGrowth(pool, size, incr); \
-        } else { \
-            p = PL_ArenaGrow(pool, p, size, incr); \
-        } \
-        PL_ArenaCountGrowth(pool, size, incr); \
-    PR_END_MACRO
-
-#define PL_ARENA_MARK(pool) ((void *) (pool)->current->avail)
-#define PR_UPTRDIFF(p,q) ((PRUword)(p) - (PRUword)(q))
-
-#ifdef DEBUG
-#define PL_FREE_PATTERN 0xDA
-#define PL_CLEAR_UNUSED(a) (PR_ASSERT((a)->avail <= (a)->limit), \
-                           memset((void*)(a)->avail, PL_FREE_PATTERN, \
-                           (a)->limit - (a)->avail))
-#define PL_CLEAR_ARENA(a)  memset((void*)(a), PL_FREE_PATTERN, \
-                           (a)->limit - (PRUword)(a))
-#else
-#define PL_CLEAR_UNUSED(a)
-#define PL_CLEAR_ARENA(a)
-#endif
-
-#define PL_ARENA_RELEASE(pool, mark) \
-    PR_BEGIN_MACRO \
-        char *_m = (char *)(mark); \
-        PLArena *_a = (pool)->current; \
-        if (PR_UPTRDIFF(_m, _a) <= PR_UPTRDIFF(_a->avail, _a)) { \
-            _a->avail = (PRUword)PL_ARENA_ALIGN(pool, _m); \
-            PL_CLEAR_UNUSED(_a); \
-            PL_ArenaCountRetract(pool, _m); \
-        } else { \
-            PL_ArenaRelease(pool, _m); \
-        } \
-        PL_ArenaCountRelease(pool, _m); \
-    PR_END_MACRO
-
-#ifdef PL_ARENAMETER
-#define PL_COUNT_ARENA(pool,op) ((pool)->stats.narenas op)
-#else
-#define PL_COUNT_ARENA(pool,op)
-#endif
-
-#define PL_ARENA_DESTROY(pool, a, pnext) \
-    PR_BEGIN_MACRO \
-        PL_COUNT_ARENA(pool,--); \
-        if ((pool)->current == (a)) (pool)->current = &(pool)->first; \
-        *(pnext) = (a)->next; \
-        PL_CLEAR_ARENA(a); \
-        free(a); \
-        (a) = 0; \
-    PR_END_MACRO
-
-#ifdef PL_ARENAMETER
-
-#include <stdio.h>
-
-PR_EXTERN(void) PL_ArenaCountAllocation(PLArenaPool *pool, PRUint32 nb);
-
-PR_EXTERN(void) PL_ArenaCountInplaceGrowth(
-    PLArenaPool *pool, PRUint32 size, PRUint32 incr);
-
-PR_EXTERN(void) PL_ArenaCountGrowth(
-    PLArenaPool *pool, PRUint32 size, PRUint32 incr);
-
-PR_EXTERN(void) PL_ArenaCountRelease(PLArenaPool *pool, char *mark);
-
-PR_EXTERN(void) PL_ArenaCountRetract(PLArenaPool *pool, char *mark);
-
-PR_EXTERN(void) PL_DumpArenaStats(FILE *fp);
-
-#else  /* !PL_ARENAMETER */
-
-#define PL_ArenaCountAllocation(ap, nb)                 /* nothing */
-#define PL_ArenaCountInplaceGrowth(ap, size, incr)      /* nothing */
-#define PL_ArenaCountGrowth(ap, size, incr)             /* nothing */
-#define PL_ArenaCountRelease(ap, mark)                  /* nothing */
-#define PL_ArenaCountRetract(ap, mark)                  /* nothing */
-
-#endif /* !PL_ARENAMETER */
-
-PR_END_EXTERN_C
-
-#endif /* plarena_h___ */
deleted file mode 100644
--- a/lib/ds/plarenas.h
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-#if defined(PLARENAS_H)
-#else  /* defined(PLARENAS_H) */
-
-PR_BEGIN_EXTERN_C
-
-typedef struct PLArenaPool      PLArenaPool;
-
-/*
-** Allocate an arena pool as specified by the parameters.
-**
-** This is equivelant to allocating the space yourself and then
-** calling PL_InitArenaPool().
-**
-** This function may fail (and return a NULL) for a variety of
-** reasons. The reason for a particular failure can be discovered
-** by calling PR_GetError().
-*/
-#if 0  /* Not implemented */
-PR_EXTERN(PLArenaPool*) PL_AllocArenaPool(
-    const char *name, PRUint32 size, PRUint32 align);
-#endif
-
-/*
-** Destroy an arena pool previously allocated by PL_AllocArenaPool().
-**
-** This function may fail if the arena is not empty and the caller
-** wishes to check for empty upon descruction.
-*/
-#if 0  /* Not implemented */
-PR_EXTERN(PRStatus) PL_DestroyArenaPool(PLArenaPool *pool, PRBool checkEmpty);
-#endif
-
-
-/*
-** Initialize an arena pool with the given name for debugging and metering,
-** with a minimum size per arena of size bytes.
-**/
-PR_EXTERN(void) PL_InitArenaPool(
-    PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align);
-
-/*
-** Finish using arenas, freeing all memory associated with them.
-**/
-PR_EXTERN(void) PL_ArenaFinish(void);
-
-/*
-** Free the arenas in pool.  The user may continue to allocate from pool
-** after calling this function.  There is no need to call PL_InitArenaPool()
-** again unless PL_FinishArenaPool(pool) has been called.
-**/
-PR_EXTERN(void) PL_FreeArenaPool(PLArenaPool *pool);
-
-/*
-** Free the arenas in pool and finish using it altogether.
-**/
-PR_EXTERN(void) PL_FinishArenaPool(PLArenaPool *pool);
-
-/*
-** Compact all of the arenas in a pool so that no space is wasted.
-**/
-PR_EXTERN(void) PL_CompactArenaPool(PLArenaPool *pool);
-
-/*
-** Friend functions used by the PL_ARENA_*() macros.
-**/
-PR_EXTERN(void *) PL_ArenaAllocate(PLArenaPool *pool, PRUint32 nb);
-
-PR_EXTERN(void *) PL_ArenaGrow(
-    PLArenaPool *pool, void *p, PRUint32 size, PRUint32 incr);
-
-PR_EXTERN(void) PL_ArenaRelease(PLArenaPool *pool, char *mark);
-
-PR_END_EXTERN_C
-
-#endif /* defined(PLARENAS_H) */
-
-/* plarenas */
deleted file mode 100644
--- a/lib/ds/plevent.c
+++ /dev/null
@@ -1,731 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-#include "plevent.h"
-#include "prmem.h"
-#include "prcmon.h"
-#include "prlog.h"
-#if !defined(WIN32)
-#include <errno.h>
-#include <stddef.h>
-#if !defined(OS2)
-#include <unistd.h>
-#endif
-#endif
-
-#if defined(XP_MAC)
-#include <AppleEvents.h>
-#include "pprthred.h"
-#include "primpl.h"
-#else
-#include "private/pprthred.h"
-#include "private/primpl.h"
-#endif
-
-static PRLogModuleInfo *event_lm = NULL;
-
-/*******************************************************************************
- * Private Stuff
- ******************************************************************************/
-
-struct PLEventQueue {
-    char*        name;
-    PRCList        queue;
-    PRMonitor*        monitor;
-    PRThread*        handlerThread;
-#ifdef XP_UNIX
-    PRInt32        eventPipe[2];
-    PRPackedBool    nativeNotifier;
-	int notifyCount;
-#endif
-};
-
-#define PR_EVENT_PTR(_qp) \
-    ((PLEvent*) ((char*) (_qp) - offsetof(PLEvent, link)))
-
-static PRStatus    _pl_SetupNativeNotifier(PLEventQueue* self);
-static void    _pl_CleanupNativeNotifier(PLEventQueue* self);
-static PRStatus    _pl_NativeNotify(PLEventQueue* self);
-static PRStatus    _pl_AcknowledgeNativeNotify(PLEventQueue* self);
-
-
-#if defined(_WIN32) || defined(WIN16)
-PLEventQueue * _pr_main_event_queue;
-UINT _pr_PostEventMsgId;
-HWND _pr_eventReceiverWindow;
-static char *_pr_eventWindowClass = "NSPR:EventWindow";
-#endif
-
-/*******************************************************************************
- * Event Queue Operations
- ******************************************************************************/
-
-PR_IMPLEMENT(PLEventQueue*)
-PL_CreateEventQueue(char* name, PRThread* handlerThread)
-{
-    PRStatus err;
-    PLEventQueue* self = NULL;
-    PRMonitor* mon = NULL;
-
-    if (event_lm == NULL)
-        event_lm = PR_LOG_DEFINE("event");
-
-    self = PR_NEWZAP(PLEventQueue);
-    if (self == NULL) return NULL;
-
-    mon = PR_NewNamedMonitor(name);
-    if (mon == NULL) goto error;
-
-    self->name = name;
-    self->monitor = mon;
-    self->handlerThread = handlerThread;
-    PR_INIT_CLIST(&self->queue);
-    err = _pl_SetupNativeNotifier(self);
-    if (err) goto error;
-
-    return self;
-
-  error:
-    if (mon != NULL)
-    PR_DestroyMonitor(mon);
-    PR_DELETE(self);
-    return NULL;
-}
-
-PR_IMPLEMENT(PRMonitor*)
-PL_GetEventQueueMonitor(PLEventQueue* self)
-{
-    return self->monitor;
-}
-
-static void PR_CALLBACK
-_pl_destroyEvent(PLEvent* event, void* data, PLEventQueue* queue)
-{
-#ifdef XP_MAC
-#pragma unused (data, queue)
-#endif
-    PL_DequeueEvent(event, queue);
-    PL_DestroyEvent(event);
-}
-
-PR_IMPLEMENT(void)
-PL_DestroyEventQueue(PLEventQueue* self)
-{
-    PR_EnterMonitor(self->monitor);
-
-    /* destroy undelivered events */
-    PL_MapEvents(self, _pl_destroyEvent, NULL);
-
-    _pl_CleanupNativeNotifier(self);
-
-    /* destroying the monitor also destroys the name */
-    PR_ExitMonitor(self->monitor);
-    PR_DestroyMonitor(self->monitor);
-    PR_DELETE(self);
-
-}
-
-PR_IMPLEMENT(PRStatus)
-PL_PostEvent(PLEventQueue* self, PLEvent* event)
-{
-    PRStatus err;
-    PRMonitor* mon;
-
-    if (self == NULL)
-    return PR_FAILURE;
-
-    mon = self->monitor;
-    PR_EnterMonitor(mon);
-
-    /* insert event into thread's event queue: */
-    if (event != NULL) {
-    PR_APPEND_LINK(&event->link, &self->queue);
-    }
-
-    /* notify even if event is NULL */
-    err = _pl_NativeNotify(self);
-    if (err != PR_SUCCESS) goto done;
-
-    /*
-     * This may fall on deaf ears if we're really notifying the native 
-     * thread, and no one has called PL_WaitForEvent (or PL_EventLoop):
-     */
-    err = PR_Notify(mon);
-
-  done:
-    PR_ExitMonitor(mon);
-    return err;
-}
-
-PR_IMPLEMENT(void*)
-PL_PostSynchronousEvent(PLEventQueue* self, PLEvent* event)
-{
-    void* result;
-
-    if (self == NULL)
-    return NULL;
-
-    PR_ASSERT(event != NULL);
-    PR_CEnterMonitor(event);
-
-    if (PR_CurrentThread() == self->handlerThread) {
-	/* Handle the case where the thread requesting the event handling
-	   is also the thread that's supposed to do the handling. */
-	result = event->handler(event);
-    }
-    else {
-	int inEventQueueMon = PR_GetMonitorEntryCount(self->monitor);
-	int i, entryCount = self->monitor->entryCount;
-
-	event->synchronousResult = (void*)PR_TRUE;
-	PR_PostEvent(self, event);
-	/* We need to temporarily give up our event queue monitor if
-	   we're holding it, otherwise, the thread we're going to wait
-	   for notification from won't be able to enter it to process
-	   the event. */
-	if (inEventQueueMon) {
-	    for (i = 0; i < entryCount; i++)
-		PR_ExitMonitor(self->monitor);
-	}
-	PR_CWait(event, PR_INTERVAL_NO_TIMEOUT);	/* wait for event to be handled or destroyed */
-	if (inEventQueueMon) {
-	    for (i = 0; i < entryCount; i++)
-		PR_EnterMonitor(self->monitor);
-	}
-	result = event->synchronousResult;
-	event->synchronousResult = NULL;
-    }
-
-    PR_CExitMonitor(event);
-
-    /* For synchronous events, they're destroyed here on the caller's
-       thread before the result is returned. See PL_HandleEvent. */
-    PL_DestroyEvent(event);
-
-    return result;
-}
-
-PR_IMPLEMENT(PLEvent*)
-PL_GetEvent(PLEventQueue* self)
-{
-    PLEvent* event = NULL;
-    PRStatus err;
-    PRMonitor* mon;
-
-    if (self == NULL)
-    return NULL;
-
-    mon = self->monitor;
-    PR_EnterMonitor(mon);
-
-    err = _pl_AcknowledgeNativeNotify(self);
-    if (err) goto done;
-
-    if (!PR_CLIST_IS_EMPTY(&self->queue)) {
-    /* then grab the event and return it: */
-    event = PR_EVENT_PTR(self->queue.next);
-    PR_REMOVE_AND_INIT_LINK(&event->link);
-    }
-
-  done:
-    PR_ExitMonitor(mon);
-    return event;
-}
-
-PR_IMPLEMENT(PRBool)
-PL_EventAvailable(PLEventQueue* self)
-{
-    PRBool result = PR_FALSE;
-
-    if (self == NULL)
-    return PR_FALSE;
-
-    PR_EnterMonitor(self->monitor);
-
-    if (!PR_CLIST_IS_EMPTY(&self->queue)) 
-    result = PR_TRUE;
-
-    PR_ExitMonitor(self->monitor);
-    return result;
-}
-
-PR_IMPLEMENT(void)
-PL_MapEvents(PLEventQueue* self, PLEventFunProc fun, void* data)
-{
-    PRCList* qp;
-
-    if (self == NULL)
-    return;
-
-    PR_EnterMonitor(self->monitor);
-    qp = self->queue.next;
-    while (qp != &self->queue) {
-    PLEvent* event = PR_EVENT_PTR(qp);
-    qp = qp->next;
-    (*fun)(event, data, self);
-    }
-    PR_ExitMonitor(self->monitor);
-}
-
-static void PR_CALLBACK
-_pl_DestroyEventForOwner(PLEvent* event, void* owner, PLEventQueue* queue)
-{
-    PR_ASSERT(PR_GetMonitorEntryCount(queue->monitor) > 0);
-    if (event->owner == owner) {
-    PR_LOG(event_lm, PR_LOG_DEBUG,
-           ("$$$ \tdestroying event %0x for owner %0x", event, owner));
-    PL_DequeueEvent(event, queue);
-    if (event->synchronousResult == (void*)PR_TRUE) {
-        PR_CEnterMonitor(event);
-        event->synchronousResult = NULL;
-        PR_CNotify(event);
-        PR_CExitMonitor(event);
-    }
-    else {
-        PL_DestroyEvent(event);
-    }
-    }
-    else {
-    PR_LOG(event_lm, PR_LOG_DEBUG,
-           ("$$$ \tskipping event %0x for owner %0x", event, owner));
-    }
-}
-
-PR_IMPLEMENT(void)
-PL_RevokeEvents(PLEventQueue* self, void* owner)
-{
-    if (self == NULL)
-    return;
-
-    PR_LOG_BEGIN(event_lm, PR_LOG_DEBUG,
-         ("$$$ revoking events for owner %0x", owner));
-
-    /*
-    ** First we enter the monitor so that no one else can post any events
-    ** to the queue:
-    */
-    PR_EnterMonitor(self->monitor);
-    PR_LOG(event_lm, PR_LOG_DEBUG, ("$$$ owner %0x, entered monitor", owner));
-
-    /*
-    ** Discard any pending events for this owner:
-    */
-    PL_MapEvents(self, _pl_DestroyEventForOwner, owner);
-
-#ifdef DEBUG
-    {
-	PRCList* qp = self->queue.next;
-	while (qp != &self->queue) {
-	    PREvent* event = PR_EVENT_PTR(qp);
-	    qp = qp->next;
-	    PR_ASSERT(event->owner != owner);
-	}
-    }
-#endif /* DEBUG */
-
-    PR_ExitMonitor(self->monitor);
-
-    PR_LOG_END(event_lm, PR_LOG_DEBUG,
-           ("$$$ revoking events for owner %0x", owner));
-}
-
-PR_IMPLEMENT(void)
-PL_ProcessPendingEvents(PLEventQueue* self)
-{
-    if (self == NULL)
-    return;
-
-    while (PR_TRUE) {
-    PLEvent* event = PL_GetEvent(self);
-        if (event == NULL) return;
-
-    PR_LOG_BEGIN(event_lm, PR_LOG_DEBUG, ("$$$ processing event"));
-    PL_HandleEvent(event);
-    PR_LOG_END(event_lm, PR_LOG_DEBUG, ("$$$ done processing event"));
-    }
-}
-
-/*******************************************************************************
- * Event Operations
- ******************************************************************************/
-
-PR_IMPLEMENT(void)
-PL_InitEvent(PLEvent* self, void* owner,
-         PLHandleEventProc handler,
-         PLDestroyEventProc destructor)
-{
-    PR_INIT_CLIST(&self->link);
-    self->handler = handler;
-    self->destructor = destructor;
-    self->owner = owner;
-    self->synchronousResult = NULL;
-}
-
-PR_IMPLEMENT(void*)
-PL_GetEventOwner(PLEvent* self)
-{
-    return self->owner;
-}
-
-PR_IMPLEMENT(void)
-PL_HandleEvent(PLEvent* self)
-{
-    void* result;
-
-    if (self == NULL)
-        return;
-
-    /* This event better not be on an event queue anymore. */
-    PR_ASSERT(PR_CLIST_IS_EMPTY(&self->link));
-
-    result = (*self->handler)(self);
-    if (NULL != self->synchronousResult) {
-    PR_CEnterMonitor(self);
-    self->synchronousResult = result;
-    PR_CNotify(self);    /* wake up the guy waiting for the result */
-    PR_CExitMonitor(self);
-    }
-    else {
-    /* For asynchronous events, they're destroyed by the event-handler
-       thread. See PR_PostSynchronousEvent. */
-    PL_DestroyEvent(self);
-    }
-}
-
-PR_IMPLEMENT(void)
-PL_DestroyEvent(PLEvent* self)
-{
-    if (self == NULL)
-    return;
-
-    /* This event better not be on an event queue anymore. */
-    PR_ASSERT(PR_CLIST_IS_EMPTY(&self->link));
-
-    (*self->destructor)(self);
-}
-
-PR_IMPLEMENT(void)
-PL_DequeueEvent(PLEvent* self, PLEventQueue* queue)
-{
-#ifdef XP_MAC
-#pragma unused (queue)
-#endif
-    if (self == NULL)
-    return;
-
-    /* Only the owner is allowed to dequeue events because once the 
-       client has put it in the queue, they have no idea whether it's 
-       been processed and destroyed or not. */
-/*    PR_ASSERT(queue->handlerThread == PR_CurrentThread());*/
-
-    PR_EnterMonitor(queue->monitor);
-
-    PR_ASSERT(!PR_CLIST_IS_EMPTY(&self->link));
-    PR_REMOVE_AND_INIT_LINK(&self->link);
-
-    PR_ExitMonitor(queue->monitor);
-}
-
-/*******************************************************************************
- * Pure Event Queues
- *
- * For when you're only processing PLEvents and there is no native
- * select, thread messages, or AppleEvents.
- ******************************************************************************/
-
-PR_IMPLEMENT(PLEvent*)
-PL_WaitForEvent(PLEventQueue* self)
-{
-    PLEvent* event;
-    PRMonitor* mon;
-
-    if (self == NULL)
-    return NULL;
-
-    mon = self->monitor;
-    PR_EnterMonitor(mon);
-
-    while ((event = PL_GetEvent(self)) == NULL) {
-        PRStatus err;
-        PR_LOG_END(event_lm, PR_LOG_DEBUG, ("$$$ waiting for event"));
-        err = PR_Wait(mon, PR_INTERVAL_NO_TIMEOUT);
-        if ((err == PR_FAILURE)
-            && (PR_PENDING_INTERRUPT_ERROR == PR_GetError())) break;
-    }
-
-    PR_ExitMonitor(mon);
-    return event;
-}
-
-PR_IMPLEMENT(void)
-PL_EventLoop(PLEventQueue* self)
-{
-    if (self == NULL)
-    return;
-
-    while (PR_TRUE) {
-    PLEvent* event = PL_WaitForEvent(self);
-    if (event == NULL) {
-        /* This can only happen if the current thread is interrupted */
-        return;
-    }
-
-        PR_LOG_BEGIN(event_lm, PR_LOG_DEBUG, ("$$$ processing event"));
-    PL_HandleEvent(event);
-    PR_LOG_END(event_lm, PR_LOG_DEBUG, ("$$$ done processing event"));
-    }
-}
-
-/*******************************************************************************
- * Native Event Queues
- *
- * For when you need to call select, or WaitNextEvent, and yet also want
- * to handle PLEvents.
- ******************************************************************************/
-
-static PRStatus
-_pl_SetupNativeNotifier(PLEventQueue* self)
-{
-#if defined(XP_MAC)
-#pragma unused (self)
-#endif
-
-    PRInt32 err = 0;
-#if defined(XP_UNIX)
-    err = pipe(self->eventPipe);
-#endif
-    return err == 0 ? PR_SUCCESS : PR_FAILURE;
-}
-
-static void
-_pl_CleanupNativeNotifier(PLEventQueue* self)
-{
-#if defined(XP_MAC)
-#pragma unused (self)
-#endif
-
-#if defined(XP_UNIX)
-    close(self->eventPipe[0]);
-    close(self->eventPipe[1]);
-#endif
-}
-
-static PRStatus
-_pl_NativeNotify(PLEventQueue* self)
-{
-#if defined(XP_UNIX)
-
-#   define NOTIFY_TOKEN    0xFA
-    PRInt32 count;
-    unsigned char buf[] = { NOTIFY_TOKEN };
-
-    count = write(self->eventPipe[1], buf, 1);
-	self->notifyCount++;
-    return (count == 1) ? PR_SUCCESS : PR_FAILURE;
-
-#elif defined(XP_PC) && ( defined(WINNT) || defined(WIN95) || defined(WIN16))
-    /*
-    ** Post a message to the NSPR window on the main thread requesting 
-    ** it to process the pending events. This is only necessary for the
-    ** main event queue, since the main thread is waiting for OS events.
-    */
-    if (self == _pr_main_event_queue) {
-       PostMessage( _pr_eventReceiverWindow, _pr_PostEventMsgId,
-                      (WPARAM)0, (LPARAM)self);
-    }
-    return PR_SUCCESS;
-
-#elif defined(XP_MAC)
-
-#pragma unused (self)
-    return PR_SUCCESS;    /* XXX can fail? */
-
-#endif
-}
-
-static PRStatus
-_pl_AcknowledgeNativeNotify(PLEventQueue* self)
-{
-#if defined(XP_UNIX)
-
-    PRInt32 count;
-    unsigned char c;
-
-	if (self->notifyCount <= 0) return PR_SUCCESS;
-    /* consume the byte NativeNotify put in our pipe: */
-    count = read(self->eventPipe[0], &c, 1);
-	self->notifyCount--;
-    return ((count == 1 && c == NOTIFY_TOKEN) || count == 0)
-    ? PR_SUCCESS : PR_FAILURE;
-
-#else
-
-#if defined(XP_MAC)
-#pragma unused (self)
-#endif
-
-    /* nothing to do on the other platforms */
-    return PR_SUCCESS;
-#endif
-}
-
-PR_IMPLEMENT(PRInt32)
-PL_GetEventQueueSelectFD(PLEventQueue* self)
-{
-    if (self == NULL)
-    return -1;
-
-#if defined(XP_UNIX)
-    return self->eventPipe[0];
-#else
-    return -1;    /* other platforms don't handle this (yet) */
-#endif
-}
-
-
-
-#if defined(WIN16) || defined(_WIN32)
-/*
-** Global Instance handle...
-** In Win32 this is the module handle of the DLL.
-**
-*/
-HINSTANCE _pr_hInstance;
-#endif
-
-#if defined(WIN16)
-/*
-** Function LibMain() is required by Win16
-**
-*/
-int CALLBACK LibMain( HINSTANCE hInst, WORD wDataSeg, 
-                      WORD cbHeapSize, LPSTR lpszCmdLine )
-{
-    _pr_hInstance = hInst;
-    return TRUE;
-}
-#endif /* WIN16 */
-
-#if defined(_WIN32)
-
-/*
-** Initialization routine for the NSPR DLL...
-*/
-
-BOOL WINAPI DllMain (HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved)
-{
-  switch (dwReason)
-  {
-    case DLL_PROCESS_ATTACH:
-      _pr_hInstance = hDLL;
-      break;
-
-    case DLL_THREAD_ATTACH:
-      break;
-
-    case DLL_THREAD_DETACH:
-      break;
-
-    case DLL_PROCESS_DETACH:
-      _pr_hInstance = NULL;
-      break;
-  }
-
-    return TRUE;
-}
-#endif
-
-
-#if defined(WIN16) || defined(_WIN32)
-PR_IMPLEMENT(PLEventQueue *)
-PL_GetMainEventQueue()
-{
-   PR_ASSERT(_pr_main_event_queue);
-
-   return _pr_main_event_queue;
-}
-
-LRESULT CALLBACK 
-#if defined(WIN16)
-__loadds
-#endif
-_md_EventReceiverProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
-{
-    if (_pr_PostEventMsgId == uMsg )
-    {
-        PREventQueue *queue = (PREventQueue *)lParam;
-
-        PR_ASSERT(queue == PL_GetMainEventQueue());
-        if (queue == PL_GetMainEventQueue()) 
-        {
-            PR_ProcessPendingEvents(queue);
-            return TRUE;
-        }
-    } 
-    return DefWindowProc(hwnd, uMsg, wParam, lParam);
-}
-
-PR_IMPLEMENT(void)
-PL_InitializeEventsLib(char *name)
-{
-    WNDCLASS wc;
-
-    _pr_main_event_queue = PL_CreateEventQueue(name, PR_GetCurrentThread());
-
-    /* Register the windows message for NSPR Event notification */
-    _pr_PostEventMsgId = RegisterWindowMessage("NSPR_PostEvent");
-
-    /* Register the class for the event receiver window */
-    if (!GetClassInfo(_pr_hInstance, _pr_eventWindowClass, &wc)) {
-        wc.style         = 0;
-        wc.lpfnWndProc   = _md_EventReceiverProc;
-        wc.cbClsExtra    = 0;
-        wc.cbWndExtra    = 0;
-        wc.hInstance     = _pr_hInstance;
-        wc.hIcon         = NULL;
-        wc.hCursor       = NULL;
-        wc.hbrBackground = (HBRUSH) NULL;
-        wc.lpszMenuName  = (LPCSTR) NULL;
-        wc.lpszClassName = _pr_eventWindowClass;
-        RegisterClass(&wc);
-        }
-        
-    /* Create the event receiver window */
-    _pr_eventReceiverWindow = CreateWindow(_pr_eventWindowClass,
-                                           "NSPR:EventReceiver",
-                                            0, 0, 0, 10, 10,
-                                            NULL, NULL, _pr_hInstance,
-                                            NULL);
-    PR_ASSERT(_pr_eventReceiverWindow);
-}
-#endif
-
-#if defined(_WIN32) || defined(WIN16)
-PR_IMPLEMENT(HWND)
-PR_GetEventReceiverWindow()
-{
-    if(_pr_eventReceiverWindow != NULL)
-    {
-	return _pr_eventReceiverWindow;
-    }
-
-    return NULL;
-
-}
-#endif
-
-/******************************************************************************/
deleted file mode 100644
--- a/lib/ds/plevent.h
+++ /dev/null
@@ -1,410 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-/**********************************************************************
-NSPL Events
-
-Defining Events
----------------
-
-Events are essentially structures that represent argument lists for a
-function that will run on another thread. All event structures you
-define must include a PLEvent struct as their first field:
-
-    typedef struct MyEventType {
-        PLEvent	e;
-		// arguments follow...
-        int	x;
-		char*	y;
-    } MyEventType;
-
-It is also essential that you establish a model of ownership for each
-argument passed in an event record, i.e. whether particular arguments
-will be deleted by the event destruction callback, or whether they
-only loaned to the event handler callback, and guaranteed to persist
-until the time at which the handler is called.
-
-Sending Events
---------------
-
-Events are initialized by PL_InitEvent and can be sent via
-PL_PostEvent or PL_PostSynchronousEvent. Events can also have an
-owner. The owner of an event can revoke all the events in a given
-event-queue by calling PL_RevokeEvents. An owner might want
-to do this if, for instance, it is being destroyed, and handling the
-events after the owner's destruction would cause an error (e.g. an
-MWContext).
-
-Since the act of initializing and posting an event must be coordinated
-with it's possible revocation, it is essential that the event-queue's
-monitor be entered surrounding the code that constructs, initializes
-and posts the event:
-
-    void postMyEvent(MyOwner* owner, int x, char* y)
-    {
-		MyEventType* event;
-
-		PL_ENTER_EVENT_QUEUE_MONITOR(myQueue);
-
-		// construct
-		event = PR_NEW(MyEventType);
-		if (event == NULL) goto done;
-
-		// initialize
-		PL_InitEvent(event, owner,
-					 (PLHandleEventProc)handleMyEvent,
-					 (PLDestroyEventProc)destroyMyEvent);
-		event->x = x;
-		event->y = strdup(y);
-
-		// post
-		PL_PostEvent(myQueue, &event->e);
-
-      done:
-		PL_EXIT_EVENT_QUEUE_MONITOR(myQueue);
-    }
-
-If you don't call PL_InitEvent and PL_PostEvent within the
-event-queue's monitor, you'll get a big red assert. 
-
-Handling Events
----------------
-
-To handle an event you must write a callback that is passed the event
-record you defined containing the event's arguments:
-
-    void* handleMyEvent(MyEventType* event)
-    {
-		doit(event->x, event->y);
-		return NULL;	// you could return a value for a sync event
-    }
-
-Similarly for the destruction callback:
-
-    void destroyMyEvent(MyEventType* event)
-    {
-		free(event->y);	// created by strdup
-		free(event);
-    }
-
-Processing Events in Your Event Loop
-------------------------------------
-
-If your main loop only processes events delivered to the event queue,
-things are rather simple. You just get the next event (which may
-block), and then handle it:
-
-    while (1) {
-		event = PL_GetEvent(myQueue);
-		PL_HandleEvent(event);
-    }
-
-However, if other things must be waited on, you'll need to obtain a
-file-descriptor that represents your event queue, and hand it to select:
-
-    fd = PL_GetEventQueueSelectFD(myQueue);
-    ...add fd to select set...
-    while (select(...)) {
-		if (...fd...) {
-		    PL_ProcessPendingEvents(myQueue);
-		}
-		...
-    }
-
-Of course, with Motif and Windows it's more complicated than that, and
-on Mac it's completely different, but you get the picture.
-
-Revoking Events
----------------
-If at any time an owner of events is about to be destroyed, you must
-take steps to ensure that no one tries to use the event queue after
-the owner is gone (or a crash may result). You can do this by either
-processing all the events in the queue before destroying the owner:
-
-    {
-		...
-		PL_ENTER_EVENT_QUEUE_MONITOR(myQueue);
-		PL_ProcessPendingEvents(myQueue);
-		DestroyMyOwner(owner);
-		PL_EXIT_EVENT_QUEUE_MONITOR(myQueue);
-		...
-    }
-
-or by revoking the events that are in the queue for that owner. This
-removes them from the queue and calls their destruction callback:
-
-    {
-		...
-		PL_ENTER_EVENT_QUEUE_MONITOR(myQueue);
-		PL_RevokeEvents(myQueue, owner);
-		DestroyMyOwner(owner);
-		PL_EXIT_EVENT_QUEUE_MONITOR(myQueue);
-		...
-    }
-
-In either case it is essential that you be in the event-queue's monitor
-to ensure that all events are removed from the queue for that owner, 
-and to ensure that no more events will be delivered for that owner.
-**********************************************************************/
-
-#ifndef prevent_h___
-#define prevent_h___
-
-#include "prtypes.h"
-#include "prclist.h"
-#include "prthread.h"
-#include "prmon.h"
-
-/* For HWND */
-#ifdef _WIN32
-#include <windef.h>
-#elif defined(WIN16)
-#include <windows.h>
-#endif
-
-PR_BEGIN_EXTERN_C
-
-/* Typedefs */
-
-typedef struct PLEvent PLEvent;
-typedef struct PLEventQueue PLEventQueue;
-
-/*******************************************************************************
- * Event Queue Operations
- ******************************************************************************/
-
-/*
-** Creates a new event queue. Returns NULL on failure.
-*/
-PR_EXTERN(PLEventQueue*)
-PL_CreateEventQueue(char* name, PRThread* handlerThread);
-
-/*
-** Destroys an event queue.
-*/
-PR_EXTERN(void)
-PL_DestroyEventQueue(PLEventQueue* self);
-
-/* 
-** Returns the monitor associated with an event queue. This monitor is 
-** selectable. The monitor should be entered to protect against anyone 
-** calling PL_RevokeEvents while the event is trying to be constructed
-** and delivered.
-*/
-PR_EXTERN(PRMonitor*)
-PL_GetEventQueueMonitor(PLEventQueue* self);
-
-#define PL_ENTER_EVENT_QUEUE_MONITOR(queue)	\
-	PR_EnterMonitor(PL_GetEventQueueMonitor(queue))
-
-#define PL_EXIT_EVENT_QUEUE_MONITOR(queue)	\
-	PR_ExitMonitor(PL_GetEventQueueMonitor(queue))
-
-/*
-** Posts an event to an event queue, waking up any threads waiting for an
-** event. If event is NULL, notification still occurs, but no event will
-** be available. 
-**
-** Any events delivered by this routine will be destroyed by PL_HandleEvent
-** when it is called (by the event-handling thread).
-*/
-PR_EXTERN(PRStatus)
-PL_PostEvent(PLEventQueue* self, PLEvent* event);
-
-/*
-** Like PL_PostEvent, this routine posts an event to the event handling
-** thread, but does so synchronously, waiting for the result. The result
-** which is the value of the handler routine is returned.
-**
-** Any events delivered by this routine will be not be destroyed by 
-** PL_HandleEvent, but instead will be destroyed just before the result is
-** returned (by the current thread).
-*/
-PR_EXTERN(void*)
-PL_PostSynchronousEvent(PLEventQueue* self, PLEvent* event);
-
-/*
-** Gets an event from an event queue. Returns NULL if no event is
-** available.
-*/
-PR_EXTERN(PLEvent*)
-PL_GetEvent(PLEventQueue* self);
-
-/*
-** Returns true if there is an event available for PL_GetEvent.
-*/
-PR_EXTERN(PRBool)
-PL_EventAvailable(PLEventQueue* self);
-
-/*
-** This is the type of the function that must be passed to PL_MapEvents
-** (see description below).
-*/
-typedef void 
-(PR_CALLBACK *PLEventFunProc)(PLEvent* event, void* data, PLEventQueue* queue);
-
-/*
-** Applies a function to every event in the event queue. This can be used
-** to selectively handle, filter, or remove events. The data pointer is
-** passed to each invocation of the function fun.
-*/
-PR_EXTERN(void)
-PL_MapEvents(PLEventQueue* self, PLEventFunProc fun, void* data);
-
-/*
-** This routine walks an event queue and destroys any event whose owner is
-** the owner specified. The == operation is used to compare owners.
-*/
-PR_EXTERN(void)
-PL_RevokeEvents(PLEventQueue* self, void* owner);
-
-/*
-** This routine processes all pending events in the event queue. It can be
-** called from the thread's main event-processing loop whenever the event
-** queue's selectFD is ready (returned by PL_GetEventQueueSelectFD).
-*/
-PR_EXTERN(void)
-PL_ProcessPendingEvents(PLEventQueue* self);
-
-/*******************************************************************************
- * Pure Event Queues
- *
- * For when you're only processing PLEvents and there is no native
- * select, thread messages, or AppleEvents.
- ******************************************************************************/
-
-/*
-** Blocks until an event can be returned from the event queue. This routine
-** may return NULL if the current thread is interrupted.
-*/
-PR_EXTERN(PLEvent*)
-PL_WaitForEvent(PLEventQueue* self);
-
-/*
-** One stop shopping if all you're going to do is process PLEvents. Just
-** call this and it loops forever processing events as they arrive. It will
-** terminate when your thread is interrupted or dies.
-*/
-PR_EXTERN(void)
-PL_EventLoop(PLEventQueue* self);
-
-/*******************************************************************************
- * Native Event Queues
- *
- * For when you need to call select, or WaitNextEvent, and yet also want
- * to handle PLEvents.
- ******************************************************************************/
-
-/*
-** This routine allows you to grab the file descriptor associated with an
-** event queue and use it in the readFD set of select. Useful for platforms
-** that support select, and must wait on other things besides just PLEvents.
-*/
-PR_EXTERN(PRInt32)
-PL_GetEventQueueSelectFD(PLEventQueue* self);
-
-/*******************************************************************************
- * Event Operations
- ******************************************************************************/
-
-/*
-** The type of an event handler function. This function is passed as an
-** initialization argument to PL_InitEvent, and called by
-** PL_HandleEvent. If the event is called synchronously, a void* result 
-** may be returned (otherwise any result will be ignored).
-*/
-typedef void*
-(PR_CALLBACK *PLHandleEventProc)(PLEvent* self);
-
-/*
-** The type of an event destructor function. This function is passed as
-** an initialization argument to PL_InitEvent, and called by
-** PL_DestroyEvent.
-*/
-typedef void
-(PR_CALLBACK *PLDestroyEventProc)(PLEvent* self);
-
-/*
-** Initializes an event. Usually events are embedded in a larger event
-** structure which holds event-specific data, so this is an initializer
-** for that embedded part of the structure.
-*/
-PR_EXTERN(void)
-PL_InitEvent(PLEvent* self, void* owner,
-			 PLHandleEventProc handler,
-			 PLDestroyEventProc destructor);
-
-/*
-** Returns the owner of an event. 
-*/
-PR_EXTERN(void*)
-PL_GetEventOwner(PLEvent* self);
-
-/*
-** Handles an event, calling the event's handler routine.
-*/
-PR_EXTERN(void)
-PL_HandleEvent(PLEvent* self);
-
-/*
-** Destroys an event, calling the event's destructor.
-*/
-PR_EXTERN(void)
-PL_DestroyEvent(PLEvent* self);
-
-/*
-** Removes an event from an event queue.
-*/
-PR_EXTERN(void)
-PL_DequeueEvent(PLEvent* self, PLEventQueue* queue);
-
-#if defined(_WIN32) || defined(WIN16)
-PR_EXTERN(HWND)
-PR_GetEventReceiverWindow();
-#endif
-
-
-/*******************************************************************************
- * Private Stuff
- ******************************************************************************/
-
-struct PLEvent {
-    PRCList				link;
-    PLHandleEventProc	handler;
-    PLDestroyEventProc	destructor;
-    void*				owner;
-    void*				synchronousResult;
-    /* other fields follow... */
-};
-
-/******************************************************************************/
-
-/*
-** Returns the event queue associated with the main thread. Note that
-** the event queue is now created by NSPR.
-*/
-#ifdef XP_PC
-PR_EXTERN(PLEventQueue *)
-PL_GetMainEventQueue(void);
-PR_EXTERN(void)
-PL_InitializeEventsLib(char *name);
-#endif /* XP_PC */
-
-PR_END_EXTERN_C
-
-#endif /* prevent_h___ */
deleted file mode 100644
--- a/lib/ds/plhash.c
+++ /dev/null
@@ -1,477 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-/*
- * PL hash table package.
- */
-#include "plhash.h"
-#include "prbit.h"
-#include "prlog.h"
-#include "prmem.h"
-#include "prtypes.h"
-#include <stdlib.h>
-#include <string.h>
-
-/* Compute the number of buckets in ht */
-#define NBUCKETS(ht)    (1 << (PL_HASH_BITS - (ht)->shift))
-
-/* The smallest table has 16 buckets */
-#define MINBUCKETSLOG2  4
-#define MINBUCKETS      (1 << MINBUCKETSLOG2)
-
-/* Compute the maximum entries given n buckets that we will tolerate, ~90% */
-#define OVERLOADED(n)   ((n) - ((n) >> 3))
-
-/* Compute the number of entries below which we shrink the table by half */
-#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_DELETE(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_DELETE(he);
-}
-
-static PLHashAllocOps defaultHashAllocOps = {
-    DefaultAllocTable, DefaultFreeTable,
-    DefaultAllocEntry, DefaultFreeEntry
-};
-
-PR_IMPLEMENT(PLHashTable *)
-PL_NewHashTable(PRUint32 n, PLHashFunction keyHash,
-                PLHashComparator keyCompare, PLHashComparator valueCompare,
-                PLHashAllocOps *allocOps, void *allocPriv)
-{
-    PLHashTable *ht;
-    PRUint32 nb;
-
-    if (n <= MINBUCKETS) {
-        n = MINBUCKETSLOG2;
-    } else {
-        n = PR_CeilingLog2(n);
-        if ((PRInt32)n < 0)
-            return 0;
-    }
-
-    if (!allocOps) allocOps = &defaultHashAllocOps;
-
-    ht = (PLHashTable*)((*allocOps->allocTable)(allocPriv, sizeof *ht));
-    if (!ht)
-	return 0;
-    memset(ht, 0, sizeof *ht);
-    ht->shift = PL_HASH_BITS - n;
-    n = 1 << n;
-#if defined(XP_PC) && !defined(_WIN32)
-    if (n > 16000) {
-        (*allocOps->freeTable)(allocPriv, ht);
-        return 0;
-    }
-#endif  /* WIN16 */
-    nb = n * sizeof(PLHashEntry *);
-    ht->buckets = (PLHashEntry**)((*allocOps->allocTable)(allocPriv, nb));
-    if (!ht->buckets) {
-        (*allocOps->freeTable)(allocPriv, ht);
-        return 0;
-    }
-    memset(ht->buckets, 0, nb);
-
-    ht->keyHash = keyHash;
-    ht->keyCompare = keyCompare;
-    ht->valueCompare = valueCompare;
-    ht->allocOps = allocOps;
-    ht->allocPriv = allocPriv;
-    return ht;
-}
-
-PR_IMPLEMENT(void)
-PL_HashTableDestroy(PLHashTable *ht)
-{
-    PRUint32 i, n;
-    PLHashEntry *he, *next;
-    PLHashAllocOps *allocOps = ht->allocOps;
-    void *allocPriv = ht->allocPriv;
-
-    n = NBUCKETS(ht);
-    for (i = 0; i < n; i++) {
-        for (he = ht->buckets[i]; he; he = next) {
-            next = he->next;
-            (*allocOps->freeEntry)(allocPriv, he, HT_FREE_ENTRY);
-        }
-    }
-#ifdef DEBUG
-    memset(ht->buckets, 0xDB, n * sizeof ht->buckets[0]);
-#endif
-    (*allocOps->freeTable)(allocPriv, ht->buckets);
-#ifdef DEBUG
-    memset(ht, 0xDB, sizeof *ht);
-#endif
-    (*allocOps->freeTable)(allocPriv, ht);
-}
-
-/*
-** Multiplicative hash, from Knuth 6.4.
-*/
-#define GOLDEN_RATIO    0x9E3779B9U
-
-PR_IMPLEMENT(PLHashEntry **)
-PL_HashTableRawLookup(PLHashTable *ht, PLHashNumber keyHash, const void *key)
-{
-    PLHashEntry *he, **hep, **hep0;
-    PLHashNumber h;
-
-#ifdef HASHMETER
-    ht->nlookups++;
-#endif
-    h = keyHash * GOLDEN_RATIO;
-    h >>= ht->shift;
-    hep = hep0 = &ht->buckets[h];
-    while ((he = *hep) != 0) {
-        if (he->keyHash == keyHash && (*ht->keyCompare)(key, he->key)) {
-            /* Move to front of chain if not already there */
-            if (hep != hep0) {
-                *hep = he->next;
-                he->next = *hep0;
-                *hep0 = he;
-            }
-            return hep0;
-        }
-        hep = &he->next;
-#ifdef HASHMETER
-        ht->nsteps++;
-#endif
-    }
-    return hep;
-}
-
-PR_IMPLEMENT(PLHashEntry *)
-PL_HashTableRawAdd(PLHashTable *ht, PLHashEntry **hep,
-                   PLHashNumber keyHash, const void *key, void *value)
-{
-    PRUint32 i, n;
-    PLHashEntry *he, *next, **oldbuckets;
-    PRUint32 nb;
-
-    /* Grow the table if it is overloaded */
-    n = NBUCKETS(ht);
-    if (ht->nentries >= OVERLOADED(n)) {
-#ifdef HASHMETER
-        ht->ngrows++;
-#endif
-        ht->shift--;
-        oldbuckets = ht->buckets;
-#if defined(XP_PC) && !defined(_WIN32)
-        if (2 * n > 16000)
-            return 0;
-#endif  /* WIN16 */
-        nb = 2 * n * sizeof(PLHashEntry *);
-        ht->buckets = (PLHashEntry**)
-            ((*ht->allocOps->allocTable)(ht->allocPriv, nb));
-        if (!ht->buckets) {
-            ht->buckets = oldbuckets;
-            return 0;
-        }
-        memset(ht->buckets, 0, nb);
-
-        for (i = 0; i < n; i++) {
-            for (he = oldbuckets[i]; he; he = next) {
-                next = he->next;
-                hep = PL_HashTableRawLookup(ht, he->keyHash, he->key);
-                PR_ASSERT(*hep == 0);
-                he->next = 0;
-                *hep = he;
-            }
-        }
-#ifdef DEBUG
-        memset(oldbuckets, 0xDB, n * sizeof oldbuckets[0]);
-#endif
-        (*ht->allocOps->freeTable)(ht->allocPriv, oldbuckets);
-        hep = PL_HashTableRawLookup(ht, keyHash, key);
-    }
-
-    /* Make a new key value entry */
-    he = (*ht->allocOps->allocEntry)(ht->allocPriv, key);
-    if (!he)
-	return 0;
-    he->keyHash = keyHash;
-    he->key = key;
-    he->value = value;
-    he->next = *hep;
-    *hep = he;
-    ht->nentries++;
-    return he;
-}
-
-PR_IMPLEMENT(PLHashEntry *)
-PL_HashTableAdd(PLHashTable *ht, const void *key, void *value)
-{
-    PLHashNumber keyHash;
-    PLHashEntry *he, **hep;
-
-    keyHash = (*ht->keyHash)(key);
-    hep = PL_HashTableRawLookup(ht, keyHash, key);
-    if ((he = *hep) != 0) {
-        /* Hit; see if values match */
-        if ((*ht->valueCompare)(he->value, value)) {
-            /* key,value pair is already present in table */
-            return he;
-        }
-        if (he->value)
-            (*ht->allocOps->freeEntry)(ht->allocPriv, he, HT_FREE_VALUE);
-        he->value = value;
-        return he;
-    }
-    return PL_HashTableRawAdd(ht, hep, keyHash, key, value);
-}
-
-PR_IMPLEMENT(void)
-PL_HashTableRawRemove(PLHashTable *ht, PLHashEntry **hep, PLHashEntry *he)
-{
-    PRUint32 i, n;
-    PLHashEntry *next, **oldbuckets;
-    PRUint32 nb;
-
-    *hep = he->next;
-    (*ht->allocOps->freeEntry)(ht->allocPriv, he, HT_FREE_ENTRY);
-
-    /* Shrink table if it's underloaded */
-    n = NBUCKETS(ht);
-    if (--ht->nentries < UNDERLOADED(n)) {
-#ifdef HASHMETER
-        ht->nshrinks++;
-#endif
-        ht->shift++;
-        oldbuckets = ht->buckets;
-        nb = n * sizeof(PLHashEntry*) / 2;
-        ht->buckets = (PLHashEntry**)(
-            (*ht->allocOps->allocTable)(ht->allocPriv, nb));
-        if (!ht->buckets) {
-            ht->buckets = oldbuckets;
-            return;
-        }
-        memset(ht->buckets, 0, nb);
-
-        for (i = 0; i < n; i++) {
-            for (he = oldbuckets[i]; he; he = next) {
-                next = he->next;
-                hep = PL_HashTableRawLookup(ht, he->keyHash, he->key);
-                PR_ASSERT(*hep == 0);
-                he->next = 0;
-                *hep = he;
-            }
-        }
-#ifdef DEBUG
-        memset(oldbuckets, 0xDB, n * sizeof oldbuckets[0]);
-#endif
-        (*ht->allocOps->freeTable)(ht->allocPriv, oldbuckets);
-    }
-}
-
-PR_IMPLEMENT(PRBool)
-PL_HashTableRemove(PLHashTable *ht, const void *key)
-{
-    PLHashNumber keyHash;
-    PLHashEntry *he, **hep;
-
-    keyHash = (*ht->keyHash)(key);
-    hep = PL_HashTableRawLookup(ht, keyHash, key);
-    if ((he = *hep) == 0)
-        return PR_FALSE;
-
-    /* Hit; remove element */
-    PL_HashTableRawRemove(ht, hep, he);
-    return PR_TRUE;
-}
-
-PR_IMPLEMENT(void *)
-PL_HashTableLookup(PLHashTable *ht, const void *key)
-{
-    PLHashNumber keyHash;
-    PLHashEntry *he, **hep;
-
-    keyHash = (*ht->keyHash)(key);
-    hep = PL_HashTableRawLookup(ht, keyHash, key);
-    if ((he = *hep) != 0) {
-        return he->value;
-    }
-    return 0;
-}
-
-/*
-** Iterate over the entries in the hash table calling func for each
-** entry found. Stop if "f" says to (return value & PR_ENUMERATE_STOP).
-** Return a count of the number of elements scanned.
-*/
-PR_IMPLEMENT(int)
-PL_HashTableEnumerateEntries(PLHashTable *ht, PLHashEnumerator f, void *arg)
-{
-    PLHashEntry *he, **hep;
-    PRUint32 i, nbuckets;
-    int rv, n = 0;
-    PLHashEntry *todo = 0;
-
-    nbuckets = NBUCKETS(ht);
-    for (i = 0; i < nbuckets; i++) {
-        hep = &ht->buckets[i];
-        while ((he = *hep) != 0) {
-            rv = (*f)(he, n, arg);
-            n++;
-            if (rv & (HT_ENUMERATE_REMOVE | HT_ENUMERATE_UNHASH)) {
-                *hep = he->next;
-                if (rv & HT_ENUMERATE_REMOVE) {
-                    he->next = todo;
-                    todo = he;
-                }
-            } else {
-                hep = &he->next;
-            }
-            if (rv & HT_ENUMERATE_STOP) {
-                goto out;
-            }
-        }
-    }
-
-out:
-    hep = &todo;
-    while ((he = *hep) != 0) {
-        PL_HashTableRawRemove(ht, hep, he);
-    }
-    return n;
-}
-
-#ifdef HASHMETER
-#include <math.h>
-#include <stdio.h>
-
-PR_IMPLEMENT(void)
-PL_HashTableDumpMeter(PLHashTable *ht, PLHashEnumerator dump, FILE *fp)
-{
-    double mean, variance;
-    PRUint32 nchains, nbuckets;
-    PRUint32 i, n, maxChain, maxChainLen;
-    PLHashEntry *he;
-
-    variance = 0;
-    nchains = 0;
-    maxChainLen = 0;
-    nbuckets = NBUCKETS(ht);
-    for (i = 0; i < nbuckets; i++) {
-        he = ht->buckets[i];
-        if (!he)
-            continue;
-        nchains++;
-        for (n = 0; he; he = he->next)
-            n++;
-        variance += n * n;
-        if (n > maxChainLen) {
-            maxChainLen = n;
-            maxChain = i;
-        }
-    }
-    mean = (double)ht->nentries / nchains;
-    variance = fabs(variance / nchains - mean * mean);
-
-    fprintf(fp, "\nHash table statistics:\n");
-    fprintf(fp, "     number of lookups: %u\n", ht->nlookups);
-    fprintf(fp, "     number of entries: %u\n", ht->nentries);
-    fprintf(fp, "       number of grows: %u\n", ht->ngrows);
-    fprintf(fp, "     number of shrinks: %u\n", ht->nshrinks);
-    fprintf(fp, "   mean steps per hash: %g\n", (double)ht->nsteps
-                                                / ht->nlookups);
-    fprintf(fp, "mean hash chain length: %g\n", mean);
-    fprintf(fp, "    standard deviation: %g\n", sqrt(variance));
-    fprintf(fp, " max hash chain length: %u\n", maxChainLen);
-    fprintf(fp, "        max hash chain: [%u]\n", maxChain);
-
-    for (he = ht->buckets[maxChain], i = 0; he; he = he->next, i++)
-        if ((*dump)(he, i, fp) != HT_ENUMERATE_NEXT)
-            break;
-}
-#endif /* HASHMETER */
-
-PR_IMPLEMENT(int)
-PL_HashTableDump(PLHashTable *ht, PLHashEnumerator dump, FILE *fp)
-{
-    int count;
-
-    count = PL_HashTableEnumerateEntries(ht, dump, fp);
-#ifdef HASHMETER
-    PL_HashTableDumpMeter(ht, dump, fp);
-#endif
-    return count;
-}
-
-PR_IMPLEMENT(PLHashNumber)
-PL_HashString(const void *key)
-{
-    PLHashNumber h;
-    const PRUint8 *s;
-
-    h = 0;
-    for (s = (const PRUint8*)key; *s; s++)
-        h = (h >> 28) ^ (h << 4) ^ *s;
-    return h;
-}
-
-PR_IMPLEMENT(int)
-PL_CompareStrings(const void *v1, const void *v2)
-{
-    return strcmp((const char*)v1, (const char*)v2) == 0;
-}
-
-PR_IMPLEMENT(int)
-PL_CompareValues(const void *v1, const void *v2)
-{
-    return v1 == v2;
-}
deleted file mode 100644
--- a/lib/ds/plhash.h
+++ /dev/null
@@ -1,131 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-#ifndef plhash_h___
-#define plhash_h___
-/*
- * API to portable hash table code.
- */
-#include <stddef.h>
-#include <stdio.h>
-#include "prtypes.h"
-
-PR_BEGIN_EXTERN_C
-
-typedef struct PLHashEntry  PLHashEntry;
-typedef struct PLHashTable  PLHashTable;
-typedef PRUint32 PLHashNumber;
-#define PL_HASH_BITS 32
-typedef PLHashNumber (PR_CALLBACK *PLHashFunction)(const void *key);
-typedef PRIntn (PR_CALLBACK *PLHashComparator)(const void *v1, const void *v2);
-typedef PRIntn (PR_CALLBACK *PLHashEnumerator)(PLHashEntry *he, PRIntn i, void *arg);
-
-/* Flag bits in PLHashEnumerator's return value */
-#define HT_ENUMERATE_NEXT       0       /* continue enumerating entries */
-#define HT_ENUMERATE_STOP       1       /* stop enumerating entries */
-#define HT_ENUMERATE_REMOVE     2       /* remove and free the current entry */
-#define HT_ENUMERATE_UNHASH     4       /* just unhash the current entry */
-
-typedef struct PLHashAllocOps {
-    void *              (PR_CALLBACK *allocTable)(void *pool, PRSize size);
-    void                (PR_CALLBACK *freeTable)(void *pool, void *item);
-    PLHashEntry *       (PR_CALLBACK *allocEntry)(void *pool, const void *key);
-    void                (PR_CALLBACK *freeEntry)(void *pool, PLHashEntry *he, PRUintn flag);
-} PLHashAllocOps;
-
-#define HT_FREE_VALUE   0               /* just free the entry's value */
-#define HT_FREE_ENTRY   1               /* free value and entire entry */
-
-struct PLHashEntry {
-    PLHashEntry         *next;          /* hash chain linkage */
-    PLHashNumber        keyHash;        /* key hash function result */
-    const void          *key;           /* ptr to opaque key */
-    void                *value;         /* ptr to opaque value */
-};
-
-struct PLHashTable {
-    PLHashEntry         **buckets;      /* vector of hash buckets */
-    PRUint32              nentries;       /* number of entries in table */
-    PRUint32              shift;          /* multiplicative hash shift */
-    PLHashFunction      keyHash;        /* key hash function */
-    PLHashComparator    keyCompare;     /* key comparison function */
-    PLHashComparator    valueCompare;   /* value comparison function */
-    PLHashAllocOps      *allocOps;      /* allocation operations */
-    void                *allocPriv;     /* allocation private data */
-#ifdef HASHMETER
-    PRUint32              nlookups;       /* total number of lookups */
-    PRUint32              nsteps;         /* number of hash chains traversed */
-    PRUint32              ngrows;         /* number of table expansions */
-    PRUint32              nshrinks;       /* number of table contractions */
-#endif
-};
-
-/*
- * Create a new hash table.
- * If allocOps is null, use default allocator ops built on top of malloc().
- */
-PR_EXTERN(PLHashTable *)
-PL_NewHashTable(PRUint32 n, PLHashFunction keyHash,
-                PLHashComparator keyCompare, PLHashComparator valueCompare,
-                PLHashAllocOps *allocOps, void *allocPriv);
-
-PR_EXTERN(void)
-PL_HashTableDestroy(PLHashTable *ht);
-
-/* Low level access methods */
-PR_EXTERN(PLHashEntry **)
-PL_HashTableRawLookup(PLHashTable *ht, PLHashNumber keyHash, const void *key);
-
-PR_EXTERN(PLHashEntry *)
-PL_HashTableRawAdd(PLHashTable *ht, PLHashEntry **hep, PLHashNumber keyHash,
-                   const void *key, void *value);
-
-PR_EXTERN(void)
-PL_HashTableRawRemove(PLHashTable *ht, PLHashEntry **hep, PLHashEntry *he);
-
-/* Higher level access methods */
-PR_EXTERN(PLHashEntry *)
-PL_HashTableAdd(PLHashTable *ht, const void *key, void *value);
-
-PR_EXTERN(PRBool)
-PL_HashTableRemove(PLHashTable *ht, const void *key);
-
-PR_EXTERN(PRIntn)
-PL_HashTableEnumerateEntries(PLHashTable *ht, PLHashEnumerator f, void *arg);
-
-PR_EXTERN(void *)
-PL_HashTableLookup(PLHashTable *ht, const void *key);
-
-PR_EXTERN(PRIntn)
-PL_HashTableDump(PLHashTable *ht, PLHashEnumerator dump, FILE *fp);
-
-/* General-purpose C string hash function. */
-PR_EXTERN(PLHashNumber)
-PL_HashString(const void *key);
-
-/* Compare strings using strcmp(), return true if equal. */
-PR_EXTERN(int)
-PL_CompareStrings(const void *v1, const void *v2);
-
-/* Stub function just returns v1 == v2 */
-PR_EXTERN(PRIntn)
-PL_CompareValues(const void *v1, const void *v2);
-
-PR_END_EXTERN_C
-
-#endif /* plhash_h___ */
deleted file mode 100644
--- a/lib/ds/plvector.c
+++ /dev/null
@@ -1,318 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- *
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-#include "plvector.h"
-#include "prmem.h"
-#include <string.h>
-
-#ifdef XP_WIN16
-#define SIZE_T_MAX 0xFF80 /* a little less than 64K, the max alloc size on win16. */
-#define MAX_ARR_ELEMS SIZE_T_MAX/sizeof(void*)
-#endif
-
-PR_IMPLEMENT(PLVector*)
-PL_NewVector(PRUint32 initialSize, PRInt32 initialGrowBy)
-{
-    PLVector* v = (PLVector*)PR_Malloc(sizeof(PLVector*));
-    if (v == NULL)
-        return NULL;
-    PL_VectorInitialize(v, initialSize, initialGrowBy);
-    return v;
-}
-
-PR_IMPLEMENT(void)
-PL_VectorDestroy(PLVector* v)
-{
-    PL_VectorFinalize(v);
-    PR_Free(v);
-}
-
-/* Initializes an existing vector */
-PR_IMPLEMENT(void)
-PL_VectorInitialize(PLVector* v, PRUint32 initialSize, PRInt32 initialGrowBy)
-{
-    v->data = NULL;
-    v->size = v->maxSize = v->growBy = 0;
-    if (initialSize > 0 || initialGrowBy > 0)
-        PL_VectorSetSize(v, initialSize, initialGrowBy);
-}
-
-/* Destroys the elements, but doesn't free the vector */
-PR_IMPLEMENT(void)
-PL_VectorFinalize(PLVector* v)
-{
-    /* This implementation doesn't do anything to delete the elements
-       in the vector -- that's up to the caller. (Don't shoot me,
-       I just copied the code from libmsg.) */
-    PR_Free(v->data);
-}
-
-PR_IMPLEMENT(PRBool)
-PL_VectorSetSize(PLVector* v, PRUint32 newSize, PRInt32 growBy)
-{
-    if (growBy != -1)
-        v->growBy = growBy;  /* set new size */
-
-    if (newSize == 0) {
-        /* shrink to nothing */
-        PR_Free(v->data);
-        v->data = NULL;
-        v->size = v->maxSize = 0;
-    }
-    else if (v->data == NULL) {
-        /* create one with exact size */
-#ifdef SIZE_T_MAX
-        PR_ASSERT(newSize <= SIZE_T_MAX/sizeof(void*));    /* no overflow */
-#endif
-        v->data = (void**)PR_Malloc(newSize * sizeof(void *));
-        if (v->data == NULL) {
-            v->size = 0;
-            return PR_FALSE;
-        }
-
-        memset(v->data, 0, newSize * sizeof(void *));  /* zero fill */
-
-        v->size = v->maxSize = newSize;
-    }
-    else if (newSize <= v->maxSize) {
-        /* it fits */
-        if (newSize > v->size) {
-            /* initialize the new elements */
-
-            memset(&v->data[v->size], 0, (newSize-v->size) * sizeof(void *));
-        }
-        v->size = newSize;
-    }
-    else {
-        /* otherwise, grow array */
-        PRUint32 newMax;
-        void** newData;
-        PRInt32 growBy = v->growBy;
-        if (growBy == 0) {
-            /* heuristically determine growth when growBy == 0
-               (this avoids heap fragmentation in many situations) */
-            growBy = PR_MIN(1024, PR_MAX(4, v->size / 8));
-        }
-#ifdef MAX_ARR_ELEMS
-        if (v->size + growBy > MAX_ARR_ELEMS)
-            growBy = MAX_ARR_ELEMS - v->size;
-#endif
-        if (newSize < v->maxSize + growBy)
-            newMax = v->maxSize + growBy;  /* granularity */
-        else
-            newMax = newSize;  /* no slush */
-
-#ifdef SIZE_T_MAX
-        if (newMax >= SIZE_T_MAX/sizeof(void*))
-            return PR_FALSE;
-        PR_ASSERT(newMax <= SIZE_T_MAX/sizeof(void*)); /* no overflow */
-#endif
-        PR_ASSERT(newMax >= v->maxSize);  /* no wrap around */
-        newData = (void**)PR_Malloc(newMax * sizeof(void*));
-
-        if (newData != NULL) {
-            /* copy new data from old */
-            memcpy(newData, v->data, v->size * sizeof(void*));
-
-            /* construct remaining elements */
-            PR_ASSERT(newSize > v->size);
-
-            memset(&newData[v->size], 0, (newSize-v->size) * sizeof(void*));
-
-            /* get rid of old stuff (note: no destructors called) */
-            PR_Free(v->data);
-            v->data = newData;
-            v->size = newSize;
-            v->maxSize = newMax;
-        }
-        else {
-            return PR_FALSE;
-        }
-    }
-    return PR_TRUE;
-}
-
-PR_IMPLEMENT(PRBool)
-PL_VectorIsValidIndex(PLVector* v, PRUint32 index)
-{
-    return (index < v->size) ? PR_TRUE : PR_FALSE;
-}
-
-
-PR_IMPLEMENT(void)
-PL_VectorCompact(PLVector* v)
-{
-    if (v->size != v->maxSize) {
-        /* shrink to desired size */
-#ifdef SIZE_T_MAX
-        PR_ASSERT(v->size <= SIZE_T_MAX/sizeof(void *)); /* no overflow */
-#endif
-        void ** newData = NULL;
-        if (v->size != 0) {
-            newData = (void **)PR_Malloc(v->size * sizeof(void *));
-            /* copy new data from old */
-            memcpy(newData, v->data, v->size * sizeof(void *));
-        }
-
-        /* get rid of old stuff (note: no destructors called) */
-        PR_Free(v->data);
-        v->data = newData;
-        v->maxSize = v->size;
-    }
-}
-
-#if 0   /* becomes Copy */
-PR_IMPLEMENT(void)
-PL_VectorSplice(PLVector* v, PRUint32 startIndex, PLVector* newVector)
-{
-    PRUint32 i;
-    PR_ASSERT(newVector != NULL);
-
-    if (PL_VectorGetSize(newVector) > 0) {
-        PL_VectorInsert(v, startIndex, PL_VectorGet(newVector, 0), 
-                        PL_VectorGetSize(newVector));
-        for (i = 0; i < PL_VectorGetSize(newVector); i++)
-            PL_VectorSet(v, startIndex + i, PL_VectorGet(newVector, i));
-    }
-}
-#endif
-
-PR_IMPLEMENT(void)
-PL_VectorCopy(PLVector* dstVector, PRUint32 dstPosition,
-              PLVector* srcVector, PRUint32 srcPosition, PRUint32 length)
-{
-    PR_ASSERT(0);       /* XXX not implemented yet */
-#if 0
-    PL_VectorSetSize(dstVector, PR_MAX(PL_VectorGetSize(dstVector),
-                                       PL_VectorGetSize(srcVector)),
-                     PL_VECTOR_GROW_DEFAULT);
-
-    if (v->data)
-        PR_Free(v->data);
-    v->size = oldA->v->size;
-    v->maxSize = oldA->v->maxSize;
-    v->growBy = oldA->v->growBy;
-    v->data = (void**)PR_Malloc(v->size * sizeof(void *));
-    if (v->data == NULL) {
-        v->size = 0;
-    }
-    else {
-        memcpy(v->data, oldA->v->data, v->size * sizeof(void *));
-    }
-#endif
-}
-
-PR_IMPLEMENT(PLVector*)
-PL_VectorClone(PLVector* v)
-{
-    PLVector* newVec = PL_NewVector(v->size, v->growBy);
-    PL_VectorCopy(newVec, 0, v, 0, v->size);
-    return newVec;
-}
-
-/* Accessing elements */
-
-PR_IMPLEMENT(void)
-PL_VectorSet(PLVector* v, PRUint32 index, void* newElement)
-{
-    if (index >= v->size) {
-        if (!PL_VectorSetSize(v, index+1, PL_VECTOR_GROW_DEFAULT))
-            return;
-    }
-    v->data[index] = newElement;
-}
-
-/* Adds at the end */
-PR_IMPLEMENT(PRInt32)
-PL_VectorAdd(PLVector* v, void* newElement)
-{
-    PRUint32 index = v->size;
-#ifdef XP_WIN16
-    if (index >= SIZE_T_MAX / 4L) {
-        return -1;	     
-    }
-#endif			
-    PL_VectorSet(v, index, newElement);
-    return (PRInt32)index;
-}
-
-/* Inserts new element count times at index */
-PR_IMPLEMENT(void)
-PL_VectorInsert(PLVector* v, PRUint32 index, void* newElement, PRUint32 count)
-{
-    PR_ASSERT(count > 0);     /* zero or negative size not allowed */
-
-    if (index >= v->size) {
-        /* adding after the end of the array */
-        if (!PL_VectorSetSize(v, index + count, PL_VECTOR_GROW_DEFAULT))
-            return;  /* grow so index is valid */
-    }
-    else {
-        /* inserting in the middle of the array */
-        PRUint32 nOldSize = v->size;
-        if (!PL_VectorSetSize(v, v->size + count, PL_VECTOR_GROW_DEFAULT))
-            return;  /* grow it to new size */
-        /* shift old data up to fill gap */
-        memmove(&v->data[index+count], &v->data[index],
-                (nOldSize-index) * sizeof(void *));
-
-        /* re-init slots we copied from */
-        memset(&v->data[index], 0, count * sizeof(void *));
-    }
-
-    /* insert new value in the gap */
-    PR_ASSERT(index + count <= v->size);
-    while (count--)
-        v->data[index++] = newElement;
-}
-
-/* Removes count elements at index */
-PR_IMPLEMENT(void)
-PL_VectorRemove(PLVector* v, PRUint32 index, PRUint32 count)
-{
-    PRUint32 moveCount;
-    PR_ASSERT(count >= 0);
-    PR_ASSERT(index + count <= v->size);
-
-    /* just remove a range */
-    moveCount = v->size - (index + count);
-
-    if (moveCount)
-        memmove(&v->data[index], &v->data[index + count],
-                moveCount * sizeof(void *));
-    v->size -= count;
-}
-
-#ifdef DEBUG
-
-PR_IMPLEMENT(void)
-PL_VectorAssertValid(PLVector* v)
-{
-    if (v->data == NULL) {
-        PR_ASSERT(v->size == 0);
-        PR_ASSERT(v->maxSize == 0);
-    }
-    else {        
-        PR_ASSERT(v->size >= 0);
-        PR_ASSERT(v->maxSize >= 0);
-        PR_ASSERT(v->size <= v->maxSize);
-    }
-}
-
-#endif
-
deleted file mode 100644
--- a/lib/ds/plvector.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- *
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- *
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-#ifndef plvector_h__
-#define plvector_h__
-
-#include "prtypes.h"
-#include "prlog.h" 
-
-PR_BEGIN_EXTERN_C
-
-/* Vectors are extensible arrays */
-
-typedef struct PLVector {
-    void**      data;     /* the actual array of data */
-    PRUint32    size;     /* # of elements (upperBound - 1) */
-    PRUint32    maxSize;  /* max allocated */
-    PRInt32     growBy;   /* grow amount */
-} PLVector;
-
-PR_EXTERN(PLVector*)
-PL_NewVector(PRUint32 initialSize, PRInt32 initialGrowBy);
-
-PR_EXTERN(void)
-PL_VectorDestroy(PLVector* v);
-
-/* Initializes an existing vector */
-PR_EXTERN(void)
-PL_VectorInitialize(PLVector* v, PRUint32 initialSize, PRInt32 initialGrowBy);
-
-/* Destroys the elements, but doesn't free the vector */
-PR_EXTERN(void)
-PL_VectorFinalize(PLVector* v);
-
-#define PL_VectorGetSize(v)     ((v)->size)
-
-#define PL_VECTOR_GROW_DEFAULT  (-1)
-
-PR_EXTERN(PRBool)
-PL_VectorSetSize(PLVector* v, PRUint32 newSize, PRInt32 growBy);
-
-PR_EXTERN(PRBool)
-PL_VectorIsValidIndex(PLVector* v, PRUint32 index);
-
-PR_EXTERN(void)
-PL_VectorCompact(PLVector* v);
-
-PR_EXTERN(void)
-PL_VectorCopy(PLVector* dstVector, PRUint32 dstPosition,
-              PLVector* srcVector, PRUint32 srcPosition, PRUint32 length);
-
-PR_EXTERN(PLVector*)
-PL_VectorClone(PLVector* v);
-
-/* Accessing elements */
-
-#define PL_VectorGetAddr(v, index) (PR_ASSERT((index) < (v)->size), &(v)->data[index])
-
-#define PL_VectorGet(v, index)     (*PL_VectorGetAddr(v, index))
-
-PR_EXTERN(void)
-PL_VectorSet(PLVector* v, PRUint32 index, void* newElement);
-
-/* Adds at the end */
-PR_EXTERN(PRInt32)
-PL_VectorAdd(PLVector* v, void* newElement);
-
-/* Inserts new element count times at index */
-PR_EXTERN(void)
-PL_VectorInsert(PLVector* v, PRUint32 index, void* newElement, PRUint32 count);
-
-/* Removes count elements at index */
-PR_EXTERN(void)
-PL_VectorRemove(PLVector* v, PRUint32 index, PRUint32 count);
-
-#ifdef DEBUG
-
-PR_EXTERN(void)
-PL_VectorAssertValid(PLVector* v);
-
-#endif
-
-PR_END_EXTERN_C
-
-#endif /* plvector_h__ */
deleted file mode 100644
--- a/lib/libc/Makefile
+++ /dev/null
@@ -1,32 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#! gmake
-
-MOD_DEPTH = ../..
-
-export NSPR20=1
-
-include $(MOD_DEPTH)/config/config.mk
-
-DIRS = include src
-
-include $(MOD_DEPTH)/config/rules.mk
-
-export:: $(TARGETS)
-
-install:: export
deleted file mode 100644
--- a/lib/libc/README
+++ /dev/null
@@ -1,20 +0,0 @@
-NSPR 2.0 libc functions
------------------------
-
-Last edited: AOF 04 March 1997
-
-This directory contains various libc-types of functions. All functions in
-this directory are platform independent, thread friendly (both safe and
-efficient). They are contributed from various sources, though the contri-
-butions are monitored by the NSPR group (mailto:freier).
-
-All API items exported by these functions will contain the same three
-character prefix, "PL_" (Portable Library). Internal function names
-that are not exported (static) are of little concern, though some caution
-must be used on those elements that are 'extern' but not really intended
-to be part of the API. Those should all have a prefix of "_PL_" (is that
-legal?).
-
-The responsibility for contributions in this area are distributed among
-all interested parties.
-
deleted file mode 100644
--- a/lib/libc/include/MANIFEST
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# This is a list of local files which get copied to the mozilla:dist directory
-#
-
-plbase64.h
-plerror.h
-plgetopt.h
-plresolv.h
-plstr.h
deleted file mode 100644
--- a/lib/libc/include/Makefile
+++ /dev/null
@@ -1,37 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#! gmake
-
-MOD_DEPTH = ../../..
-include $(MOD_DEPTH)/config/config.mk
-
-HEADERS = $(wildcard *.h)
-
-RELEASE_HEADERS = $(HEADERS)
-RELEASE_HEADERS_DEST = $(RELEASE_INCLUDE_DIR)
-
-include $(MOD_DEPTH)/config/rules.mk
-
-export:: $(HEADERS)
-	$(INSTALL) -m 444 $(HEADERS) $(DIST)/include
-ifeq ($(MOZ_BITS),16)
-	$(INSTALL) -m 444 $(HEADERS) $(MOZ_INCL)
-endif
-
-install:: export
-
deleted file mode 100644
--- a/lib/libc/include/README
+++ /dev/null
@@ -1,7 +0,0 @@
-NSPR 2.0 libc functions
------------------------
-
-Last edited: AOF 04 March 1997
-
-This directory contains the API for various libc-types of functions.
-
deleted file mode 100644
--- a/lib/libc/include/export.mac
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# This is a list of local files which get copied to the mozilla:dist directory
-#
-
-plbase64.h
-plerror.h
-plgetopt.h
-plresolv.h
-plstr.h
deleted file mode 100644
--- a/lib/libc/include/plbase64.h
+++ /dev/null
@@ -1,79 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-#ifndef _plbase64_h
-#define _plbase64_h
-
-#include "prtypes.h"
-
-PR_BEGIN_EXTERN_C
-
-/*
- * PL_Base64Encode
- *
- * This routine encodes the data pointed to by the "src" parameter using the
- * base64 algorithm, and returns a pointer to the result.  If the "srclen"
- * parameter is not zero, it specifies the length of the source data.  If it
- * is zero, the source data is assumed to be null-terminated, and PL_strlen
- * is used to determine the source length.  If the "dest" parameter is not
- * null, it is assumed to point to a buffer of sufficient size (which may be
- * calculated: ((srclen + 2)/3)*4) into which the encoded data is placed 
- * (without any termination).  If the "dest" parameter is null, a buffer is
- * allocated from the heap to hold the encoded data, and the result *will*
- * be terminated with an extra null character.  It is the caller's 
- * responsibility to free the result when it is allocated.  A null is returned 
- * if the allocation fails.
- */
-
-PR_EXTERN(char *)
-PL_Base64Encode
-(
-    const char *src,
-    PRUint32    srclen,
-    char       *dest
-);
-
-/*
- * PL_Base64Decode
- *
- * This routine decodes the data pointed to by the "src" parameter using
- * the base64 algorithm, and returns a pointer to the result.  The source
- * may either include or exclude any trailing '=' characters.  If the
- * "srclen" parameter is not zero, it specifies the length of the source
- * data.  If it is zero, PL_strlen will be used to determine the source
- * length.  If the "dest" parameter is not null, it is assumed to point to
- * a buffer of sufficient size (which may be calculated: (srclen * 3)/4
- * when srclen includes the '=' characters) into which the decoded data
- * is placed (without any termination).  If the "dest" parameter is null,
- * a buffer is allocated from the heap to hold the decoded data, and the
- * result *will* be terminated with an extra null character.  It is the
- * caller's responsibility to free the result when it is allocated.  A null
- * is retuned if the allocation fails, or if the source is not well-coded.
- */
-
-PR_EXTERN(char *)
-PL_Base64Decode
-(
-    const char *src,
-    PRUint32    srclen,
-    char       *dest
-);
-
-PR_END_EXTERN_C
-
-#endif /* _plbase64_h */
deleted file mode 100644
--- a/lib/libc/include/plerror.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-/*
-** File:        plerror.h
-** Description: Simple routine to print translate the calling thread's
-**              error numbers and print them.
-*/
-
-#if defined(PLERROR_H)
-#else
-#define PLERROR_H
-
-#include "prio.h"
-#include "prtypes.h"
-
-PR_BEGIN_EXTERN_C
-/*
-** Print the messages to "syserr" prepending 'msg' if not NULL.
-*/
-PR_EXTERN(void) PL_PrintError(const char *msg);
-
-/*
-** Print the messages to specified output file prepending 'msg' if not NULL.
-*/
-PR_EXTERN(void) PL_FPrintError(PRFileDesc *output, const char *msg);
-
-PR_END_EXTERN_C
-
-#endif /* defined(PLERROR_H) */
-
-/* plerror.h */
deleted file mode 100644
--- a/lib/libc/include/plgetopt.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-/*
-** File:          plgetopt.h
-** Description:   utilities to parse argc/argv
-*/
-
-#if defined(PLGETOPT_H_)
-#else
-#define PLGETOPT_H_
-
-#include "prtypes.h"
-
-PR_BEGIN_EXTERN_C
-
-typedef struct PLOptionInternal PLOptionInternal; 
-
-typedef enum
-{
-        PL_OPT_OK,              /* all's well with the option */
-        PL_OPT_EOL,             /* end of options list */
-        PL_OPT_BAD              /* invalid option (and value) */
-} PLOptStatus;
-
-typedef struct PLOptState
-{
-    char option;                /* the name of the option */
-    const char *value;          /* the value of that option | NULL */
-
-    PLOptionInternal *internal; /* private processing state */
-
-} PLOptState;
-
-PR_EXTERN(PLOptState*) PL_CreateOptState(
-        PRIntn argc, char **argv, const char *options);
-
-PR_EXTERN(void) PL_DestroyOptState(PLOptState *opt);
-
-PR_EXTERN(PLOptStatus) PL_GetNextOpt(PLOptState *opt);
-
-PR_END_EXTERN_C
-
-#endif /* defined(PLGETOPT_H_) */
-
-/* plgetopt.h */
-
deleted file mode 100644
--- a/lib/libc/include/plresolv.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-/*
- * plresolv.h - asynchronous name resolution using DNS 
- */
-
-#ifndef _PLRESOLV_H_
-#define _PLRESOLV_H_
-
-/*
-** THIS IS WORK IN PROGRESS. DO NOT ATTEMPT TO USE ANY PORTION OF THIS
-** API UNTIL THIS MESSAGE NO LONGER EXISTS. IF YOU DO, THEN YOU SURRENDER
-** THE RIGHT TO COMPLAIN ABOUT ANY CONTENT.
-*/
-
-#if defined(XP_UNIX)
-
-#include <prtypes.h>
-#include <prnetdb.h>
-
-NSPR_BEGIN_EXTERN_C
-
-#define PL_RESOLVE_MAXHOSTENTBUF        1024
-#define PL_RESOLVE_DEFAULT_TIMEOUT      0
-
-/* Error return codes */
-#define PL_RESOLVE_OK            0
-#define PL_RESOLVE_EWINIT        1           /* Failed to initialize window */
-#define PL_RESOLVE_EMAKE         2           /* Failed to create request */
-#define PL_RESOLVE_ELAUNCH       3           /* Error launching Async request */
-#define PL_RESOLVE_ETIMEDOUT     4           /* Request timed-out */
-#define PL_RESOLVE_EINVAL        5           /* Invalid argument */
-#define PL_RESOLVE_EOVERFLOW     6           /* Buffer Overflow */
-#define PL_RESOLVE_EUNKNOWN      7           /* berzerk error */
-
-/* ----------- Function Prototypes ----------------*/
-
-PR_EXTERN(PRStatus) PL_ResolveName(
-    const char *name, unsigned char *buf,
-    PRIntn bufsize, PRIntervalTime timeout,
-    PRHostEnt *hostentry, PRIntervalTime *ttl);
-
-PR_EXTERN(PRStatus) PL_ResolveAddr(
-    const PRNetAddr *address, unsigned char *buf,
-    PRIntn bufsize, PRIntervalTime timeout,
-    PRHostEnt *hostentry, PRIntervalTime *ttl);
-
-typedef struct PLResolveStats {
-    int re_errors;
-    int re_nu_look;
-    int re_na_look;
-    int re_replies;
-    int re_requests;
-    int re_resends;
-    int re_sent;
-    int re_timeouts;
-} PLResolveStats;
-
-typedef struct PLResoveInfo {
-    PRBool enabled;
-    PRUint32 numNameLookups;
-    PRUint32 numAddrLookups;
-    PRUint32 numLookupsInProgress;
-    PLResolveStats stats;
-} PLResoveInfo;
-
-PR_EXTERN(void) PL_ResolveInfo(PLResoveInfo *info);
-
-NSPR_END_EXTERN_C
-
-#endif /* defined(XP_UNIX) */
-
-#endif /* _PLRESOLV_H_ */
deleted file mode 100644
--- a/lib/libc/include/plstr.h
+++ /dev/null
@@ -1,428 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-#ifndef _plstr_h
-#define _plstr_h
-
-/*
- * plstr.h
- *
- * This header file exports the API to the NSPR portable library or string-
- * handling functions.  
- * 
- * This API was not designed as an "optimal" or "ideal" string library; it 
- * was based on the good ol' unix string.3 functions, and was written to
- *
- *  1) replace the libc functions, for cross-platform consistancy, 
- *  2) complete the API on platforms lacking common functions (e.g., 
- *     strcase*), and
- *  3) to implement some obvious "closure" functions that I've seen
- *     people hacking around in our code.
- *
- * Point number three largely means that most functions have an "strn"
- * limited-length version, and all comparison routines have a non-case-
- * sensitive version available.
- */
-
-#include "prtypes.h"
-
-PR_BEGIN_EXTERN_C
-/*
- * PL_strlen
- *
- * Returns the length of the provided string, not including the trailing '\0'.
- */
-
-PR_EXTERN(PRUint32)
-PL_strlen(const char *str);
-
-/*
- * PL_strnlen
- *
- * Returns the length of the provided string, not including the trailing '\0',
- * up to the indicated maximum.  The string will not be examined beyond the
- * maximum; if no terminating '\0' is found, the maximum will be returned.
- */
-
-PR_EXTERN(PRUint32)
-PL_strnlen(const char *str, PRUint32 max);
-
-/*
- * PL_strcpy
- *
- * Copies the source string, up to and including the trailing '\0', into the
- * destination buffer.  It does not (can not) verify that the destination
- * buffer is large enough.  It returns the "dest" argument.
- */
-
-PR_EXTERN(char *)
-PL_strcpy(char *dest, const char *src);
-
-/*
- * PL_strncpy
- *
- * Copies the source string into the destination buffer, up to and including
- * the trailing '\0' or up to and including the max'th character, whichever
- * comes first.  It does not (can not) verify that the destination buffer is
- * large enough.  If the source string is longer than the maximum length,
- * the result will *not* be null-terminated (JLRU).
- */
-
-PR_EXTERN(char *)
-PL_strncpy(char *dest, const char *src, PRUint32 max);
-
-/*
- * PL_strncpyz
- *
- * Copies the source string into the destination buffer, up to and including 
- * the trailing '\0' or up but not including the max'th character, whichever 
- * comes first.  It does not (can not) verify that the destination buffer is
- * large enough.  The destination string is always terminated with a '\0',
- * unlike the traditional libc implementation.  It returns the "dest" argument.
- *
- * NOTE: If you call this with a source "abcdefg" and a max of 5, the 
- * destination will end up with "abcd\0" (i.e., it's strlen length will be 4)!
- *
- * This means you can do this:
- *
- *     char buffer[ SOME_SIZE ];
- *     PL_strncpyz(buffer, src, sizeof(buffer));
- *
- * and the result will be properly terminated.
- */
-
-PR_EXTERN(char *)
-PL_strncpyz(char *dest, const char *src, PRUint32 max);
-
-/*
- * PL_strdup
- *
- * Returns a pointer to a malloc'd extent of memory containing a duplicate
- * of the argument string.  The size of the allocated extent is one greater
- * than the length of the argument string, because of the terminator.  A
- * null argument, like a zero-length argument, will result in a pointer to
- * a one-byte extent containing the null value.  This routine returns null
- * upon malloc failure.
- */
-
-PR_EXTERN(char *)
-PL_strdup(const char *s);
-
-/*
- * PL_strfree
- *
- * Free memory allocated by PL_strdup
- */
-
-PR_EXTERN(void)
-PL_strfree(char *s);
-
-/*
- * PL_strndup
- *
- * Returns a pointer to a malloc'd extent of memory containing a duplicate
- * of the argument string, up to the maximum specified.  If the argument
- * string has a length greater than the value of the specified maximum, the
- * return value will be a pointer to an extent of memory of length one
- * greater than the maximum specified.  A null string, a zero-length string,
- * or a zero maximum will all result in a pointer to a one-byte extent
- * containing the null value.  This routine returns null upon malloc failure.
- */
-
-PR_EXTERN(char *)
-PL_strndup(const char *s, PRUint32 max);
-
-/*
- * PL_strcat
- *
- * Appends a copy of the string pointed to by the second argument to the
- * end of the string pointed to by the first.  The destination buffer is
- * not (can not be) checked for sufficient size.  A null destination
- * argument returns null; otherwise, the first argument is returned.
- */
-
-PR_EXTERN(char *)
-PL_strcat(char *dst, const char *src);
-
-/*
- * PL_strncat
- *
- * Appends a copy of the string pointed to by the second argument, up to
- * the maximum size specified, to the end of the string pointed to by the
- * first.  The destination buffer is not (can not be) checked for sufficient
- * size.  A null destination argument returns null; otherwise, the first 
- * argument is returned.  If the maximum size limits the copy, then the
- * result will *not* be null-terminated (JLRU).  A null destination
- * returns null; otherwise, the destination argument is returned.
- */
-
-PR_EXTERN(char *)
-PL_strncat(char *dst, const char *src, PRUint32 max);
-
-/*
- * PL_strcatn
- *
- * Appends a copy of the string pointed to by the third argument, to the
- * end of the string pointed to by the first.  The second argument specifies
- * the maximum size of the destination buffer, including the null termination.
- * If the existing string in dst is longer than the max, no action is taken.
- * The resulting string will be null-terminated.  A null destination returns
- * null; otherwise, the destination argument is returned.
- */
-
-PR_EXTERN(char *)
-PL_strcatn(char *dst, PRUint32 max, const char *src);
-
-/*
- * PL_strcmp
- *
- * Returns an integer, the sign of which -- positive, zero, or negative --
- * reflects the lexical sorting order of the two strings indicated.  The
- * result is positive if the first string comes after the second.  The
- * NSPR implementation is not i18n.
- */
-
-PR_EXTERN(PRIntn)
-PL_strcmp(const char *a, const char *b);
-
-/*
- * PL_strncmp
- * 
- * Returns an integer, the sign of which -- positive, zero, or negative --
- * reflects the lexical sorting order of the two strings indicated, up to
- * the maximum specified.  The result is positive if the first string comes 
- * after the second.  The NSPR implementation is not i18n.  If the maximum
- * is zero, only the existance or non-existance (pointer is null) of the
- * strings is compared.
- */
-
-PR_EXTERN(PRIntn)
-PL_strncmp(const char *a, const char *b, PRUint32 max);
-
-/*
- * PL_strcasecmp
- *
- * Returns an integer, the sign of which -- positive, zero or negative --
- * reflects the case-insensitive lexical sorting order of the two strings
- * indicated.  The result is positive if the first string comes after the 
- * second.  The NSPR implementation is not i18n.
- */
-
-PR_EXTERN(PRIntn)
-PL_strcasecmp(const char *a, const char *b);
-
-/*
- * PL_strncasecmp
- *
- * Returns an integer, the sign of which -- positive, zero or negative --
- * reflects the case-insensitive lexical sorting order of the first n characters
- * of the two strings indicated.  The result is positive if the first string comes 
- * after the second.  The NSPR implementation is not i18n.
- */
-
-PR_EXTERN(PRIntn)
-PL_strncasecmp(const char *a, const char *b, PRUint32 max);
-
-/*
- * PL_strchr
- *
- * Returns a pointer to the first instance of the specified character in the
- * provided string.  It returns null if the character is not found, or if the
- * provided string is null.  The character may be the null character.
- */
-
-PR_EXTERN(char *)
-PL_strchr(const char *s, char c);
-
-/*
- * PL_strrchr
- *
- * Returns a pointer to the last instance of the specified character in the
- * provided string.  It returns null if the character is not found, or if the
- * provided string is null.  The character may be the null character.
- */
-
-PR_EXTERN(char *)
-PL_strrchr(const char *s, char c);
-
-/*
- * PL_strnchr
- * 
- * Returns a pointer to the first instance of the specified character within the
- * first n characters of the provided string.  It returns null if the character
- * is not found, or if the provided string is null.  The character may be the
- * null character.
- */
-
-PR_EXTERN(char *)
-PL_strnchr(const char *s, char c, PRUint32 n);
-
-/*
- * PL_strnrchr
- *
- * Returns a pointer to the last instance of the specified character within the
- * first n characters of the provided string.  It returns null if the character is
- * not found, or if the provided string is null.  The character may be the null
- * character.
- */
-
-PR_EXTERN(char *)
-PL_strnrchr(const char *s, char c, PRUint32 n);
-
-/*
- * NOTE: Looking for strcasechr, strcaserchr, strncasechr, or strncaserchr?
- * Use strpbrk, strprbrk, strnpbrk or strnprbrk.
- */
-
-/*
- * PL_strpbrk
- *
- * Returns a pointer to the first instance in the first string of any character
- * (not including the terminating null character) of the second string.  It returns
- * null if either string is null.
- */
-
-PR_EXTERN(char *)
-PL_strpbrk(const char *s, const char *list);
-
-/*
- * PL_strprbrk
- *
- * Returns a pointer to the last instance in the first string of any character
- * (not including the terminating null character) of the second string.  It returns
- * null if either string is null.
- */
-
-PR_EXTERN(char *)
-PL_strprbrk(const char *s, const char *list);
-
-/*
- * PL_strnpbrk
- *
- * Returns a pointer to the first instance (within the first n characters) of any
- * character (not including the terminating null character) of the second string.
- * It returns null if either string is null.
- */
-
-PR_EXTERN(char *)
-PL_strnpbrk(const char *s, const char *list, PRUint32 n);
-
-/*
- * PL_strnprbrk
- *
- * Returns a pointer to the last instance (within the first n characters) of any
- * character (not including the terminating null character) of the second string.
- * It returns null if either string is null.
- */
-
-PR_EXTERN(char *)
-PL_strnprbrk(const char *s, const char *list, PRUint32 n);
-
-/*
- * PL_strstr
- *
- * Returns a pointer to the first instance of the little string within the
- * big one.  It returns null if either string is null.
- */
-
-PR_EXTERN(char *)
-PL_strstr(const char *big, const char *little);
-
-/*
- * PL_strrstr
- *
- * Returns a pointer to the last instance of the little string within the big one.
- * It returns null if either string is null.
- */
-
-PR_EXTERN(char *)
-PL_strrstr(const char *big, const char *little);
-
-/*
- * PL_strnstr
- *
- * Returns a pointer to the first instance of the little string within the first
- * n characters of the big one.  It returns null if either string is null.  It
- * returns null if the length of the little string is greater than n.
- */
-
-PR_EXTERN(char *)
-PL_strnstr(const char *big, const char *little, PRUint32 n);
-
-/*
- * PL_strnrstr
- *
- * Returns a pointer to the last instance of the little string within the first
- * n characters of the big one.  It returns null if either string is null.  It
- * returns null if the length of the little string is greater than n.
- */
-
-PR_EXTERN(char *)
-PL_strnrstr(const char *big, const char *little, PRUint32 max);
-
-/*
- * PL_strcasestr
- *
- * Returns a pointer to the first instance of the little string within the big one,
- * ignoring case.  It returns null if either string is null.
- */
-
-PR_EXTERN(char *)
-PL_strcasestr(const char *big, const char *little);
-
-/*
- * PL_strcaserstr
- *
- * Returns a pointer to the last instance of the little string within the big one,
- * ignoring case.  It returns null if either string is null.
- */
-
-PR_EXTERN(char *)
-PL_strcaserstr(const char *big, const char *little);
-
-/*
- * PL_strncasestr
- *
- * Returns a pointer to the first instance of the listtle string within the first
- * n characters of the big one, ignoring case.  It returns null if either string is 
- * null.  It returns null if the length of the little string is greater than n.
- */
-
-PR_EXTERN(char *)
-PL_strncasestr(const char *big, const char *little, PRUint32 max);
-
-/*
- * PL_strncaserstr
- *
- * Returns a pointer to the last instance of the little string within the first
- * n characters of the big one, ignoring case.  It returns null if either string is
- * null.  It returns null if the length of the little string is greater than n.
- */
-
-PR_EXTERN(char *)
-PL_strncaserstr(const char *big, const char *little, PRUint32 max);
-
-/*
- * Things not (yet?) included: strspn/strcspn, strtok/strtok_r, strsep.
- * memchr, memcmp, memcpy, memccpy, index, rindex, bcmp, bcopy, bzero.
- * Any and all i18n/l10n stuff.
- */
-
-PR_END_EXTERN_C
-
-#endif /* _plstr_h */
deleted file mode 100644
--- a/lib/libc/src/Makefile
+++ /dev/null
@@ -1,112 +0,0 @@
-#
-# The contents of this file are subject to the Netscape Public License
-# Version 1.0 (the "NPL"); you may not use this file except in
-# compliance with the NPL.  You may obtain a copy of the NPL at
-# http://www.mozilla.org/NPL/
-# 
-# Software distributed under the NPL is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
-# for the specific language governing rights and limitations under the
-# NPL.
-# 
-# The Initial Developer of this code under the NPL is Netscape
-# Communications Corporation.  Portions created by Netscape are
-# Copyright (C) 1998 Netscape Communications Corporation.  All Rights
-# Reserved.
-#
-
-#! gmake
-
-MOD_DEPTH = ../../..
-
-include $(MOD_DEPTH)/config/config.mk
-
-# Disable optimization of the nspr on SunOS4.1.3
-ifeq ($(OS_ARCH),SunOS)
-ifeq ($(OS_RELEASE),4.1.3_U1)
-OPTIMIZER =
-endif
-endif
-
-INCLUDES = -I$(DIST)/include
-
-CSRCS =\
-	strlen.c  \
-	strcpy.c  \
-	strdup.c  \
-	strcat.c  \
-	strcmp.c  \
-	strccmp.c \
-	strchr.c  \
-	strpbrk.c \
-	strstr.c  \
-	strcstr.c \
-	base64.c \
-	plerror.c \
-	plgetopt.c \
-	$(NULL)
-
-LIBRARY_NAME	= plc
-LIBRARY_VERSION	= $(MOD_VERSION)
-
-RELEASE_LIBS = $(TARGETS)
-
-ifeq ($(OS_ARCH),WINNT)
-ifeq (,$(filter-out WIN16 OS2,$(OS_TARGET)))
-EXTRA_LIBS = $(DIST)/lib/nspr$(MOD_VERSION).lib
-else
-DLLBASE=/BASE:0x30000000
-RES=$(OBJDIR)/plc.res
-RESNAME=$(MOD_DEPTH)/pr/src/nspr.rc
-EXTRA_LIBS = $(DIST)/lib/libnspr$(MOD_VERSION).lib
-
-ifdef MOZ_DEBUG
-ifdef GLOWCODE
-EXTRA_LIBS += $(GLOWDIR)/glowcode.lib
-endif
-endif
-
-endif
-else
-ifeq ($(OS_ARCH), AIX)
-ifeq ($(CLASSIC_NSPR),1)
-OS_LIBS += -lc
-else
-OS_LIBS += -lc_r
-endif
-endif
-ifeq ($(OS_ARCH)$(OS_RELEASE), AIX4.1)
-EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)_shr
-else
-EXTRA_LIBS = -L$(DIST)/lib -lnspr$(MOD_VERSION)
-endif
-endif
-
-# On NCR and SCOOS, we can't link with extra libraries when
-# we build a shared library.  If we do so, the linker doesn't
-# complain, but we would run into weird problems at run-time.
-# Therefore on these platforms, we link just the .o files.
-ifeq ($(OS_ARCH),NCR)
-EXTRA_LIBS =
-endif
-ifeq ($(OS_ARCH),SCOOS)
-EXTRA_LIBS =
-endif
-
-include $(MOD_DEPTH)/config/rules.mk
-
-#
-# The Client build wants the shared libraries in $(DIST)/bin,
-# so we also install them there.
-#
-
-export:: $(TARGETS)
-	$(INSTALL) -m 444 $(TARGETS) $(DIST)/lib
-	$(INSTALL) -m 444 $(SHARED_LIBRARY) $(DIST)/bin
-ifeq ($(MOZ_BITS),16)
-	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/lib
-	$(INSTALL) -m 444 $(TARGETS) $(MOZ_DIST)/bin
-endif
-
-install:: export
-
deleted file mode 100644
--- a/lib/libc/src/README
+++ /dev/null
@@ -1,20 +0,0 @@
-NSPR 2.0 libc functions
------------------------
-
-Last edited: AOF 04 March 1997
-
-This directory contains various libc-types of functions. All functions in
-this directory are platform independent, thread friendly (both safe and
-efficient). They are contributed from various sources, though the contri-
-butions are monitored by the NSPR group (mailto:freier).
-
-All API items exported by these functions will contain the same three
-character prefix, "PL_" (Portable Library). Internal function names
-that are not exported (static) are of little concern, though some caution
-must be used on those elements that are 'extern' but not really intended
-to be part of the API. Those should all have a prefix of "_PL_" (is that
-legal?).
-
-The responsibility for contributions in this area are distributed among
-all interested parties.
-
deleted file mode 100644
--- a/lib/libc/src/base64.c
+++ /dev/null
@@ -1,403 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Netscape Public License
- * Version 1.0 (the "NPL"); you may not use this file except in
- * compliance with the NPL.  You may obtain a copy of the NPL at
- * http://www.mozilla.org/NPL/
- * 
- * Software distributed under the NPL is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
- * for the specific language governing rights and limitations under the
- * NPL.
- * 
- * The Initial Developer of this code under the NPL is Netscape
- * Communications Corporation.  Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation.  All Rights
- * Reserved.
- */
-
-#include "plbase64.h"
-#include "prlog.h" /* For PR_NOT_REACHED */
-#include "prmem.h" /* for malloc / PR_MALLOC */
-#include "plstr.h" /* for PL_strlen */
-
-static unsigned char *base = (unsigned char *)"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
-
-static void
-encode3to4
-(
-    const unsigned char    *src,
-    unsigned char          *dest
-)
-{
-    PRUint32 b32 = (PRUint32)0;
-    PRIntn i, j = 18;
-
-    for( i = 0; i < 3; i++ )
-    {
-        b32 <<= 8;
-        b32 |= (PRUint32)src[i];
-    }
-
-    for( i = 0; i < 4; i++ )
-    {
-        dest[i] = base[ (PRUint32)((b32>>j) & 0x3F) ];
-        j -= 6;
-    }
-
-    return;
-}
-
-static void
-encode2to4
-(
-    const unsigned char    *src,
-    unsigned char          *dest
-)
-{
-    dest[0] = base[ (PRUint32)((src[0]>>2) & 0x3F) ];
-    dest[1] = base[ (PRUint32)(((src[0] & 0x03) << 4) | ((src[1] >> 4) & 0x0F)) ];
-    dest[2] = base[ (PRUint32)((src[1] & 0x0F) << 2) ];
-    dest[3] = (unsigned char)'=';
-    return;
-}
-
-static void
-encode1to4
-(
-    const unsigned char    *src,
-    unsigned char          *dest
-)
-{
-    dest[0] = base[ (PRUint32)((src[0]>>2) & 0x3F) ];
-    dest[1] = base[ (PRUint32)((src[0] & 0x03) << 4) ];
-    dest[2] = (unsigned char)'=';
-    dest[3] = (unsigned char)'=';
-    return;
-}
-
-static void
-encode
-(
-    const unsigned char    *src,
-    PRUint32                srclen,
-    unsigned char          *dest
-)
-{
-    while( srclen >= 3 )
-    {
-        encode3to4(src, dest);
-        src += 3;
-        dest += 4;
-        srclen -= 3;
-    }
-
-    switch( srclen )
-    {
-        case 2:
-            encode2to4(src, dest);
-            break;
-        case 1:
-            encode1to4(src, dest);
-            break;
-        case 0:
-            break;
-        default:
-            PR_NOT_REACHED("coding error");
-    }
-
-    return;
-}
-
-/*
- * PL_Base64Encode
- *
- * If the destination argument is NULL, a return buffer is 
- * allocated, and the data therein will be null-terminated.  
- * If the destination argument is not NULL, it is assumed to
- * be of sufficient size, and the contents will not be null-
- * terminated by this routine.
- *
- * Returns null if the allocation fails.
- */
-
-PR_IMPLEMENT(char *)
-PL_Base64Encode
-(
-    const char *src,
-    PRUint32    srclen,
-    char       *dest
-)
-{
-    if( 0 == srclen )
-    {
-        srclen = PL_strlen(src);
-    }
-
-    if( (char *)0 == dest )
-    {
-        PRUint32 destlen = ((srclen + 2)/3) * 4;
-        dest = (char *)PR_MALLOC(destlen + 1);
-        if( (char *)0 == dest )
-        {
-            return (char *)0;
-        }
-        dest[ destlen ] = (char)0; /* null terminate */
-    }
-
-    encode((const unsigned char *)src, srclen, (unsigned char *)dest);
-    return dest;
-}
-
-static PRInt32
-codetovalue
-(
-    unsigned char c
-)
-{
-    if( (c >= (unsigned char)'A') && (c <= (unsigned char)'Z') )
-    {
-        return (PRInt32)(c - (unsigned char)'A');
-    }
-    else if( (c >= (unsigned char)'a') && (c <= (unsigned char)'z') )
-    {
-        return ((PRInt32)(c - (unsigned char)'a') +26);
-    }
-    else if( (c >= (unsigned char)'0') && (c <= (unsigned char)'9') )
-    {
-        return ((PRInt32)(c - (unsigned char)'0') +52);
-    }
-    else if( (unsigned char)'+' == c )
-    {
-        return (PRInt32)62;
-    }
-    else if( (unsigned char)'/' == c )
-    {
-        return (PRInt32)63;
-    }
-    else
-    {
-        return -1;
-    }
-}
-
-static PRStatus
-decode4to3
-(
-    const unsigned char    *src,
-    unsigned char          *dest
-)
-{
-    PRUint32 b32 = (PRUint32)0;
-    PRInt32 bits;
-    PRIntn i;
-
-    for( i = 0; i < 4; i++ )
-    {
-        bits = codetovalue(src[i]);
-        if( bits < 0 )
-        {
-            return PR_FAILURE;
-        }
-
-        b32 <<= 6;
-        b32 |= bits;
-    }
-
-    dest[0] = (unsigned char)((b32 >> 16) & 0xFF);
-    dest[1] = (unsigned char)((b32 >>  8) & 0xFF);
-    dest[2] = (unsigned char)((b32      ) & 0xFF);
-
-    return PR_SUCCESS;
-}
-
-static PRStatus
-decode3to2
-(
-    const unsigned char    *src,
-    unsigned char          *dest
-)
-{
-    PRUint32 b32 = (PRUint32)0;
-    PRInt32 bits;
-    PRUint32 ubits;
-
-    bits = codetovalue(src[0]);
-    if( bits < 0 )
-    {
-        return PR_FAILURE;
-    }
-
-    b32 = (PRUint32)bits;
-    b32 <<= 6;
-
-    bits = codetovalue(src[1]);
-    if( bits < 0 )
-    {
-        return PR_FAILURE;
-    }
-
-    b32 |= (PRUint32)bits;
-    b32 <<= 4;
-
-    bits = codetovalue(src[2]);
-    if( bits < 0 )
-    {
-        return PR_FAILURE;
-    }
-
-    ubits = (PRUint32)bits;
-    b32 |= (ubits >> 2);
-
-    dest[0] = (unsigned char)((b32 >> 8) & 0xFF);
-    dest[1] = (unsigned char)((b32     ) & 0xFF);
-
-    return PR_SUCCESS;
-}
-
-static PRStatus
-decode2to1
-(
-    const unsigned char    *src,
-    unsigned char          *dest
-)
-{
-    PRUint32 b32;
-    PRUint32 ubits;
-    PRInt32 bits;
-
-    bits = codetovalue(src[0]);
-    if( bits < 0 )
-    {
-        return PR_FAILURE;
-    }
-
-    ubits = (PRUint32)bits;
-    b32 = (ubits << 2);
-
-    bits = codetovalue(src[1]);
-    if( bits < 0 )
-    {
-        return PR_FAILURE;
-    }
-
-    ubits = (PRUint32)bits;
-    b32 |= (ubits >> 4);
-
-    dest[0] = (unsigned char)b32;
-
-    return PR_SUCCESS;
-}
-
-static PRStatus
-decode
-(
-    const unsigned char    *src,
-    PRUint32                srclen,
-    unsigned char          *dest
-)
-{
-    PRStatus rv;
-
-    while( srclen >= 4 )
-    {
-        rv = decode4to3(src, dest);
-        if( PR_SUCCESS != rv )
-        {
-            return PR_FAILURE;
-        }
-
-        src += 4;
-        dest += 3;
-        srclen -= 4;
-    }
-
-    switch( srclen )
-    {
-        case 3:
-            rv = decode3to2(src, dest);
-            break;
-        case 2:
-            rv = decode2to1(src, dest);
-            break;
-        case 1:
-            rv = PR_FAILURE;
-            break;
-        case 0:
-            break;
-        default:
-            PR_NOT_REACHED("coding error");
-    }
-
-    return rv;
-}
-
-/*
- * PL_Base64Decode
- *
- * If the destination argument is NULL, a return buffer is
- * allocated and the data therein will be null-terminated.
- * If the destination argument is not null, it is assumed
- * to be of sufficient size, and the data will not be null-
- * terminated by this routine.
- * 
- * Returns null if the allocation fails,