Bug 476996: removed the remaining XP_MAC code. The patch is contributed by
authorwtc%google.com
Wed, 06 May 2009 05:40:39 +0000
changeset 4097 37e53a452fe0afd959f6c20a27a52af7380b47b5
parent 4096 b7966c70467bd0eca8b4f09766a2d20f40c7955c
child 4098 39bae99aadfd2436bebc5d257825b1b21230efbf
push idunknown
push userunknown
push dateunknown
bugs476996
Bug 476996: removed the remaining XP_MAC code. The patch is contributed by Zack Weinberg <zweinberg@mozilla.com>. r=wtc.
lib/ds/plarena.c
lib/ds/plhash.c
lib/msgc/src/prgcapi.c
lib/msgc/src/prmsgc.c
lib/msgc/tests/gc1.c
lib/msgc/tests/thrashgc.c
pr/include/obsolete/probslet.h
pr/include/obsolete/protypes.h
pr/include/prenv.h
pr/include/private/pprio.h
pr/include/private/pprthred.h
pr/include/private/primpl.h
pr/include/private/prpriv.h
pr/include/prtypes.h
pr/src/io/prfile.c
pr/src/io/prio.c
pr/src/io/prlog.c
pr/src/io/prmwait.c
pr/src/io/prsocket.c
pr/src/md/prosdep.c
pr/src/misc/pralarm.c
pr/src/misc/prenv.c
pr/src/misc/prinit.c
pr/src/misc/prolock.c
pr/src/misc/prsystem.c
pr/src/misc/prthinfo.c
pr/src/misc/prtime.c
pr/src/prvrsion.c
pr/src/threads/combined/prucpu.c
pr/src/threads/combined/prucv.c
pr/src/threads/combined/prulock.c
pr/src/threads/combined/pruthr.c
pr/src/threads/prcthr.c
pr/src/threads/prsem.c
pr/tests/accept.c
pr/tests/alarm.c
pr/tests/cltsrv.c
pr/tests/concur.c
pr/tests/cvar.c
pr/tests/cvar2.c
pr/tests/fileio.c
pr/tests/inrval.c
pr/tests/intrio.c
pr/tests/intrupt.c
pr/tests/io_timeout.c
pr/tests/join.c
pr/tests/joinkk.c
pr/tests/joinku.c
pr/tests/joinuk.c
pr/tests/joinuu.c
pr/tests/lock.c
pr/tests/lockfile.c
pr/tests/logger.c
pr/tests/nbconn.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/perf.c
pr/tests/poll_er.c
pr/tests/poll_nm.c
pr/tests/poll_to.c
pr/tests/priotest.c
pr/tests/provider.c
pr/tests/prpoll.c
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/sem.c
pr/tests/socket.c
pr/tests/sockopt.c
pr/tests/suspend.c
pr/tests/switch.c
pr/tests/testfile.c
pr/tests/threads.c
pr/tests/thrpool_client.c
pr/tests/thrpool_server.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/writev.c
pr/tests/y2k.c
--- a/lib/ds/plarena.c
+++ b/lib/ds/plarena.c
@@ -103,20 +103,16 @@ static void UnlockArena( void )
 {
     PR_Unlock( arenaLock );
     return;
 } /* end UnlockArena() */
 
 PR_IMPLEMENT(void) PL_InitArenaPool(
     PLArenaPool *pool, const char *name, PRUint32 size, PRUint32 align)
 {
-#if defined(XP_MAC)
-#pragma unused (name)
-#endif
-
     /*
      * Look-up table of PR_BITMASK(PR_CeilingLog2(align)) values for
      * align = 1 to 32.
      */
     static const PRUint8 pmasks[33] = {
          0,                                               /*  not used */
          0, 1, 3, 3, 7, 7, 7, 7,15,15,15,15,15,15,15,15,  /*  1 ... 16 */
         31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31}; /* 17 ... 32 */
@@ -340,27 +336,16 @@ PR_IMPLEMENT(void) PL_FinishArenaPool(PL
             }
         }
     }
 #endif
 }
 
 PR_IMPLEMENT(void) PL_CompactArenaPool(PLArenaPool *ap)
 {
-#if XP_MAC
-#pragma unused (ap)
-#if 0
-    PRArena *curr = &(ap->first);
-    while (curr) {
-        reallocSmaller(curr, curr->avail - (uprword_t)curr);
-        curr->limit = curr->avail;
-        curr = curr->next;
-    }
-#endif
-#endif
 }
 
 PR_IMPLEMENT(void) PL_ArenaFinish(void)
 {
     PLArena *a, *next;
 
     for (a = arena_freelist; a; a = next) {
         next = a->next;
--- a/lib/ds/plhash.c
+++ b/lib/ds/plhash.c
@@ -60,50 +60,34 @@
 #define UNDERLOADED(n)  (((n) > MINBUCKETS) ? ((n) >> 2) : 0)
 
 /*
 ** Stubs for default hash allocator ops.
 */
 static void * PR_CALLBACK
 DefaultAllocTable(void *pool, PRSize size)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     return PR_MALLOC(size);
 }
 
 static void PR_CALLBACK
 DefaultFreeTable(void *pool, void *item)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     PR_Free(item);
 }
 
 static PLHashEntry * PR_CALLBACK
 DefaultAllocEntry(void *pool, const void *key)
 {
-#if defined(XP_MAC)
-#pragma unused (pool,key)
-#endif
-
     return PR_NEW(PLHashEntry);
 }
 
 static void PR_CALLBACK
 DefaultFreeEntry(void *pool, PLHashEntry *he, PRUintn flag)
 {
-#if defined(XP_MAC)
-#pragma unused (pool)
-#endif
-
     if (flag == HT_FREE_ENTRY)
         PR_Free(he);
 }
 
 static PLHashAllocOps defaultHashAllocOps = {
     DefaultAllocTable, DefaultFreeTable,
     DefaultAllocEntry, DefaultFreeEntry
 };
--- a/lib/msgc/src/prgcapi.c
+++ b/lib/msgc/src/prgcapi.c
@@ -38,21 +38,17 @@
 #include <stdarg.h>
 #include <string.h>
 #include <stdio.h>
 #include "prenv.h"
 #include "prmem.h"
 #include "prmon.h"
 #include "prlog.h"
 #include "prthread.h"
-#if defined(XP_MAC)
-#include "pprthred.h"
-#else
 #include "private/pprthred.h"
-#endif
 #include "gcint.h"
 
 /*
 ** Generic GC implementation independent code for the NSPR GC
 */
 
 RootFinder *_pr_rootFinders;
 
@@ -77,20 +73,16 @@ GCLockHook *_pr_GCLockHook;
 
 extern PRLogModuleInfo *_pr_msgc_lm;
 
 /************************************************************************/
 
 static PRStatus PR_CALLBACK
 pr_ScanOneThread(PRThread* t, void** addr, PRUword count, void* closure)
 {
-#if defined(XP_MAC)
-#pragma unused (t, closure)
-#endif
-
     _pr_gcData.processRootBlock(addr, count);
     return PR_SUCCESS;
 }
 
 /*
 ** Scan all of the threads C stack's and registers, looking for "root"
 ** pointers into the GC heap. These are the objects that the GC cannot
 ** move and are considered "live" by the GC. Caller has stopped all of
--- a/lib/msgc/src/prmsgc.c
+++ b/lib/msgc/src/prmsgc.c
@@ -53,21 +53,17 @@
 #include "prgc.h"
 #include "prthread.h"
 #include "prlog.h"
 #include "prlong.h"
 #include "prinrval.h"
 #include "prprf.h"
 #include "gcint.h"
 
-#if defined(XP_MAC)
-#include "pprthred.h"
-#else
 #include "private/pprthred.h"
-#endif
 
 typedef void (*PRFileDumper)(FILE *out, PRBool detailed);
 
 PR_EXTERN(void)
 PR_DumpToFile(char* filename, char* msg, PRFileDumper dump, PRBool detailed);
 
 /*
 ** Mark&sweep garbage collector. Supports objects that require
@@ -125,21 +121,17 @@ static PRInt32 _pr_pageSize;
  * of the remainder, 2 are user defined. Max allocation size = 2^22 -1
  */
 
 #define MAX_ALLOC ( (1L << (PR_BYTES_PER_WORD_LOG2 + WORDS_BITS )) -1)
 
 /* The minimum percentage of free heap space after a collection. If
    the amount of free space doesn't meet this criteria then we will
    attempt to grow the heap */
-#ifdef XP_MAC
-#define MIN_FREE_THRESHOLD_AFTER_GC 10L
-#else
 #define MIN_FREE_THRESHOLD_AFTER_GC 20L
-#endif
 
 static PRInt32 segmentSize = SEGMENT_SIZE;
 
 static PRInt32 collectorCleanupNeeded;
 
 #ifdef GCMETER
 PRUint32 _pr_gcMeter;
 
@@ -1282,19 +1274,16 @@ static void PrepareFinalize(void)
 ** necessary because we might do a GC before objects that are on the
 ** final queue get finalized. Since there are no other references
 ** (otherwise they would be on the final queue), we have to scan them.
 ** This really only does work if we call the GC before the finalizer
 ** has a chance to do its job.
 */
 extern void PR_CALLBACK _PR_ScanFinalQueue(void *notused)
 {
-#ifdef XP_MAC
-#pragma unused (notused)
-#endif
     PRCList *qp;
     GCFinal *fp;
     PRWord *p;
     void ( PR_CALLBACK *livePointer)(void *ptr);
 
     livePointer = _pr_gcData.livePointer;
     qp = _pr_finalQueue.next;
     while (qp != &_pr_finalQueue) {
@@ -1303,19 +1292,16 @@ extern void PR_CALLBACK _PR_ScanFinalQue
         p = &fp->object[1];
     (*livePointer)(p);
     qp = qp->next;
     }
 }
 
 void PR_CALLBACK FinalizerLoop(void* unused)
 {
-#ifdef XP_MAC
-#pragma unused (unused)
-#endif
     GCFinal *fp;
     PRWord *p;
     PRWord h, tix;
     CollectorType *ct;
 
     LOCK_GC();
     for (;;) {
 	p = 0; h = 0;		/* don't let the gc find these pointers */
@@ -1416,19 +1402,16 @@ PRCList _pr_freeWeakLinks = PR_INIT_STAT
 
 #define WEAK_FREELIST_ISEMPTY() (_pr_freeWeakLinks.next == &_pr_freeWeakLinks)
 
 /*
  * Keep objects referred to by weak free list alive until they can be
  * freed
  */
 static void PR_CALLBACK ScanWeakFreeList(void *notused) {
-#ifdef XP_MAC
-#pragma unused (notused)
-#endif
     PRCList *qp = _pr_freeWeakLinks.next;
     while (qp != &_pr_freeWeakLinks) {
     GCWeak *wp = WeakPtr(qp);
     qp = qp->next;
     ProcessRootPointer(wp->object);
     }
 }
 
@@ -1946,20 +1929,16 @@ pr_DumpUnknown(FILE *out, GCType* tp, PR
     fprintf(out, "UNKNOWN KIND %ld\n", (long) tix);
     if (detailed)
     PR_DumpHexWords(out, p, bytes>>2, 22, 4);
 }
 
 static void PR_CALLBACK
 pr_DumpFree(FILE *out, PRWord *p, size_t size, PRBool detailed)
 {
-#if defined(XP_MAC) && XP_MAC
-# pragma unused( detailed )
-#endif
-
     fprintf(out, "0x%p: 0x%.6lX -  FREE\n", p, (long) size);
 }
 
 static void PR_CALLBACK
 pr_DumpSegment(FILE* out, GCSeg* sp, PRBool detailed)
 {
     pr_WalkSegment(out, sp, detailed,
            "\n   Address: Length\n0x%p: Beginning of segment\n",
@@ -1998,19 +1977,16 @@ PR_DumpMemory(PRBool detailed)
     PR_DumpToFile("memory.out", "Dumping memory", PR_DumpGCHeap, detailed);
 }
 
 /******************************************************************************/
 
 static PRInt32 PR_CALLBACK
 pr_DumpRootPointer(PRWord* p, void* data)
 {
-#ifdef XP_MAC
-#pragma unused(data)
-#endif
     PRWord h = p[0];
     PRWord tix = GET_TYPEIX(h);
       size_t bytes = OBJ_BYTES(h);
       
       GCType* tp = &_pr_collectorTypes[tix].gctype;
       if (0 != tp)
       pr_DumpObject(_pr_gcData.dumpOutput, tp, p, bytes, PR_FALSE);
       else
@@ -2084,20 +2060,16 @@ PR_RegisterSummaryPrinter(PRSummaryPrint
     summaryPrinter = fun;
     summaryPrinterClosure = closure;
 }
 
 static void PR_CALLBACK
 pr_SummarizeObject(FILE *out, GCType* tp, PRWord *p,
            size_t bytes, PRBool detailed)
 {
-#if defined(XP_MAC) && XP_MAC
-# pragma unused( out, detailed )
-#endif
-
     if (tp->summarize)
     (*tp->summarize)((void GCPTR*)(p + 1), bytes);
 }
 
 static void PR_CALLBACK
 pr_DumpSummary(FILE* out, GCSeg* sp, PRBool detailed)
 {
     pr_WalkSegment(out, sp, detailed, NULL, NULL,
--- a/lib/msgc/tests/gc1.c
+++ b/lib/msgc/tests/gc1.c
@@ -40,31 +40,21 @@
 ***********************************************************************/
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include "prgc.h"
 #include "prinit.h"
 #include "prmon.h"
 #include "prinrval.h"
-#ifndef XP_MAC
 #include "private/pprthred.h"
-#else
-#include "pprthred.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static PRMonitor *mon;
 static PRInt32 threads, waiting, iterations;
 static PRInt32 scanCount, finalizeCount, freeCount;
 
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 
@@ -188,21 +178,16 @@ int main(int argc, char **argv)
 
     fprintf(stderr, "t is %ld, i is %ld\n", (long) threads, (long) iterations);
 	/* main test */
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 5);
     PR_STDIO_INIT();
     Initialize();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("gc1.log");
-	debug_mode = 1;
-#endif
-
     /* Spin all of the allocator threads and then wait for them to exit */
     start = PR_IntervalNow();
     mon = PR_NewMonitor();
     PR_EnterMonitor(mon);
     waiting = 0;
     for (i = 0; i < threads; i++) {
         (void) PR_CreateThreadGCAble(PR_USER_THREAD,
                                AllocateLikeMad, (void*)iterations,
--- a/lib/msgc/tests/thrashgc.c
+++ b/lib/msgc/tests/thrashgc.c
@@ -55,33 +55,23 @@
 #include "prthread.h"
 #include "prgc.h"
 #include "prprf.h"
 #include "prinrval.h"
 #include "prlock.h"
 #include "prinit.h"
 #include "prcvar.h"
 
-#ifndef XP_MAC
 #include "private/pprthred.h"
-#else
-#include "pprthred.h"
-#endif
 
 #include <stdio.h>
 #include <memory.h>
 #include <string.h>
 
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 static char* progname;
 static PRInt32 loops = 1000;
 static int tix1, tix2, tix3;
 static GCInfo* gcInfo;
 static PRLock* stderrLock;
@@ -164,38 +154,29 @@ static void PR_CALLBACK AllocStuff(void 
       danglingRefs[49] = p;
     }
   }
   end = PR_IntervalNow();
   if (debug_mode) PR_snprintf(msg, sizeof(msg), "Thread %p: %ld allocations took %ld ms",
 	      PR_GetCurrentThread(), loops,
 	      PR_IntervalToMilliseconds((PRIntervalTime) (end - start)));
   PR_Lock(stderrLock);
-#ifndef XP_MAC
   fprintf(stderr, "%s\n", msg);
-#else
-  if (debug_mode) printf("%s\n", msg);
-#endif
   PR_Unlock(stderrLock);
   }
 
 static void usage(char *progname) {
-#ifndef XP_MAC
   fprintf(stderr, "Usage: %s [-t threads] [-l loops]\n", progname);
-#else
-  printf("Usage: %s [-t threads] [-l loops]\n", progname);
-#endif
   exit(-1);
 }
 
 static int realMain(int argc, char **argv, char *notused) {
   int i;
   int threads = 0;
 
-#ifndef XP_MAC
   progname = strrchr(argv[0], '/');
   if (progname == 0) progname = argv[0];
   for (i = 1; i < argc; i++) {
     if (strcmp(argv[i], "-t") == 0) {
       if (i == argc - 1) {
 	usage(progname);
       }
       threads = atoi(argv[++i]);
@@ -207,39 +188,31 @@ static int realMain(int argc, char **arg
       if (i == argc - 1) {
 	usage(progname);
       }
       loops = atoi(argv[++i]);
       continue;
     }
     usage(progname);
   }
-#else
-	threads = 50;
-#endif
 
   for (i = 0; i < threads; i++) {
     PRThread* thread;
 
     /* XXXXX */
     thread = PR_CreateThreadGCAble(PR_USER_THREAD,  /* thread type */
 			     AllocStuff,  /* start function */
 			     NULL,  /* arg */
 			     PR_PRIORITY_NORMAL,  /* priority */
 			     PR_LOCAL_THREAD,  /* thread scope */
 			     PR_UNJOINABLE_THREAD,  /* thread state */
 			     0);   /* stack size */
     if (thread == 0) {
-#ifndef XP_MAC
       fprintf(stderr, "%s: no more threads (only %d were created)\n",
 	      progname, i);
-#else
-      printf("%s: no more threads (only %d were created)\n",
-	      progname, i);
-#endif
       break;
     }
   }
   AllocStuff(NULL);
   return 0;
 }
 
 static int padMain(int argc, char **argv) {
@@ -250,21 +223,16 @@ static int padMain(int argc, char **argv
 int main(int argc, char **argv) {
   int rv;
 
   debug_mode = 1;
   
   PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
   PR_SetThreadGCAble();
 
-#ifdef XP_MAC
-  SetupMacPrintfLog("thrashgc.log");
-  debug_mode = 1;
-#endif
-
   PR_InitGC(0, 0, 0, PR_GLOBAL_THREAD);
   PR_STDIO_INIT();
   stderrLock = PR_NewLock();
   tix1 = PR_RegisterType(&type1);
   tix2 = PR_RegisterType(&type2);
   tix3 = PR_RegisterType(&type3);
   gcInfo = PR_GetGCInfo();
   rv = padMain(argc, argv);
--- a/pr/include/obsolete/probslet.h
+++ b/pr/include/obsolete/probslet.h
@@ -164,21 +164,17 @@ NSPR_API(PRInt32)     PR_FD_NISSET(PROsf
 ** declared here for historical reasons.
 */
 
 NSPR_API(PRInt32) PR_GetSysfdTableMax(void);
 
 NSPR_API(PRInt32) PR_SetSysfdTableSize(PRIntn table_size);
 
 #ifndef NO_NSPR_10_SUPPORT
-#ifdef XP_MAC
-#include <stat.h>
-#else
 #include <sys/stat.h>
-#endif
 
 NSPR_API(PRInt32) PR_Stat(const char *path, struct stat *buf);
 #endif /* NO_NSPR_10_SUPPORT */
 
 PR_END_EXTERN_C
 
 #endif /* defined(PROBSLET_H) */
 
--- a/pr/include/obsolete/protypes.h
+++ b/pr/include/obsolete/protypes.h
@@ -98,17 +98,17 @@ typedef PRUintn uint;
 typedef PRUint64 uint64;
 #endif
 
 /*
  * uint32
  */
 
 #if !defined(XP_BEOS)
-#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
+#if !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
 typedef PRUint32 uint32;
 #else
 typedef unsigned long uint32;
 #endif
 #endif
 
 /*
  * uint16
@@ -135,17 +135,17 @@ typedef PRInt64 int64;
 #endif
 
 /*
  * int32
  */
 
 #if !defined(XP_BEOS) && !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
     && !defined(HPUX)
-#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
+#if !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
 typedef PRInt32 int32;
 #else
 typedef long int32;
 #endif
 #endif
 
 /*
  * int16
@@ -221,18 +221,9 @@ typedef PRWord prword_t;
 #define PR_HashTableRemove PL_HashTableRemove
 #define PR_HashTableEnumerateEntries PL_HashTableEnumerateEntries
 #define PR_HashTableLookup PL_HashTableLookup
 #define PR_HashTableDump PL_HashTableDump
 #define PR_HashString PL_HashString
 #define PR_CompareStrings PL_CompareStrings
 #define PR_CompareValues PL_CompareValues
 
-#if defined(XP_MAC)
-#ifndef TRUE				/* Mac standard is lower case true */
-	#define TRUE 1
-#endif
-#ifndef FALSE				/* Mac standard is lower case false */
-	#define FALSE 0
-#endif
-#endif
-
 #endif /* !defined(PROTYPES_H) */
--- a/pr/include/prenv.h
+++ b/pr/include/prenv.h
@@ -140,18 +140,11 @@ NSPR_API(char*) PR_GetEnv(const char *va
 ** Restrictions: 
 **   See the Restrictions documented in the description of
 **   PR_GetEnv() in this header file.
 ** 
 ** 
 */
 NSPR_API(PRStatus) PR_SetEnv(const char *string);
 
-/*
-** DEPRECATED.  Use PR_SetEnv() instead.
-*/
-#ifdef XP_MAC
-NSPR_API(PRIntn) PR_PutEnv(const char *string);
-#endif
-
 PR_END_EXTERN_C
 
 #endif /* prenv_h___ */
--- a/pr/include/private/pprio.h
+++ b/pr/include/private/pprio.h
@@ -264,20 +264,11 @@ NSPR_API(void) PR_NTFast_UpdateAcceptCon
 ** DESCRIPTION:
 **    Cancel IO operations on fd.
 */
 NSPR_API(PRStatus) PR_NT_CancelIo(PRFileDesc *fd);
 
 
 #endif /* WIN32 */
 
-/*
-** Need external access to this on Mac so we can first set up our faux
-** environment vars
-*/
-#ifdef XP_MAC
-NSPR_API(void) PR_Init_Log(void);
-#endif
-
-
 PR_END_EXTERN_C
 
 #endif /* pprio_h___ */
--- a/pr/include/private/pprthred.h
+++ b/pr/include/private/pprthred.h
@@ -308,26 +308,16 @@ NSPR_API(PRIntn) PR_GetMonitorEntryCount
 
 /*
 ** Just like PR_CEnterMonitor except that if the monitor is owned by
 ** another thread NULL is returned.
 */
 NSPR_API(PRMonitor*) PR_CTestAndEnterMonitor(void *address);
 
 /*---------------------------------------------------------------------------
-** PLATFORM-SPECIFIC THREAD SYNCHRONIZATION FUNCTIONS
----------------------------------------------------------------------------*/
-#if defined(XP_MAC)
-
-NSPR_API(void) PR_Mac_WaitForAsyncNotify(PRIntervalTime timeout);
-NSPR_API(void) PR_Mac_PostAsyncNotify(PRThread *thread);
-
-#endif /* XP_MAC */
-
-/*---------------------------------------------------------------------------
 ** PLATFORM-SPECIFIC INITIALIZATION FUNCTIONS
 ---------------------------------------------------------------------------*/
 #if defined(IRIX)
 /*
 ** Irix specific initialization funtion to be called before PR_Init
 ** is called by the application. Sets the CONF_INITUSERS and CONF_INITSIZE
 ** attributes of the shared arena set up by nspr.
 **
--- a/pr/include/private/primpl.h
+++ b/pr/include/private/primpl.h
@@ -68,23 +68,18 @@
 #endif
 #endif /* WIN32 */
 
 #include "nspr.h"
 #include "prpriv.h"
 
 typedef struct PRSegment PRSegment;
 
-#ifdef XP_MAC
-#include "prosdep.h"
-#include "probslet.h"
-#else
 #include "md/prosdep.h"
 #include "obsolete/probslet.h"
-#endif  /* XP_MAC */
 
 #ifdef _PR_HAVE_POSIX_SEMAPHORES
 #include <semaphore.h>
 #elif defined(_PR_HAVE_SYSV_SEMAPHORES)
 #include <sys/sem.h>
 #endif
 
 /*************************************************************************
@@ -323,20 +318,18 @@ NSPR_API(PRInt32)                      _
 
 #define _MD_CURRENT_CPU()               (_pr_currentCPU)
 #define _MD_SET_CURRENT_CPU(_cpu)       (_pr_currentCPU = (_cpu))
 #define _MD_CURRENT_THREAD()            (_pr_currentThread)
 #define _MD_SET_CURRENT_THREAD(_thread) (_pr_currentThread = (_thread))
 #define _MD_LAST_THREAD()               (_pr_lastThread)
 #define _MD_SET_LAST_THREAD(t)          (_pr_lastThread = t)
 
-#ifndef XP_MAC
 #define _MD_GET_INTSOFF()               (_pr_intsOff)
 #define _MD_SET_INTSOFF(_val)           (_pr_intsOff = _val)
-#endif
 
 
 /* The unbalanced curly braces in these two macros are intentional */
 #define _PR_LOCK_HEAP() { PRIntn _is; if (_pr_currentCPU) _PR_INTSOFF(_is);
 #define _PR_UNLOCK_HEAP() if (_pr_currentCPU) _PR_INTSON(_is); }
 
 #endif /* _PR_LOCAL_THREADS_ONLY */
 
@@ -371,30 +364,22 @@ extern PRInt32                  _native_
 
 #define _PR_THREAD_SWITCH_CPU(_thread, _newCPU)
 
 #define _PR_IS_NATIVE_THREAD(thread) 1
 #define _PR_IS_NATIVE_THREAD_SUPPORTED() 1
 
 #else
 
-#ifdef XP_MAC
-
-#define _PR_INTSOFF(_is)        _MD_INTSOFF(_is)
-
-#else /* XP_MAC */
-
 #define _PR_INTSOFF(_is) \
     PR_BEGIN_MACRO \
         (_is) = _PR_MD_GET_INTSOFF(); \
         _PR_MD_SET_INTSOFF(1); \
     PR_END_MACRO
 
-#endif /* XP_MAC */
-
 #define _PR_FAST_INTSON(_is) \
     PR_BEGIN_MACRO \
         _PR_MD_SET_INTSOFF(_is); \
     PR_END_MACRO
 
 #define _PR_INTSON(_is) \
     PR_BEGIN_MACRO \
         if ((_is == 0) && (_PR_MD_CURRENT_CPU())->u.bits) \
@@ -1086,21 +1071,16 @@ extern PRStatus _PR_MD_CLOSE_SEMAPHORE(P
 
 extern PRStatus _PR_MD_DELETE_SEMAPHORE(const char *osname);
 #define    _PR_MD_DELETE_SEMAPHORE _MD_DELETE_SEMAPHORE
 
 /* I/O related */
 extern void _PR_MD_INIT_FILEDESC(PRFileDesc *fd);
 #define    _PR_MD_INIT_FILEDESC _MD_INIT_FILEDESC
 
-#ifdef XP_MAC
-extern void _PR_MD_FREE_FILEDESC(PRFileDesc *fd);
-#define    _PR_MD_FREE_FILEDESC _MD_FREE_FILEDESC
-#endif
-
 extern void _PR_MD_MAKE_NONBLOCK(PRFileDesc *fd);
 #define    _PR_MD_MAKE_NONBLOCK _MD_MAKE_NONBLOCK
 
 /* File I/O related */
 extern PROsfd _PR_MD_OPEN(const char *name, PRIntn osflags, PRIntn mode);
 #define    _PR_MD_OPEN _MD_OPEN
 
 extern PROsfd _PR_MD_OPEN_FILE(const char *name, PRIntn osflags, PRIntn mode);
--- a/pr/include/private/prpriv.h
+++ b/pr/include/private/prpriv.h
@@ -37,17 +37,12 @@
 
 #ifndef prpriv_h___
 #define prpriv_h___
 
 /*
  * NSPR 2.0 Private API
  */
 
-#ifndef XP_MAC
 #include "private/pprio.h"
 #include "private/pprthred.h"
-#else
-#include "pprio.h"
-#include "pprthred.h"
-#endif
 
 #endif /* prpriv_h___ */
--- a/pr/include/prtypes.h
+++ b/pr/include/prtypes.h
@@ -107,32 +107,16 @@
 #define PR_IMPLEMENT(__type) __declspec(dllexport) __type
 #define PR_EXTERN_DATA(__type) extern __declspec(dllexport) __type
 #define PR_IMPLEMENT_DATA(__type) __declspec(dllexport) __type
 
 #define PR_CALLBACK
 #define PR_CALLBACK_DECL
 #define PR_STATIC_CALLBACK(__x) static __x
 
-#elif defined(XP_MAC)
-
-#define PR_EXPORT(__type) extern __declspec(export) __type
-#define PR_EXPORT_DATA(__type) extern __declspec(export) __type
-#define PR_IMPORT(__type) extern __declspec(export) __type
-#define PR_IMPORT_DATA(__type) extern __declspec(export) __type
-
-#define PR_EXTERN(__type) extern __declspec(export) __type
-#define PR_IMPLEMENT(__type) __declspec(export) __type
-#define PR_EXTERN_DATA(__type) extern __declspec(export) __type
-#define PR_IMPLEMENT_DATA(__type) __declspec(export) __type
-
-#define PR_CALLBACK
-#define PR_CALLBACK_DECL
-#define PR_STATIC_CALLBACK(__x) static __x
-
 #elif defined(XP_OS2) && defined(__declspec)
 
 #define PR_EXPORT(__type) extern __declspec(dllexport) __type
 #define PR_EXPORT_DATA(__type) extern __declspec(dllexport) __type
 #define PR_IMPORT(__type) extern  __declspec(dllimport) __type
 #define PR_IMPORT_DATA(__type) extern __declspec(dllimport) __type
 
 #define PR_EXTERN(__type) extern __declspec(dllexport) __type
@@ -463,17 +447,17 @@ typedef PRUint8 PRPackedBool;
 /*
 ** Status code used by some routines that have a single point of failure or 
 ** special status return.
 */
 typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
 
 #ifndef __PRUNICHAR__
 #define __PRUNICHAR__
-#if defined(WIN32) || defined(XP_MAC)
+#ifdef WIN32
 typedef wchar_t PRUnichar;
 #else
 typedef PRUint16 PRUnichar;
 #endif
 #endif
 
 /*
 ** WARNING: The undocumented data types PRWord and PRUword are
@@ -525,21 +509,17 @@ typedef unsigned long PRUword;
 #ifdef __cplusplus
 #define NSPR_BEGIN_EXTERN_C     extern "C" {
 #define NSPR_END_EXTERN_C       }
 #else
 #define NSPR_BEGIN_EXTERN_C
 #define NSPR_END_EXTERN_C
 #endif
 
-#ifdef XP_MAC
-#include "protypes.h"
-#else
 #include "obsolete/protypes.h"
-#endif
 
 /********* ????????????? End Fix me ?????????????????????????????? *****/
 #endif /* NO_NSPR_10_SUPPORT */
 
 PR_END_EXTERN_C
 
 #endif /* prtypes_h___ */
 
--- a/pr/src/io/prfile.c
+++ b/pr/src/io/prfile.c
@@ -127,19 +127,16 @@ static PROffset32 PR_CALLBACK FileSeek(P
     PROffset32 result;
 
     result = _PR_MD_LSEEK(fd, offset, whence);
     return result;
 }
 
 static PROffset64 PR_CALLBACK FileSeek64(PRFileDesc *fd, PROffset64 offset, PRSeekWhence whence)
 {
-#ifdef XP_MAC
-#pragma unused( fd, offset, whence )
-#endif
     PROffset64 result;
 
     result = _PR_MD_LSEEK64(fd, offset, whence);
     return result;
 }
 
 static PRInt32 PR_CALLBACK FileAvailable(PRFileDesc *fd)
 {
@@ -157,19 +154,16 @@ static PRInt32 PR_CALLBACK FileAvailable
     result = end - cur;
     _PR_MD_LSEEK(fd, cur, PR_SEEK_SET);
 
     return result;
 }
 
 static PRInt64 PR_CALLBACK FileAvailable64(PRFileDesc *fd)
 {
-#ifdef XP_MAC
-#pragma unused( fd )
-#endif
     PRInt64 result, cur, end;
     PRInt64 minus_one;
 
     LL_I2L(minus_one, -1);
     cur = _PR_MD_LSEEK64(fd, LL_ZERO, PR_SEEK_CUR);
 
     if (LL_GE_ZERO(cur))
     	end = _PR_MD_LSEEK64(fd, LL_ZERO, PR_SEEK_END);
@@ -193,39 +187,32 @@ static PRInt64 PR_CALLBACK PipeAvailable
 {
     PRInt64 rv;
     LL_I2L(rv, _PR_MD_PIPEAVAILABLE(fd));
 	return rv;		
 }
 
 static PRStatus PR_CALLBACK PipeSync(PRFileDesc *fd)
 {
-#if defined(XP_MAC)
-#pragma unused (fd)
-#endif
-
 	return PR_SUCCESS;
 }
 
 static PRStatus PR_CALLBACK FileGetInfo(PRFileDesc *fd, PRFileInfo *info)
 {
 	PRInt32 rv;
 
     rv = _PR_MD_GETOPENFILEINFO(fd, info);
     if (rv < 0) {
 	return PR_FAILURE;
     } else
 	return PR_SUCCESS;
 }
 
 static PRStatus PR_CALLBACK FileGetInfo64(PRFileDesc *fd, PRFileInfo64 *info)
 {
-#ifdef XP_MAC
-#pragma unused( fd, info )
-#endif
     /* $$$$ NOT YET IMPLEMENTED */
 	PRInt32 rv;
 
     rv = _PR_MD_GETOPENFILEINFO64(fd, info);
     if (rv < 0) return PR_FAILURE;
     else return PR_SUCCESS;
 }
 
@@ -256,19 +243,16 @@ static PRStatus PR_CALLBACK FileClose(PR
     }
     PR_FreeFileDesc(fd);
     return PR_SUCCESS;
 }
 
 static PRInt16 PR_CALLBACK FilePoll(
     PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)
 {
-#ifdef XP_MAC
-#pragma unused( fd, in_flags )
-#endif
     *out_flags = 0;
     return in_flags;
 }  /* FilePoll */
 
 static PRIOMethods _pr_fileMethods = {
     PR_DESC_FILE,
     FileClose,
     FileRead,
@@ -431,17 +415,17 @@ PR_IMPLEMENT(PRInt32) PR_GetSysfdTableMa
     return 16384;
 #elif defined (WIN16)
     return FOPEN_MAX;
 #elif defined(XP_OS2)
     ULONG ulReqCount = 0;
     ULONG ulCurMaxFH = 0;
     DosSetRelMaxFH(&ulReqCount, &ulCurMaxFH);
     return ulCurMaxFH;
-#elif defined (XP_MAC) || defined(XP_BEOS)
+#elif defined(XP_BEOS)
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
    return -1;
 #else
     write me;
 #endif
 }
 
 PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(int table_size)
@@ -480,20 +464,16 @@ PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSi
       else
         return -1;
     } 
     return tableMax;
 #elif defined(AIX) || defined(NEXTSTEP) || defined(QNX) \
         || defined(WIN32) || defined(WIN16) || defined(XP_BEOS)
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return -1;
-#elif defined (XP_MAC)
-#pragma unused (table_size)
-    PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
-   return -1;
 #else
     write me;
 #endif
 }
 
 PR_IMPLEMENT(PRStatus) PR_Delete(const char *name)
 {
 	PRInt32 rv;
@@ -513,19 +493,16 @@ PR_IMPLEMENT(PRStatus) PR_GetFileInfo(co
 	if (rv < 0) {
 		return PR_FAILURE;
 	} else
 		return PR_SUCCESS;
 }
 
 PR_IMPLEMENT(PRStatus) PR_GetFileInfo64(const char *fn, PRFileInfo64 *info)
 {
-#ifdef XP_MAC
-#pragma unused (fn, info)
-#endif
     PRInt32 rv;
 
     if (!_pr_initialized) _PR_ImplicitInitialization();
     rv = _PR_MD_GETFILEINFO64(fn, info);
     if (rv < 0) {
         return PR_FAILURE;
     } else {
         return PR_SUCCESS;
@@ -710,20 +687,16 @@ PR_IMPLEMENT(PRStatus) PR_UnlockFile(PRF
     return rv;
 }
 
 PR_IMPLEMENT(PRStatus) PR_CreatePipe(
     PRFileDesc **readPipe,
     PRFileDesc **writePipe
 )
 {
-#if defined(XP_MAC)
-#pragma unused (readPipe, writePipe)
-#endif
-
 #if defined(WIN32) && !defined(WINCE)
     HANDLE readEnd, writeEnd;
     SECURITY_ATTRIBUTES pipeAttributes;
 
     if (!_pr_initialized) _PR_ImplicitInitialization();
 
     ZeroMemory(&pipeAttributes, sizeof(pipeAttributes));
     pipeAttributes.nLength = sizeof(pipeAttributes);
@@ -822,19 +795,16 @@ PR_IMPLEMENT(PRFileDesc*) PR_OpenFileUTF
             _PR_MD_INIT_FD_INHERITABLE(fd, PR_FALSE);
         }
     }
     return fd;
 }
  
 PR_IMPLEMENT(PRStatus) PR_GetFileInfo64UTF16(const PRUnichar *fn, PRFileInfo64 *info)
 {
-#ifdef XP_MAC
-#pragma unused (fn, info)
-#endif
     PRInt32 rv;
 
     if (!_pr_initialized) _PR_ImplicitInitialization();
     rv = _PR_MD_GETFILEINFO64_UTF16(fn, info);
     if (rv < 0) {
         return PR_FAILURE;
     } else {
         return PR_SUCCESS;
--- a/pr/src/io/prio.c
+++ b/pr/src/io/prio.c
@@ -157,19 +157,16 @@ PR_IMPLEMENT(PRFileDesc*) PR_AllocFileDe
     }
 
     return fd;
 }
 
 PR_IMPLEMENT(void) PR_FreeFileDesc(PRFileDesc *fd)
 {
     PR_ASSERT(fd);
-#ifdef XP_MAC
-	_PR_MD_FREE_FILEDESC(fd);
-#endif
     _PR_Putfd(fd);
 }
 
 /*
 ** Wait for some i/o to finish on one or more more poll descriptors.
 */
 PR_IMPLEMENT(PRInt32) PR_Poll(PRPollDesc *pds, PRIntn npds, PRIntervalTime timeout)
 {
@@ -195,19 +192,16 @@ PR_IMPLEMENT(PRStatus) PR_SetFDInheritab
     if (fd->secret->inheritable != inheritable) {
         if (_PR_MD_SET_FD_INHERITABLE(fd, inheritable) == PR_FAILURE) {
             return PR_FAILURE;
         }
         fd->secret->inheritable = inheritable;
     }
     return PR_SUCCESS;
 #else
-#ifdef XP_MAC
-#pragma unused (fd, inheritable)
-#endif
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return PR_FAILURE;
 #endif
 }
 
 /*
 ** This function only has a useful implementation in the debug build of
 ** the pthreads version.
--- a/pr/src/io/prlog.c
+++ b/pr/src/io/prlog.c
@@ -123,18 +123,16 @@ static void OutputDebugStringA(const cha
         fwrite(buf, 1, nb, fd); \
         fflush(fd); \
     } \
     PR_END_MACRO
 #elif defined(_PR_USE_STDIO_FOR_LOGGING)
 #define _PUT_LOG(fd, buf, nb) {fwrite(buf, 1, nb, fd); fflush(fd);}
 #elif defined(_PR_PTHREADS)
 #define _PUT_LOG(fd, buf, nb) PR_Write(fd, buf, nb)
-#elif defined(XP_MAC)
-#define _PUT_LOG(fd, buf, nb) _PR_MD_WRITE_SYNC(fd, buf, nb)
 #else
 #define _PUT_LOG(fd, buf, nb) _PR_MD_WRITE(fd, buf, nb)
 #endif
 
 /************************************************************************/
 
 static PRLogModuleInfo *logModules;
 
@@ -414,19 +412,16 @@ PR_IMPLEMENT(PRBool) PR_SetLogFile(const
     PRFileDesc *newLogFile;
 
     newLogFile = PR_Open(file, PR_WRONLY|PR_CREATE_FILE|PR_TRUNCATE, 0666);
     if (newLogFile) {
         if (logFile && logFile != _pr_stdout && logFile != _pr_stderr) {
             PR_Close(logFile);
         }
         logFile = newLogFile;
-#if defined(XP_MAC)
-        SetLogFileTypeCreator(file);
-#endif
     }
     return (PRBool) (newLogFile != 0);
 #endif /* _PR_USE_STDIO_FOR_LOGGING */
 }
 
 PR_IMPLEMENT(void) PR_SetLogBuffering(PRIntn buffer_size)
 {
     PR_LogFlush();
@@ -544,28 +539,16 @@ PR_IMPLEMENT(void) PR_Abort(void)
 }
 
 PR_IMPLEMENT(void) PR_Assert(const char *s, const char *file, PRIntn ln)
 {
     PR_LogPrint("Assertion failure: %s, at %s:%d\n", s, file, ln);
 #if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
     fprintf(stderr, "Assertion failure: %s, at %s:%d\n", s, file, ln);
 #endif
-#ifdef XP_MAC
-    dprintf("Assertion failure: %s, at %s:%d\n", s, file, ln);
-#endif
 #ifdef WIN32
     DebugBreak();
 #endif
 #ifdef XP_OS2
     asm("int $3");
 #endif
-#ifndef XP_MAC
     abort();
-#endif
 }
-
-#ifdef XP_MAC
-PR_IMPLEMENT(void) PR_Init_Log(void)
-{
-	_PR_InitLog();
-}
-#endif
--- a/pr/src/io/prmwait.c
+++ b/pr/src/io/prmwait.c
@@ -1270,19 +1270,16 @@ invalid_arg:
 #endif
     PR_Unlock(group->ml);
 
     return recv_wait;
 }  /* PR_CancelWaitGroup */
 
 PR_IMPLEMENT(PRWaitGroup*) PR_CreateWaitGroup(PRInt32 size /* ignored */)
 {
-#ifdef XP_MAC
-#pragma unused (size)
-#endif
     PRWaitGroup *wg;
 
     if (NULL == (wg = PR_NEWZAP(PRWaitGroup)))
     {
         PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
         goto failed;
     }
     /* the wait group itself */
--- a/pr/src/io/prsocket.c
+++ b/pr/src/io/prsocket.c
@@ -350,24 +350,16 @@ static PRStatus PR_CALLBACK SocketConnec
 
     err = _MD_os2_get_nonblocking_connect_error(osfd);
     if (err != 0) {
         _PR_MD_MAP_CONNECT_ERROR(err);
         return PR_FAILURE;
     }
     return PR_SUCCESS;
 
-#elif defined(XP_MAC)
-
-    err = _MD_mac_get_nonblocking_connect_error(fd);
-    if (err == -1)
-        return PR_FAILURE;
-	else     
-		return PR_SUCCESS;
-
 #elif defined(XP_BEOS)
 
 #ifdef BONE_VERSION  /* bug 122364 */
     /* temporary workaround until getsockopt(SO_ERROR) works in BONE */
     if (out_flags & PR_POLL_EXCEPT) {
         PR_SetError(PR_CONNECT_REFUSED_ERROR, 0);
         return PR_FAILURE;
     }
@@ -760,20 +752,16 @@ static PRInt64 PR_CALLBACK SocketAvailab
     }
 #endif
     LL_I2L(rv, _PR_MD_SOCKETAVAILABLE(fd));
 	return rv;		
 }
 
 static PRStatus PR_CALLBACK SocketSync(PRFileDesc *fd)
 {
-#if defined(XP_MAC)
-#pragma unused (fd)
-#endif
-
 	return PR_SUCCESS;
 }
 
 static PRInt32 PR_CALLBACK SocketSendTo(
     PRFileDesc *fd, const void *buf, PRInt32 amount,
     PRIntn flags, const PRNetAddr *addr, PRIntervalTime timeout)
 {
 	PRInt32 temp, count;
@@ -1112,19 +1100,16 @@ static PRStatus PR_CALLBACK SocketGetPee
 	PR_ASSERT(IsValidNetAddr(addr) == PR_TRUE);
 	PR_ASSERT(IsValidNetAddrLen(addr, addrlen) == PR_TRUE);
 	return PR_SUCCESS;
 }
 
 static PRInt16 PR_CALLBACK SocketPoll(
     PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)
 {
-#ifdef XP_MAC
-#pragma unused( fd, in_flags )
-#endif
     *out_flags = 0;
     return in_flags;
 }  /* SocketPoll */
 
 static PRIOMethods tcpMethods = {
 	PR_DESC_SOCKET_TCP,
 	SocketClose,
 	SocketRead,
@@ -1679,21 +1664,17 @@ PR_IMPLEMENT(PRInt32) PR_FD_NISSET(PROsf
 		if (set->narray[index] == fd) {
 			return 1;
 		}
 	return 0;
 }
 
 
 #if !defined(NEED_SELECT)
-#if !defined(XP_MAC)
 #include "obsolete/probslet.h"
-#else
-#include "probslet.h"
-#endif
 
 #define PD_INCR 20
 
 static PRPollDesc *_pr_setfd(
     PR_fd_set *set, PRInt16 flags, PRPollDesc *polldesc)
 {
     PRUintn fsidx, pdidx;
     PRPollDesc *poll = polldesc;
--- a/pr/src/md/prosdep.c
+++ b/pr/src/md/prosdep.c
@@ -71,20 +71,16 @@ static void GetPageSize(void)
 #elif defined(HPUX)
     /* I have no idea. Don't get me started. --Rob */
     _pr_pageSize = sysconf(_SC_PAGE_SIZE);
 #else
     _pr_pageSize = sysconf(_SC_PAGESIZE);
 #endif
 #endif /* XP_UNIX */
 
-#ifdef XP_MAC
-    _pr_pageSize = 4096;
-#endif /* XP_MAC */
-
 #ifdef XP_BEOS
     _pr_pageSize = B_PAGE_SIZE;
 #endif
 
 #ifdef XP_PC
 #ifdef _WIN32
     SYSTEM_INFO info;
     GetSystemInfo(&info);
--- a/pr/src/misc/pralarm.c
+++ b/pr/src/misc/pralarm.c
@@ -36,21 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "primpl.h"
 
 /**********************************************************************/
 /******************************* PRALARM ******************************/
 /**********************************************************************/
 
-#ifdef XP_MAC
-#include "pralarm.h"
-#else
 #include "obsolete/pralarm.h"
-#endif
 
 struct PRAlarmID {                       /* typedef'd in pralarm.h       */
     PRCList list;                        /* circular list linkage        */
     PRAlarm *alarm;                      /* back pointer to owning alarm */
     PRPeriodicAlarmFn function;          /* function to call for notify  */
     void *clientData;                    /* opaque client context        */
     PRIntervalTime period;               /* the client defined period    */
     PRUint32 rate;                       /* rate of notification         */
--- a/pr/src/misc/prenv.c
+++ b/pr/src/misc/prenv.c
@@ -92,18 +92,8 @@ PR_IMPLEMENT(PRStatus) PR_SetEnv(const c
 
     if ( !strchr(string, '=')) return(PR_FAILURE);
 
     _PR_LOCK_ENV();
     result = _PR_MD_PUT_ENV(string);
     _PR_UNLOCK_ENV();
     return (result)? PR_FAILURE : PR_SUCCESS;
 }
-
-/*
-** DEPRECATED.  Use PR_SetEnv() instead.
-*/
-#ifdef XP_MAC
-PR_IMPLEMENT(PRIntn) PR_PutEnv(const char *string)
-{
-    return (PR_SetEnv(string) == PR_SUCCESS) ? PR_TRUE : PR_FALSE;
-}
-#endif
--- a/pr/src/misc/prinit.c
+++ b/pr/src/misc/prinit.c
@@ -290,30 +290,22 @@ PR_IMPLEMENT(void) PR_UnblockClockInterr
 #if !defined(_PR_PTHREADS) && !defined(_PR_BTHREADS)
     	_PR_MD_UNBLOCK_CLOCK_INTERRUPTS();
 #endif
 }
 
 PR_IMPLEMENT(void) PR_Init(
     PRThreadType type, PRThreadPriority priority, PRUintn maxPTDs)
 {
-#if defined(XP_MAC)
-#pragma unused (type, priority, maxPTDs)
-#endif
-
     _PR_ImplicitInitialization();
 }
 
 PR_IMPLEMENT(PRIntn) PR_Initialize(
     PRPrimordialFn prmain, PRIntn argc, char **argv, PRUintn maxPTDs)
 {
-#if defined(XP_MAC)
-#pragma unused (maxPTDs)
-#endif
-
     PRIntn rv;
     _PR_ImplicitInitialization();
     rv = prmain(argc, argv);
 	PR_Cleanup();
     return rv;
 }  /* PR_Initialize */
 
 /*
@@ -852,22 +844,18 @@ PR_IMPLEMENT(PRStatus) PR_CallOnceWithAr
         }
     }
     return once->status;
 }
 
 PRBool _PR_Obsolete(const char *obsolete, const char *preferred)
 {
 #if defined(DEBUG)
-#ifndef XP_MAC
     PR_fprintf(
         PR_STDERR, "'%s' is obsolete. Use '%s' instead.\n",
         obsolete, (NULL == preferred) ? "something else" : preferred);
-#else
-#pragma unused (obsolete, preferred)
-#endif
 #endif
     return PR_FALSE;
 }  /* _PR_Obsolete */
 
 /* prinit.c */
 
 
--- a/pr/src/misc/prolock.c
+++ b/pr/src/misc/prolock.c
@@ -46,55 +46,43 @@
 #include "prerror.h"
 
 PR_IMPLEMENT(PROrderedLock *) 
     PR_CreateOrderedLock( 
         PRInt32 order,
         const char *name
 )
 {
-#ifdef XP_MAC
-#pragma unused( order, name )
-#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return NULL;
 } /*  end PR_CreateOrderedLock() */
 
 
 PR_IMPLEMENT(void) 
     PR_DestroyOrderedLock( 
         PROrderedLock *lock 
 )
 {
-#ifdef XP_MAC
-#pragma unused( lock )
-#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
 } /*  end PR_DestroyOrderedLock() */
 
 
 PR_IMPLEMENT(void) 
     PR_LockOrderedLock( 
         PROrderedLock *lock 
 )
 {
-#ifdef XP_MAC
-#pragma unused( lock )
-#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
 } /*  end PR_LockOrderedLock() */
 
 
 PR_IMPLEMENT(PRStatus) 
     PR_UnlockOrderedLock( 
         PROrderedLock *lock 
 )
 {
-#ifdef XP_MAC
-#pragma unused( lock )
-#endif
     PR_ASSERT(!"Not implemented"); /* Not implemented yet */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return PR_FAILURE;
 } /*  end PR_UnlockOrderedLock() */
--- a/pr/src/misc/prsystem.c
+++ b/pr/src/misc/prsystem.c
@@ -221,22 +221,16 @@ PR_IMPLEMENT(PRStatus) PR_GetSystemInfo(
 PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void )
 {
     PRInt32     numCpus;
 #if defined(WIN32)
     SYSTEM_INFO     info;
 
     GetSystemInfo( &info );
     numCpus = info.dwNumberOfProcessors;
-#elif defined(XP_MAC)
-/* Hard-code the number of processors to 1 on the Mac
-** MacOS/9 will always be 1. The MPProcessors() call is for
-** MacOS/X, when issued. Leave it commented out for now. */
-/*  numCpus = MPProcessors(); */
-    numCpus = 1;
 #elif defined(BEOS)
     system_info sysInfo;
 
     get_system_info(&sysInfo);
     numCpus = sysInfo.cpu_count;
 #elif defined(OS2)
     DosQuerySysInfo( QSV_NUMPROCESSORS, QSV_NUMPROCESSORS, &numCpus, sizeof(numCpus));
 #elif defined(_PR_HAVE_SYSCTL)
--- a/pr/src/misc/prthinfo.c
+++ b/pr/src/misc/prthinfo.c
@@ -32,21 +32,17 @@
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "prlog.h"
 #include "prthread.h"
-#ifdef XP_MAC
-#include "pprthred.h"
-#else
 #include "private/pprthred.h"
-#endif
 #include "primpl.h"
 
 PR_IMPLEMENT(PRWord *)
 PR_GetGCRegisters(PRThread *t, int isCurrent, int *np)
 {
     return _MD_HomeGCRegisters(t, isCurrent, np);
 }
 
@@ -170,19 +166,16 @@ PR_ThreadScanStackPointers(PRThread* t,
 typedef struct PRScanStackData {
     PRScanStackFun      scanFun;
     void*               scanClosure;
 } PRScanStackData;
 
 static PRStatus PR_CALLBACK
 pr_ScanStack(PRThread* t, int i, void* arg)
 {
-#if defined(XP_MAC)
-#pragma unused (i)
-#endif
     PRScanStackData* data = (PRScanStackData*)arg;
     return PR_ThreadScanStackPointers(t, data->scanFun, data->scanClosure);
 }
 
 PR_IMPLEMENT(PRStatus)
 PR_ScanStackPointers(PRScanStackFun scanFun, void* scanClosure)
 {
     PRScanStackData data;
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -524,20 +524,16 @@ PR_NormalizeTime(PRExplodedTime *time, P
         (localtime_r(timer, result) == -1 ? NULL: result)
 
 #elif defined(HAVE_POINTER_LOCALTIME_R)
 
 #define MT_safe_localtime localtime_r
 
 #else
 
-#if defined(XP_MAC)
-extern struct tm *Maclocaltime(const time_t * t);
-#endif
-
 #define HAVE_LOCALTIME_MONITOR 1  /* We use 'monitor' to serialize our calls
                                    * to localtime(). */
 static PRLock *monitor = NULL;
 
 static struct tm *MT_safe_localtime(const time_t *clock, struct tm *result)
 {
     struct tm *tmPtr;
     int needLock = PR_Initialized();  /* We need to use a lock to protect
@@ -557,21 +553,17 @@ static struct tm *MT_safe_localtime(cons
      * We have to manually check (WIN16 only) for negative value of
      * clock and return NULL.
      *
      * With negative values of clock, OS/2 returns the struct tm for
      * clock plus ULONG_MAX. So we also have to check for the invalid
      * structs returned for timezones west of Greenwich when clock == 0.
      */
     
-#if defined(XP_MAC)
-    tmPtr = Maclocaltime(clock);
-#else
     tmPtr = localtime(clock);
-#endif
 
 #if defined(WIN16) || defined(XP_OS2)
     if ( (PRInt32) *clock < 0 ||
          ( (PRInt32) *clock == 0 && tmPtr->tm_year != 70))
         result = NULL;
     else
         *result = *tmPtr;
 #else
@@ -903,20 +895,16 @@ PR_USPacificTimeParameters(const PRExplo
  *     Trivially, both the tp_gmt_offset and tp_dst_offset fields are 0.
  *
  *------------------------------------------------------------------------
  */
 
 PR_IMPLEMENT(PRTimeParameters)
 PR_GMTParameters(const PRExplodedTime *gmt)
 {
-#if defined(XP_MAC)
-#pragma unused (gmt)
-#endif
-
     PRTimeParameters retVal = { 0, 0 };
     return retVal;
 }
 
 /*
  * The following code implements PR_ParseTimeString().  It is based on
  * ns/lib/xp/xp_time.c, revision 1.25, by Jamie Zawinski <jwz@netscape.com>.
  */
--- a/pr/src/prvrsion.c
+++ b/pr/src/prvrsion.c
@@ -36,19 +36,17 @@
  * ***** END LICENSE BLOCK ***** */
 
 #include "prinit.h"
 #include "prvrsion.h"
 
 /************************************************************************/
 /**************************IDENTITY AND VERSIONING***********************/
 /************************************************************************/
-#ifndef XP_MAC
 #include "_pr_bld.h"
-#endif
 #if !defined(_BUILD_TIME)
 #ifdef HAVE_LONG_LONG
 #define _BUILD_TIME 0
 #else
 #define _BUILD_TIME {0, 0}
 #endif
 #endif
 #if !defined(_BUILD_STRING)
--- a/pr/src/threads/combined/prucpu.c
+++ b/pr/src/threads/combined/prucpu.c
@@ -387,19 +387,16 @@ static void PR_CALLBACK _PR_CPU_Idle(voi
 		if (!_PR_IS_NATIVE_THREAD(me)) _PR_FAST_INTSON(is);
     }
 }
 #endif /* _PR_GLOBAL_THREADS_ONLY */
 
 PR_IMPLEMENT(void) PR_SetConcurrency(PRUintn numCPUs)
 {
 #if defined(_PR_GLOBAL_THREADS_ONLY) || defined(_PR_LOCAL_THREADS_ONLY)
-#ifdef XP_MAC 
-#pragma unused(numCPUs) 
-#endif
 
     /* do nothing */
 
 #else /* combined, MxN thread model */
 
     PRUintn newCPU;
     _PRCPU *cpu;
     PRThread *thr;
--- a/pr/src/threads/combined/prucv.c
+++ b/pr/src/threads/combined/prucv.c
@@ -294,19 +294,17 @@ void _PR_NotifyCondVar(PRCondVar *cvar, 
 
     if ( !_PR_IS_NATIVE_THREAD(me))
     	_PR_INTSOFF(is);
     PR_ASSERT(_PR_IS_NATIVE_THREAD(me) || _PR_MD_GET_INTSOFF() != 0);
 
     _PR_CVAR_LOCK(cvar);
     q = cvar->condQ.next;
     while (q != &cvar->condQ) {
-#ifndef XP_MAC
         PR_LOG(_pr_cvar_lm, PR_LOG_MIN, ("_PR_NotifyCondVar: cvar=%p", cvar));
-#endif
         if (_PR_THREAD_CONDQ_PTR(q)->wait.cvar)  {
             if (_PR_NotifyThread(_PR_THREAD_CONDQ_PTR(q), me) == PR_TRUE)
                 break;
         }
         q = q->next;
     }
     _PR_CVAR_UNLOCK(cvar);
 
@@ -343,20 +341,18 @@ void _PR_ClockInterrupt(void)
     PRIntervalTime elapsed, now;
  
     PR_ASSERT(_PR_MD_GET_INTSOFF() != 0);
     /* Figure out how much time elapsed since the last clock tick */
     now = PR_IntervalNow();
     elapsed = now - cpu->last_clock;
     cpu->last_clock = now;
 
-#ifndef XP_MAC
     PR_LOG(_pr_clock_lm, PR_LOG_MAX,
 	   ("ExpireWaits: elapsed=%lld usec", elapsed));
-#endif
 
     while(1) {
         _PR_SLEEPQ_LOCK(cpu);
         if (_PR_SLEEPQ(cpu).next == &_PR_SLEEPQ(cpu)) {
             _PR_SLEEPQ_UNLOCK(cpu);
             break;
         }
 
--- a/pr/src/threads/combined/prulock.c
+++ b/pr/src/threads/combined/prulock.c
@@ -61,19 +61,17 @@ void _PR_IntsOn(_PRCPU *cpu)
 {
     PRUintn missed, pri, i;
     _PRInterruptTable *it;
     PRThread *me;
 
     PR_ASSERT(cpu);   /* Global threads don't have CPUs */
     PR_ASSERT(_PR_MD_GET_INTSOFF() > 0);
 	me = _PR_MD_CURRENT_THREAD();
-#if !defined(XP_MAC)
     PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
-#endif
 
     /*
     ** Process delayed interrupts. This logic is kinda scary because we
     ** need to avoid losing an interrupt (it's ok to delay an interrupt
     ** until later).
     **
     ** There are two missed state words. _pr_ints.where indicates to the
     ** interrupt handler which state word is currently safe for
@@ -87,20 +85,18 @@ void _PR_IntsOn(_PRCPU *cpu)
     */
     for (i = 0; i < 2; i++) {
         cpu->where = (1 - i);
         missed = cpu->u.missed[i];
         if (missed != 0) {
             cpu->u.missed[i] = 0;
             for (it = _pr_interruptTable; it->name; it++) {
                 if (missed & it->missed_bit) {
-#ifndef XP_MAC
                     PR_LOG(_pr_sched_lm, PR_LOG_MIN,
                            ("IntsOn[0]: %s intr", it->name));
-#endif
                     (*it->handler)();
                 }
             }
         }
     }
 
     if (cpu->u.missed[3] != 0) {
         _PRCPU *cpu;
@@ -225,19 +221,17 @@ extern PRThread *suspendAllThread;
 PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
 {
     PRThread *me = _PR_MD_CURRENT_THREAD();
     PRIntn is;
     PRThread *t;
     PRCList *q;
 
     PR_ASSERT(me != suspendAllThread); 
-#if !defined(XP_MAC)
     PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
-#endif
     PR_ASSERT(lock != NULL);
 #ifdef _PR_GLOBAL_THREADS_ONLY 
     PR_ASSERT(lock->owner != me);
     _PR_MD_LOCK(&lock->ilock);
     lock->owner = me;
     return;
 #else  /* _PR_GLOBAL_THREADS_ONLY */
 
@@ -338,19 +332,17 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock 
     PRCList *q;
     PRThreadPriority pri, boost;
     PRIntn is;
     PRThread *me = _PR_MD_CURRENT_THREAD();
 
     PR_ASSERT(lock != NULL);
     PR_ASSERT(lock->owner == me);
     PR_ASSERT(me != suspendAllThread); 
-#if !defined(XP_MAC)
     PR_ASSERT(!(me->flags & _PR_IDLE_THREAD));
-#endif
     if (lock->owner != me) {
         return PR_FAILURE;
     }
 
 #ifdef _PR_GLOBAL_THREADS_ONLY 
     lock->owner = 0;
     _PR_MD_UNLOCK(&lock->ilock);
     return PR_SUCCESS;
--- a/pr/src/threads/combined/pruthr.c
+++ b/pr/src/threads/combined/pruthr.c
@@ -44,20 +44,16 @@
 ** Some local variables report warnings on Win95 because the code paths
 ** using them are conditioned on HAVE_CUSTOME_USER_THREADS.
 ** The pragma suppresses the warning.
 **
 */
 #pragma warning(disable : 4101)
 #endif          
 
-#if defined(XP_MAC)
-#include <LowMem.h>
-#endif
-
 /* _pr_activeLock protects the following global variables */
 PRLock *_pr_activeLock;
 PRInt32 _pr_primordialExitCount;   /* In PR_Cleanup(), the primordial thread
                     * waits until all other user (non-system)
                     * threads have terminated before it exits.
                     * So whenever we decrement _pr_userActive,
                     * it is compared with
                     * _pr_primordialExitCount.
@@ -93,36 +89,30 @@ static void _PR_DecrActiveThreadCount(PR
 static PRThread *_PR_AttachThread(PRThreadType, PRThreadPriority, PRThreadStack *);
 static void _PR_InitializeNativeStack(PRThreadStack *ts);
 static void _PR_InitializeRecycledThread(PRThread *thread);
 static void _PR_UserRunThread(void);
 
 void _PR_InitThreads(PRThreadType type, PRThreadPriority priority,
     PRUintn maxPTDs)
 {
-#if defined(XP_MAC)
-#pragma unused (maxPTDs)
-#endif
-
     PRThread *thread;
     PRThreadStack *stack;
 
     _pr_terminationCVLock = PR_NewLock();
     _pr_activeLock = PR_NewLock();
 
 #ifndef HAVE_CUSTOM_USER_THREADS
     stack = PR_NEWZAP(PRThreadStack);
 #ifdef HAVE_STACK_GROWING_UP
     stack->stackTop = (char*) ((((long)&type) >> _pr_pageShift)
                   << _pr_pageShift);
 #else
 #if defined(SOLARIS) || defined (UNIXWARE) && defined (USR_SVR4_THREADS)
     stack->stackTop = (char*) &thread;
-#elif defined(XP_MAC)
-    stack->stackTop = (char*) LMGetCurStackBase();
 #else
     stack->stackTop = (char*) ((((long)&type + _pr_pageSize - 1)
                 >> _pr_pageShift) << _pr_pageShift);
 #endif
 #endif
 #else
     /* If stack is NULL, we're using custom user threads like NT fibers. */
     stack = PR_NEWZAP(PRThreadStack);
@@ -918,19 +908,17 @@ void _PR_Schedule(void)
     if (r & (1 << pri)) {
             for (qp = _PR_RUNQ(cpu)[pri].next; 
                  qp != &_PR_RUNQ(cpu)[pri];
                  qp = qp->next) {
                 thread = _PR_THREAD_PTR(qp);
                 /*
                 * skip non-schedulable threads
                 */
-#if !defined(XP_MAC)
                 PR_ASSERT(!(thread->flags & _PR_IDLE_THREAD));
-#endif
                 if ((thread->no_sched) && (me != thread)){
                     thread = NULL;
                     continue;
                 } else {
                     /* Pull thread off of its run queue */
                     _PR_DEL_RUNQ(thread);
                     _PR_RUNQ_UNLOCK(cpu);
                     goto found_thread;
@@ -1000,20 +988,16 @@ found_thread:
 ** Attaches a thread.  
 ** Does not set the _PR_MD_CURRENT_THREAD.  
 ** Does not specify the scope of the thread.
 */
 static PRThread *
 _PR_AttachThread(PRThreadType type, PRThreadPriority priority,
     PRThreadStack *stack)
 {
-#if defined(XP_MAC)
-#pragma unused (type)
-#endif
-
     PRThread *thread;
     char *mem;
 
     if (priority > PR_PRIORITY_LAST) {
         priority = PR_PRIORITY_LAST;
     } else if (priority < PR_PRIORITY_FIRST) {
         priority = PR_PRIORITY_FIRST;
     }
@@ -1042,20 +1026,16 @@ PR_IMPLEMENT(PRThread*)
                      void (*start)(void *arg),
                      void *arg,
                      PRThreadPriority priority,
                      PRThreadScope scope,
                      PRThreadState state,
                      PRUint32 stackSize,
                      PRUint32 flags)
 {
-#if defined(XP_MAC)
-#pragma unused (scope)
-#endif
-
     PRThread *thread;
 
     thread = _PR_AttachThread(type, priority, NULL);
 
     if (thread) {
         PR_Lock(_pr_activeLock);
         thread->flags = (flags | _PR_GLOBAL_SCOPE);
         thread->id = ++_pr_utid;
@@ -1499,19 +1479,16 @@ PRThread* _PRI_AttachThread(PRThreadType
         }
     }
     return thread;
 }
 
 PR_IMPLEMENT(PRThread*) PR_AttachThread(PRThreadType type,
     PRThreadPriority priority, PRThreadStack *stack)
 {
-#ifdef XP_MAC
-#pragma unused( type, priority, stack )
-#endif
     return PR_GetCurrentThread();
 }
 
 PR_IMPLEMENT(void) PR_DetachThread(void)
 {
     /*
      * On IRIX, Solaris, and Windows, foreign threads are detached when
      * they terminate.
--- a/pr/src/threads/prcthr.c
+++ b/pr/src/threads/prcthr.c
@@ -299,39 +299,29 @@ PR_IMPLEMENT(void) SetExecutionEnvironme
 }
 
 
 PR_IMPLEMENT(PRInt32) PR_GetThreadAffinityMask(PRThread *thread, PRUint32 *mask)
 {
 #ifdef HAVE_THREAD_AFFINITY
     return _PR_MD_GETTHREADAFFINITYMASK(thread, mask);
 #else
-
-#if defined(XP_MAC)
-#pragma unused (thread, mask)
-#endif
-
     return 0;
 #endif
 }
 
 PR_IMPLEMENT(PRInt32) PR_SetThreadAffinityMask(PRThread *thread, PRUint32 mask )
 {
 #ifdef HAVE_THREAD_AFFINITY
 #ifndef IRIX
     return _PR_MD_SETTHREADAFFINITYMASK(thread, mask);
 #else
 	return 0;
 #endif
 #else
-
-#if defined(XP_MAC)
-#pragma unused (thread, mask)
-#endif
-
     return 0;
 #endif
 }
 
 /* This call is thread unsafe if another thread is calling SetConcurrency()
  */
 PR_IMPLEMENT(PRInt32) PR_SetCPUAffinityMask(PRUint32 mask)
 {
@@ -349,20 +339,16 @@ PR_IMPLEMENT(PRInt32) PR_SetCPUAffinityM
 
         cpu = _PR_CPU_PTR(qp);
         PR_SetThreadAffinityMask(cpu->thread, mask);
 
         qp = qp->next;
     }
 #endif
 
-#if defined(XP_MAC)
-#pragma unused (mask)
-#endif
-
     return 0;
 }
 
 PRUint32 _pr_recycleThreads = 0;
 PR_IMPLEMENT(void) PR_SetThreadRecycleMode(PRUint32 count)
 {
     _pr_recycleThreads = count;
 }
@@ -392,19 +378,16 @@ PR_IMPLEMENT(PRThread*) PR_CreateThreadB
                             stackSize, _PR_BOUND_THREAD);
 }
 #endif
 
 
 PR_IMPLEMENT(PRThread*) PR_AttachThreadGCAble(
     PRThreadType type, PRThreadPriority priority, PRThreadStack *stack)
 {
-#ifdef XP_MAC
-#pragma unused (type, priority, stack)
-#endif
     /* $$$$ not sure how to finese this one */
     PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
     return NULL;
 }
 
 PR_IMPLEMENT(void) PR_SetThreadGCAble()
 {
     if (!_pr_initialized) _PR_ImplicitInitialization();
@@ -418,19 +401,16 @@ PR_IMPLEMENT(void) PR_ClearThreadGCAble(
     if (!_pr_initialized) _PR_ImplicitInitialization();
     PR_Lock(_pr_activeLock);
         _PR_MD_CURRENT_THREAD()->flags &= (~_PR_GCABLE_THREAD);
         PR_Unlock(_pr_activeLock);
 }
 
 PR_IMPLEMENT(PRThreadScope) PR_GetThreadScope(const PRThread *thread)
 {
-#ifdef XP_MAC
-#pragma unused( thread )
-#endif
     if (!_pr_initialized) _PR_ImplicitInitialization();
 
     if (_PR_IS_NATIVE_THREAD(thread)) {
     	return (thread->flags & _PR_BOUND_THREAD) ? PR_GLOBAL_BOUND_THREAD :
 										PR_GLOBAL_THREAD;
     } else
         return PR_LOCAL_THREAD;
 }
--- a/pr/src/threads/prsem.c
+++ b/pr/src/threads/prsem.c
@@ -31,21 +31,17 @@
  * decision by deleting the provisions above and replace them with the notice
  * and other provisions required by the GPL or the LGPL. If you do not delete
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "primpl.h"
-#if defined(XP_MAC)
-#include "prsem.h"
-#else
 #include "obsolete/prsem.h"
-#endif
 
 /************************************************************************/
 
 /*
 ** Create a new semaphore.
 */
 PR_IMPLEMENT(PRSemaphore*) PR_NewSem(PRUintn value)
 {
--- a/pr/tests/accept.c
+++ b/pr/tests/accept.c
@@ -78,17 +78,17 @@
 #define ACCEPT_READ_FAST_CB    0x5
 
 #define CLIENT_NORMAL        0x1
 #define CLIENT_TIMEOUT_ACCEPT    0x2
 #define CLIENT_TIMEOUT_SEND    0x3
 
 #define SERVER_MAX_BIND_COUNT        100
 
-#if defined(XP_MAC) || defined(XP_OS2) || defined(SYMBIAN)
+#if defined(XP_OS2) || defined(SYMBIAN)
 #define TIMEOUTSECS 10
 #else
 #define TIMEOUTSECS 2
 #endif
 PRIntervalTime timeoutTime;
 
 static PRInt32 count = 1;
 static PRFileDesc *output;
@@ -484,21 +484,16 @@ int main(int argc, char **argv)
         }
     }
     PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     output = PR_STDERR;
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("accept.log");
-    debug_mode = 1;
-#endif
-
     timeoutTime = PR_SecondsToInterval(TIMEOUTSECS);
     if (debug_mode)
         PR_fprintf(output, "\nRun accept() sucessful connection tests\n");
 
     Measure(AcceptUpdatedTest, "PR_Accept()");
     Measure(AcceptReadTest, "PR_AcceptRead()");
 #ifdef WINNT
     Measure(AcceptNotUpdatedTest, "PR_NTFast_Accept()");
--- a/pr/tests/alarm.c
+++ b/pr/tests/alarm.c
@@ -53,42 +53,32 @@
 ***********************************************************************/
 
 /***********************************************************************
 ** Includes
 ***********************************************************************/
 
 #include "prlog.h"
 #include "prinit.h"
-#ifdef XP_MAC
-#include "pralarm.h"
-#else
 #include "obsolete/pralarm.h"
-#endif
 #include "prlock.h"
 #include "prlong.h"
 #include "prcvar.h"
 #include "prinrval.h"
 #include "prtime.h"
 
 /* Used to get the command line option */
 #include "plgetopt.h"
 #include <stdio.h>
 #include <stdlib.h>
 
 #if defined(XP_UNIX)
 #include <sys/time.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static PRIntn debug_mode;
 static PRIntn failed_already=0;
 static PRThreadScope thread_scope = PR_LOCAL_THREAD;
 
 typedef struct notifyData {
     PRLock *ml;
     PRCondVar *child;
     PRCondVar *parent;
@@ -291,20 +281,16 @@ static PRIntervalTime Alarms1(PRUint32 l
     PR_DestroyLock(ml);
     overhead += (PR_IntervalNow() - timein);
     
     return duration + overhead;
 }  /* Alarms1 */
 
 static PRBool AlarmFn2(PRAlarmID *id, void *clientData, PRUint32 late)
 {
-#if defined(XP_MAC)
-#pragma unused (id)
-#endif
-
     PRBool keepGoing;
     PRStatus rv = PR_SUCCESS;
     AlarmData *ad = (AlarmData*)clientData;
     PRIntervalTime interval, now = PR_IntervalNow();
 
     PR_Lock(ad->ml);
     ad->times += 1;
     keepGoing = ((PRIntervalTime)(now - ad->timein) < ad->duration) ?
@@ -529,20 +515,16 @@ int prmain(int argc, char** argv)
     if (cpus == 0) cpus = 1;
     if (loops == 0) loops = 4;
 
 	if (debug_mode)
 		printf("Alarm: Using %d loops\n", loops);
 
 	if (debug_mode)		
         printf("Alarm: Using %d cpu(s)\n", cpus);
-#ifdef XP_MAC
-	SetupMacPrintfLog("alarm.log");
-	debug_mode = 1;
-#endif
 
     for (cpu = 1; cpu <= cpus; ++cpu)
     {
     if (debug_mode)
         printf("\nAlarm: Using %d CPU(s)\n", cpu);
 
 	PR_SetConcurrency(cpu);
         
--- a/pr/tests/cltsrv.c
+++ b/pr/tests/cltsrv.c
@@ -77,26 +77,20 @@
 
 #include "plstr.h"
 #include "plerror.h"
 #include "plgetopt.h"
 
 #include <stdlib.h>
 #include <string.h>
 
-
 #if defined(XP_UNIX)
 #include <math.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 /*
 ** This is the beginning of the test
 */
 
 #define RECV_FLAGS 0
 #define SEND_FLAGS 0
 #define DEFAULT_LOW 0
 #define DEFAULT_HIGH 0
@@ -1028,20 +1022,16 @@ int main(int argc, char** argv)
     PR_STDIO_INIT();
     TimeOfDayMessage("Client/Server started at", PR_GetCurrentThread());
 
     cltsrv_log_file = PR_NewLogModule("cltsrv_log");
     MY_ASSERT(NULL != cltsrv_log_file);
     boolean = PR_SetLogFile("cltsrv.log");
     MY_ASSERT(boolean);
 
-#ifdef XP_MAC
-    debug_mode = PR_TRUE;
-#endif
-
     rv = PR_SetFDCacheSize(low, high);
     PR_ASSERT(PR_SUCCESS == rv);
 
     if (serverIsLocal)
     {
         /* Establish the server */
         TEST_LOG(
             cltsrv_log_file, TEST_LOG_INFO,
--- a/pr/tests/concur.c
+++ b/pr/tests/concur.c
@@ -45,21 +45,17 @@
 #include "prinrval.h"
 #include "prlock.h"
 #include "prprf.h"
 #include "prmem.h"
 #include "prlog.h"
 
 #include "plgetopt.h"
 
-#if defined(XP_MAC)
-#include "pprio.h"
-#else
 #include "private/pprio.h"
-#endif
 
 #include <stdlib.h>
 
 #define DEFAULT_RANGE 10
 #define DEFAULT_LOOPS 100
 
 static PRThreadScope thread_scope = PR_LOCAL_THREAD;
 
--- a/pr/tests/cvar.c
+++ b/pr/tests/cvar.c
@@ -61,22 +61,16 @@
 
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRMonitor *mon;
 #define DEFAULT_COUNT   1000
 PRInt32 count = 0;
 PRIntn debug_mode;
 
 #define kQSIZE	1
 
 typedef struct {
@@ -297,21 +291,16 @@ static PRIntn PR_CALLBACK RealMain(int a
          default:
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     if (0 == count) count = DEFAULT_COUNT;
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("cvar.log");
-	debug_mode = 1;
-#endif
-
     mon = PR_NewMonitor();
 
     Measure(CondWaitContextSwitchUU, "cond var wait context switch- user/user");
     Measure(CondWaitContextSwitchUK, "cond var wait context switch- user/kernel");
     Measure(CondWaitContextSwitchKK, "cond var wait context switch- kernel/kernel");
 
 	PR_DestroyMonitor(mon);
 
--- a/pr/tests/cvar2.c
+++ b/pr/tests/cvar2.c
@@ -59,22 +59,16 @@
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 int _debug_on = 0;
 #define DPRINTF(arg) if (_debug_on) printf arg
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define DEFAULT_COUNT   100
 #define DEFAULT_THREADS 5
 PRInt32 count = DEFAULT_COUNT;
 
 typedef struct threadinfo {
     PRThread        *thread;
     PRInt32          id;
     PRBool           internal;
@@ -942,20 +936,16 @@ static PRIntn PR_CALLBACK RealMain(int a
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     if (0 == count) count = DEFAULT_COUNT;
     if (0 == default_threads) default_threads = DEFAULT_THREADS;
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("cvar2.log");
-#endif
-
     printf("\n\
 CondVar Test:                                                           \n\
                                                                         \n\
 Simple test creates several local and global threads; half use a single,\n\
 shared condvar, and the other half have their own condvar.  The main    \n\
 thread then loops notifying them to wakeup.                             \n\
                                                                         \n\
 The timeout test is very similar except that the threads are not        \n\
@@ -974,24 +964,18 @@ default_threads, default_threads*2, defa
     PR_SetConcurrency(2);
 
     for (threads = default_threads; threads < default_threads*5; threads+=default_threads) {
         printf("\n%ld Thread tests\n", threads);
         Measure(CondVarTestSUU, threads, "Condvar simple test shared UU");
         Measure(CondVarTestSUK, threads, "Condvar simple test shared UK");
         Measure(CondVarTestPUU, threads, "Condvar simple test priv UU");
         Measure(CondVarTestPUK, threads, "Condvar simple test priv UK");
-#ifdef XP_MAC
-	/* Mac heaps can't handle thread*4 stack allocations at a time for (10, 15, 20)*4 */
-        Measure(CondVarTest, 5, "Condvar simple test All");
-        Measure(CondVarTimeoutTest, 5,  "Condvar timeout test");
-#else
         Measure(CondVarTest, threads, "Condvar simple test All");
         Measure(CondVarTimeoutTest, threads,  "Condvar timeout test");
-#endif
 #if 0
         Measure(CondVarMixedTest, threads,  "Condvar mixed timeout test");
         Measure(CondVarCombinedTest, threads, "Combined condvar test");
 #endif
     }
 
     printf("PASS\n");
 
--- a/pr/tests/fileio.c
+++ b/pr/tests/fileio.c
@@ -61,24 +61,17 @@
 #include "prcvar.h"
 #include "prmon.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prlog.h"
 
 #include <stdio.h>
 
-#ifdef XP_MAC
-#include "prsem.h"
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 
 #define TBSIZE 1024
 
 static PRUint8 tbuf[TBSIZE];
 
 static PRFileDesc *t1, *t2;
 
@@ -190,21 +183,16 @@ static void PR_CALLBACK writer(void *arg
 int main(int argc, char **argv)
 {
 	PRThread *r, *w;
 
 
 	PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("fileio.log");
-	debug_mode = 1;
-#endif
-
     emptyBufs = PR_NewSem(2);	/* two empty buffers */
 
     fullBufs = PR_NewSem(0);	/* zero full buffers */
 
 	/* Create initial temp file setup */
 	InitialSetup();
 	
 	/* create the reader thread */
--- a/pr/tests/inrval.c
+++ b/pr/tests/inrval.c
@@ -49,21 +49,17 @@
 **/
 /***********************************************************************
 ** Includes
 ***********************************************************************/
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include "prinit.h"
-#ifdef XP_MAC
-#include "pralarm.h"
-#else
 #include "obsolete/pralarm.h"
-#endif
 
 #include "prio.h"
 #include "prprf.h"
 #include "prlock.h"
 #include "prlong.h"
 #include "prcvar.h"
 #include "prinrval.h"
 #include "prtime.h"
--- a/pr/tests/intrio.c
+++ b/pr/tests/intrio.c
@@ -41,22 +41,16 @@
  */
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 /* for synchronization between the main thread and iothread */
 static PRLock *lock;
 static PRCondVar *cvar;
 static PRBool iothread_ready;
 
 static void PR_CALLBACK AbortIO(void *arg)
 {
     PRStatus rv;
--- a/pr/tests/intrupt.c
+++ b/pr/tests/intrupt.c
@@ -50,22 +50,16 @@
 #include "prlog.h"
 #include "prthread.h"
 #include "prtypes.h"
 #include "prnetdb.h"
 
 #include <stdio.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define DEFAULT_TCP_PORT 12500
 
 static PRLock *ml = NULL;
 static PRCondVar *cv = NULL;
 
 static PRBool passed = PR_TRUE;
 static PRBool debug_mode = PR_FALSE;
 static PRThreadScope thread_scope = PR_LOCAL_THREAD;
@@ -253,21 +247,16 @@ void PR_CALLBACK Intrupt(void *arg)
     PRStatus rv;
     PRNetAddr netaddr;
     PRFileDesc *listner;
     PRThread *abortCV, *abortIO, *abortJoin, *intrBlock;
 
     ml = PR_NewLock();
     cv = PR_NewCondVar(ml);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("intrupt.log");
-	debug_mode = PR_TRUE;
-#endif
-
     /* Part I */
     if (debug_mode) printf("Part I\n");
     abortCV = PR_CreateThread(
         PR_USER_THREAD, AbortCV, 0, PR_PRIORITY_NORMAL,
         thread_scope, PR_JOINABLE_THREAD, 0);
 
     PR_Sleep(PR_SecondsToInterval(2));
     rv = PR_Interrupt(abortCV);
--- a/pr/tests/io_timeout.c
+++ b/pr/tests/io_timeout.c
@@ -52,22 +52,16 @@
 ** Includes
 ***********************************************************************/
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include <stdio.h>
 #include "nspr.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define NUM_THREADS 1
 #define BASE_PORT   8000
 #define DEFAULT_ACCEPT_TIMEOUT 2
 
 typedef struct threadInfo {
     PRInt16 id;
     PRInt16 accept_timeout;
     PRLock *dead_lock;
@@ -271,21 +265,16 @@ int main(int argc, char **argv)
  /* main test */
 	
     if (0 == num_threads)
         num_threads = NUM_THREADS;
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_LOW, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("io_timeout.log");
-	debug_mode = 1;
-#endif
-
     printf("test with global bound thread\n");
     thread_test(PR_GLOBAL_BOUND_THREAD, num_threads);
 
     printf("test with local thread\n");
     thread_test(PR_LOCAL_THREAD, num_threads);
 
     printf("test with global thread\n");
     thread_test(PR_GLOBAL_THREAD, num_threads);
--- a/pr/tests/join.c
+++ b/pr/tests/join.c
@@ -59,21 +59,16 @@
 #include "prttools.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
 /***********************************************************************
 ** PRIVATE FUNCTION:    Test_Result
 ** DESCRIPTION: Used in conjunction with the regress tool, prints out the
 **		        status of the test case.
 ** INPUTS:      PASS/FAIL
 ** OUTPUTS:     None
 ** RETURN:      None
 ** SIDE EFFECTS:
@@ -222,23 +217,16 @@ static PRIntn PR_CALLBACK RealMain(int a
             debug_mode = 1;
             break;
          default:
             break;
         }
     }
     PL_DestroyOptState(opt);
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("join.log");
-    debug_mode = 1;
-#endif
-
-    
-    
  /* main test */
     printf("User-User test\n");
     runTest(PR_LOCAL_THREAD, PR_LOCAL_THREAD);
     printf("User-Kernel test\n");
     runTest(PR_LOCAL_THREAD, PR_GLOBAL_THREAD);
     printf("Kernel-User test\n");
     runTest(PR_GLOBAL_THREAD, PR_LOCAL_THREAD);
     printf("Kernel-Kernel test\n");
--- a/pr/tests/joinkk.c
+++ b/pr/tests/joinkk.c
@@ -60,21 +60,16 @@
 #include "plgetopt.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 PRIntn failed_already=0;
 PRIntn debug_mode;
 /*
 	Program to test joining of threads.  Two threads are created.  One
 	to be waited upon until it has started.  The other to join after it has
 	completed.
 */
 
@@ -154,22 +149,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
 			debug_mode = 1;
             break;
          default:
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("join.log");
-#endif
-
-	
-	
  /* main test */
 
     if (debug_mode) printf("Kernel-Kernel test\n");
     runTest(PR_GLOBAL_THREAD, PR_GLOBAL_THREAD);
 
 	if(failed_already)	
 	{
         printf("FAIL\n");
--- a/pr/tests/joinku.c
+++ b/pr/tests/joinku.c
@@ -60,20 +60,16 @@
 #include "plgetopt.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 
 /*
 	Program to test joining of threads.  Two threads are created.  One
 	to be waited upon until it has started.  The other to join after it has
 	completed.
@@ -158,22 +154,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("joinku.log");
-#endif
-
-	
-	
  /* main test */
 
     if (debug_mode) printf("Kernel-User test\n");
     runTest(PR_GLOBAL_THREAD, PR_LOCAL_THREAD);
 
 
 	if(failed_already)	
     {
--- a/pr/tests/joinuk.c
+++ b/pr/tests/joinuk.c
@@ -60,20 +60,16 @@
 #include "plgetopt.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
 PRIntn failed_already=0;
 PRIntn debug_mode;
 /*
 	Program to test joining of threads.  Two threads are created.  One
 	to be waited upon until it has started.  The other to join after it has
 	completed.
 */
 
@@ -156,22 +152,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("joinuk.log");
-#endif
-
-	
-	
  /* main test */
 
     if (debug_mode) printf("User-Kernel test\n");
     runTest(PR_LOCAL_THREAD, PR_GLOBAL_THREAD);
 
 
 	if(failed_already)	
 	{
--- a/pr/tests/joinuu.c
+++ b/pr/tests/joinuu.c
@@ -60,20 +60,16 @@
 #include "plgetopt.h"
 
 #include "nspr.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 
 /*
 	Program to test joining of threads.  Two threads are created.  One
 	to be waited upon until it has started.  The other to join after it has
 	completed.
@@ -158,22 +154,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
             break;
         }
     }
 	PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("joinuu.log");
-#endif
-
-	
-	
  /* main test */
     if (debug_mode) printf("User-User test\n");
     runTest(PR_LOCAL_THREAD, PR_LOCAL_THREAD);
 
 	if(failed_already)	
 	{
         printf("FAIL\n");
 		return 1;
--- a/pr/tests/lock.c
+++ b/pr/tests/lock.c
@@ -82,22 +82,16 @@
 #include "plstr.h"
 
 #include <stdlib.h>
 
 #if defined(XP_UNIX)
 #include <string.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static PRIntn failed_already=0;
 static PRFileDesc *std_err = NULL;
 static PRBool verbosity = PR_FALSE;
 static PRBool debug_mode = PR_FALSE;
 
 const static PRIntervalTime contention_interval = 50;
 
 typedef struct LockContentious_s {
@@ -494,21 +488,16 @@ int main(int argc,  char **argv)
             }
         }
     	PL_DestroyOptState(opt);
     }
 
  /* main test */
     PR_SetConcurrency(8);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("lock.log");
-	debug_mode = 1;
-#endif
-
     if (loops == 0) loops = 100;
     if (debug_mode)
     {
         std_err = PR_STDERR;
         PR_fprintf(std_err, "Lock: Using %d loops\n", loops);
     }
 
     if (cpus == 0) cpus = 2;
--- a/pr/tests/lockfile.c
+++ b/pr/tests/lockfile.c
@@ -61,32 +61,22 @@
 #include "prinit.h"
 #include "prinrval.h"
 #include "prlock.h"
 #include "prlog.h"
 #include "prmon.h"
 #include "prthread.h"
 #include "prtypes.h"
 
-#ifndef XP_MAC
 #include "private/pprio.h"
-#else
-#include "pprio.h"
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 const static PRIntervalTime contention_interval = 50;
 
 typedef struct LockContentious_s {
     PRLock *ml;
     PRInt32 loops;
@@ -236,21 +226,16 @@ int main(int argc,  char **argv)
     }
 	PL_DestroyOptState(opt);
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("lockfile.log");
-	debug_mode = 1;
-#endif
-
     if (argc > 1) loops = atoi(argv[1]);
     if (loops == 0) loops = 100;
     if (debug_mode) printf("Lock: Using %d loops\n", loops);
 
     cpus = (argc < 3) ? 2 : atoi(argv[2]);
     if (cpus == 0) cpus = 2;
     if (debug_mode) printf("Lock: Using %d cpu(s)\n", cpus);
 
--- a/pr/tests/logger.c
+++ b/pr/tests/logger.c
@@ -44,20 +44,16 @@
 #include "prlog.h"
 #include "prlock.h"
 #include "prcvar.h"
 #include "prthread.h"
 #include "prinrval.h"
 
 #include <stdio.h>
 
-#ifdef XP_MAC
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 /* lth. re-define PR_LOG() */
 #if 0
 #undef PR_LOG_TEST
 #undef PR_LOG
 #define PR_LOG_TEST(_module,_level) ((_module)->level <= (_level))
 #define PR_LOG(_module,_level,_args)    \
   {                                     \
     if (PR_LOG_TEST(_module,_level))    \
@@ -121,28 +117,24 @@ static void UserLogStuff( void )
 
 int main(int argc, char **argv)
 {
     PRThread *thread;
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifndef XP_MAC
     if (argc > 1)
     {
         if (!PR_SetLogFile(argv[1]))
         {
             Error("Access: Cannot create log file");
             goto exit;
         }
     }
-#else
-	SetupMacPrintfLog("logger.log");
-#endif
 
     /* Start logging something here */
     PR_LogPrint("%s logging into %s\n", argv[0], argv[1]);
 
     PR_LogPrint("%s creating new thread\n", argv[0]);
 
     /*
     ** Now change buffering.
--- a/pr/tests/nbconn.c
+++ b/pr/tests/nbconn.c
@@ -56,22 +56,16 @@
  *    return PR_UNKNOWN_ERROR on certain platforms.
  */
 
 #include "nspr.h"
 #include "plgetopt.h"
 #include <stdio.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-static char *hosts[4] = {"cynic", "warp", "gandalf", "neon"};
-#endif
-
 #define SERVER_MAX_BIND_COUNT        100
 #define DATA_BUF_SIZE        		 256
 #define TCP_SERVER_PORT            10000
 #define TCP_UNUSED_PORT            211
 
 typedef struct Server_Param {
     PRFileDesc *sp_fd;		/* server port */
 } Server_Param;
@@ -89,20 +83,16 @@ int main(int argc, char **argv)
     char buf[1024];
     PRNetAddr addr;
     PRPollDesc pd;
     PRStatus rv;
     PRSocketOptionData optData;
 	const char *hostname = NULL;
     PRIntn default_case, n, bytes_read, bytes_sent;
 	PRInt32 failed_already = 0;
-#ifdef XP_MAC
-	int index;
-	PRIntervalTime timeout;
-#endif
 
     /*
      * -d           debug mode
      */
 
     PLOptStatus os;
     PLOptState *opt = PL_CreateOptState(argc, argv, "d");
     while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
@@ -117,33 +107,21 @@ int main(int argc, char **argv)
             _debug_on = 1;
             break;
         default:
             break;
         }
     }
     PL_DestroyOptState(opt);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("nbconn.log");
-	for (index=0; index<4; index++) {
-	argv[1] = hosts[index];
-	timeout = PR_INTERVAL_NO_TIMEOUT;
-	if (index == 3)
-		timeout = PR_SecondsToInterval(10UL);
-#endif
-
-
     PR_STDIO_INIT();
-#ifndef XP_MAC
     if (hostname)
 		default_case = 0;
 	else
 		default_case = 1;
-#endif
 
 	if (default_case) {
 
 		/*
 		 * In the default case the following tests are executed:
 		 *	1. successful connection: a server thread accepts a connection
 		 *	   from the main thread
 		 *	2. unsuccessful connection: the main thread tries to connect to a
@@ -170,21 +148,17 @@ int main(int argc, char **argv)
 		PR_SetSocketOption(sock, &optData);
 		rv = PR_Connect(sock, &addr, PR_INTERVAL_NO_TIMEOUT);
 		if (rv == PR_FAILURE && PR_GetError() == PR_IN_PROGRESS_ERROR) {
 			printf( "Connect in progress\n");
 		}
 
 		pd.fd = sock;
 		pd.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
-#ifndef XP_MAC
 		n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT);
-#else
-		n = PR_Poll(&pd, 1, timeout);
-#endif
 		if (n == -1) {
 			printf( "PR_Poll failed\n");
 			exit(1);
 		}
 		printf( "PR_Poll returns %d\n", n);
 		if (pd.out_flags & PR_POLL_READ) {
 			printf( "PR_POLL_READ\n");
 		}
@@ -198,44 +172,38 @@ int main(int argc, char **argv)
 			printf( "PR_POLL_ERR\n");
 		}
 		if (pd.out_flags & PR_POLL_NVAL) {
 			printf( "PR_POLL_NVAL\n");
 		}
 
 		if (PR_GetConnectStatus(&pd) == PR_SUCCESS) {
 			printf("PR_GetConnectStatus: connect succeeded\n");
-			/* Mac and Win16 have trouble printing to the console. */
-#if !defined(XP_MAC) && !defined(WIN16)
 			PR_Write(sock, "GET /\r\n\r\n", 9);
 			PR_Shutdown(sock, PR_SHUTDOWN_SEND);
 			pd.in_flags = PR_POLL_READ;
 			while (1) {
 				n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT);
 				printf( "poll returns %d\n", n);
 				n = PR_Read(sock, buf, sizeof(buf));
 				printf( "read returns %d\n", n);
 				if (n <= 0) {
 					break;
 				}
 				PR_Write(PR_STDOUT, buf, n);
 			}
-#endif
 		} else {
 			if (PR_GetError() == PR_IN_PROGRESS_ERROR) {
 				printf( "PR_GetConnectStatus: connect still in progress\n");
 				exit(1);
 			}
 			printf( "PR_GetConnectStatus: connect failed: (%ld, %ld)\n",
 					PR_GetError(), PR_GetOSError());
 		}
 		PR_Close(sock);
-#ifdef XP_MAC
-		} /* end of for loop */
-#endif
     	printf( "PASS\n");
     	return 0;
 
 	}
 }
 
 
 /*
@@ -373,21 +341,17 @@ connection_success_test()
 		fprintf(stderr,"Error - PR_CreateThread failed: (%d,%d)\n",
 									PR_GetError(), PR_GetOSError());
 		failed_already=1;
 		goto def_exit;
 	}
 	DPRINTF(("Created TCP_Server thread [0x%x]\n",thr));
 	pd.fd = conn_fd;
 	pd.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
-#ifndef XP_MAC
 	n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT);
-#else
-	n = PR_Poll(&pd, 1, timeout);
-#endif
 	if (n == -1) {
 		fprintf(stderr,"Error - PR_Poll failed: (%d, %d)\n",
 									PR_GetError(), PR_GetOSError());
 		failed_already=1;
 		goto def_exit;
 	}
 	if (PR_GetConnectStatus(&pd) == PR_SUCCESS) {
 		PRInt32 rv;
@@ -551,21 +515,17 @@ connection_failure_test()
 	} else {
 		PR_ASSERT(rv == PR_SUCCESS);
 		fprintf(stderr,"Error - PR_Connect succeeded, expected to fail\n");
 		failed_already=1;
 		goto def_exit;
 	}
 	pd.fd = conn_fd;
 	pd.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
-#ifndef XP_MAC
 	n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT);
-#else
-	n = PR_Poll(&pd, 1, timeout);
-#endif
 	if (n == -1) {
 		fprintf(stderr,"Error - PR_Poll failed: (%d, %d)\n",
 									PR_GetError(), PR_GetOSError());
 		failed_already=1;
 		goto def_exit;
 	}
 	if (PR_GetConnectStatus(&pd) == PR_SUCCESS) {
 		PRInt32 rv;
--- a/pr/tests/nonblock.c
+++ b/pr/tests/nonblock.c
@@ -37,21 +37,17 @@
 
 #include "nspr.h"
 #include "prio.h"
 #include "prerror.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
 #include "plerror.h"
-#ifndef XP_MAC
 #include "obsolete/probslet.h"
-#else
-#include "probslet.h"
-#endif
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 #define NUMBER_ROUNDS 5
 
 #if defined(WIN16)
@@ -67,26 +63,16 @@
 #define CHUNK_SIZE 10
 #undef USE_PR_SELECT         /* If defined, we use PR_Select.
                               * If not defined, use PR_Poll instead. */
 
 #if defined(USE_PR_SELECT)
 #include "pprio.h"
 #endif
 
-#ifdef XP_MAC
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-PR_LogPrint(fmt);
-return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static void PR_CALLBACK
 clientThreadFunc(void *arg)
 {
     PRUintn port = (PRUintn)arg;
     PRFileDesc *sock;
     PRNetAddr addr;
     char buf[CHUNK_SIZE];
     int i;
@@ -160,20 +146,16 @@ static PRIntn PR_CALLBACK RealMain( PRIn
     PRNetAddr addr;
     char buf[CHUNK_SIZE];
     PRThread *clientThread;
     PRInt32 retVal;
     PRSocketOptionData optval;
     PRIntn i;
     PRIntervalTime unitTime = PR_MillisecondsToInterval(UNIT_TIME);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("nonblock.log");
-#endif
-
     /* Create a listening socket */
     if ((listenSock = PR_NewTCPSocket()) == NULL) {
 	fprintf(stderr, "Can't create a new TCP socket\n");
 	exit(1);
     }
     addr.inet.family = PR_AF_INET;
     addr.inet.ip = PR_htonl(PR_INADDR_ANY);
     addr.inet.port = PR_htons(0);
--- a/pr/tests/op_2long.c
+++ b/pr/tests/op_2long.c
@@ -52,22 +52,16 @@
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 #include "plerror.h"
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 static PRFileDesc *t1;
 PRIntn error_code;
 
 /*
  * should exceed any system's maximum file name length
  * Note: was set at 4096. This is legal on some unix (Linux 2.1+) platforms.
  * 
  */
@@ -83,20 +77,16 @@ int main(int argc, char **argv)
 		if (i % 10 == 0) {
 			nameTooLong[i] = '/';
 		} else {
 			nameTooLong[i] = 'a';
 		}
 	}
 	nameTooLong[TOO_LONG - 1] = 0;
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
     PR_STDIO_INIT();
 	t1 = PR_Open(nameTooLong, PR_RDWR, 0666);
 	if (t1 == NULL) {
 		if (PR_GetError() == PR_NAME_TOO_LONG_ERROR) {
             PL_PrintError("error code is");
 			printf ("PASS\n");
 			return 0;
 		}
--- a/pr/tests/op_filnf.c
+++ b/pr/tests/op_filnf.c
@@ -52,34 +52,21 @@
 /* Used to get the command line option */
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 static PRFileDesc *t1;
 PRIntn error_code;
 
 int main(int argc, char **argv)
 {
-
-
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
-
     PR_STDIO_INIT();
 	t1 = PR_Open("/usr/tmp/ttools/err03.tmp", PR_TRUNCATE | PR_RDWR, 0666);
 	if (t1 == NULL) {
 		if (PR_GetError() == PR_FILE_NOT_FOUND_ERROR) {
 				printf ("error code is %d \n", PR_GetError());
 				printf ("PASS\n");
 				return 0;
 		}
--- a/pr/tests/op_filok.c
+++ b/pr/tests/op_filok.c
@@ -50,22 +50,16 @@
 ***********************************************************************/
 /* Used to get the command line option */
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 /*
  * The name of a file that is guaranteed to exist
  * on every machine of a particular OS.
  */
 #if defined(SYMBIAN)
 #define EXISTING_FILENAME "z:\\system\\install\\Series60v3.0.sis"
 #elif defined (XP_UNIX)
 #define EXISTING_FILENAME "/bin/sh"
@@ -78,21 +72,16 @@
 #else
 #error "Unknown OS"
 #endif
 
 static PRFileDesc *t1;
 
 int main(int argc, char **argv)
 {
-
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
     PR_STDIO_INIT();
 
 	t1 = PR_Open(EXISTING_FILENAME, PR_RDONLY, 0666);
 
 	if (t1 == NULL) {
 		printf ("error code is %d \n", PR_GetError());
 		printf ("File %s should be found\n",
 				EXISTING_FILENAME);
--- a/pr/tests/op_noacc.c
+++ b/pr/tests/op_noacc.c
@@ -51,33 +51,21 @@
 /* Used to get the command line option */
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 static PRFileDesc *err01;
 PRIntn error_code;
 
 int main(int argc, char **argv)
 {
-
-
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
 #ifdef XP_PC
     printf("op_noacc: Test not valid on MS-Windows.\n\tNo concept of 'mode' on Open() call\n");
     return(0);
 #endif
 
 	
     PR_STDIO_INIT();
 	err01 = PR_Open("err01.tmp", PR_CREATE_FILE | PR_RDWR, 0);
--- a/pr/tests/op_nofil.c
+++ b/pr/tests/op_nofil.c
@@ -51,36 +51,25 @@
 /* Used to get the command line option */
 #include "prinit.h"
 #include "prmem.h"
 #include "prio.h"
 #include "prerror.h"
 #include <stdio.h>
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
 /*
  * A file name that cannot exist
  */
 #define NO_SUCH_FILE "/no/such/file.tmp"
 
 static PRFileDesc *t1;
 
 int main(int argc, char **argv)
 {
-
-#ifdef XP_MAC
-	SetupMacPrintfLog("pr_open_re.log");
-#endif
-	
     PR_STDIO_INIT();
 	t1 = PR_Open(NO_SUCH_FILE,  PR_RDONLY, 0666);
 	if (t1 == NULL) {
 		if (PR_GetError() == PR_FILE_NOT_FOUND_ERROR) {
 			printf ("error code is PR_FILE_NOT_FOUND_ERROR, as expected\n");
 			printf ("PASS\n");
 			return 0;
 		} else {
--- a/pr/tests/perf.c
+++ b/pr/tests/perf.c
@@ -40,24 +40,17 @@
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
 int _debug_on = 0;
 #define DPRINTF(arg) if (_debug_on) printf arg
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 PRLock *lock;
 PRMonitor *mon;
 PRMonitor *mon2;
 
 #define DEFAULT_COUNT    1000
 
 PRInt32 count;
@@ -423,20 +416,16 @@ int main(int argc, char **argv)
 
     if (0 == count) count = DEFAULT_COUNT;
     
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
 	PR_BlockClockInterrupts();
 	PR_UnblockClockInterrupts();
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("perf.log");
-#endif
-
     lock = PR_NewLock();
     mon = PR_NewMonitor();
     mon2 = PR_NewMonitor();
 
     Measure(LocalProcedureCall, "local procedure call overhead");
     Measure(DLLProcedureCall, "DLL procedure call overhead");
     Measure(Now, "current calendar time");
     Measure(Interval, "interval time");
--- a/pr/tests/poll_er.c
+++ b/pr/tests/poll_er.c
@@ -84,18 +84,16 @@ ClientThreadFunc(void *arg)
      * Make the fd invalid
      */
 #if defined(XP_UNIX)
     close(PR_FileDesc2NativeHandle(badFD));
 #elif defined(XP_OS2)
     soclose(PR_FileDesc2NativeHandle(badFD));
 #elif defined(WIN32) || defined(WIN16)
     closesocket(PR_FileDesc2NativeHandle(badFD));
-#elif defined(XP_MAC)
-    _PR_MD_CLOSE_SOCKET(PR_FileDesc2NativeHandle(badFD));
 #else
 #error "Unknown architecture"
 #endif
 }
 
 int main(int argc, char **argv)
 {
     PRFileDesc *listenSock1, *listenSock2;
--- a/pr/tests/poll_nm.c
+++ b/pr/tests/poll_nm.c
@@ -58,47 +58,29 @@
 /* Used to get the command line option */
 #include "plgetopt.h"
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
-#ifndef XP_MAC
 #include "obsolete/probslet.h"
-#else
-#include "probslet.h"
-#endif
 
-#ifndef XP_MAC
 #include "private/pprio.h"
-#else
-#include "pprio.h"
-#endif
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
 #define NUM_ITERATIONS 5
 
-#ifdef XP_MAC
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-PR_LogPrint(fmt);
-return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 static void PR_CALLBACK
 clientThreadFunc(void *arg)
 {
     PRUintn port = (PRUintn) arg;
     PRFileDesc *sock;
     PRNetAddr addr;
     char buf[128];
     int i;
@@ -161,21 +143,16 @@ int main(int argc, char **argv)
     }
 	PL_DestroyOptState(opt);
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	debug_mode = 1;
-	SetupMacPrintfLog("poll_nm.log");
-#endif
-
     if (debug_mode) {
 		printf("This program tests PR_Poll with sockets.\n");
 		printf("Normal operation are tested.\n\n");
 	}
 
     /* Create two listening sockets */
     if ((listenSock1 = PR_NewTCPSocket()) == NULL) {
 	fprintf(stderr, "Can't create a new TCP socket\n");
--- a/pr/tests/poll_to.c
+++ b/pr/tests/poll_to.c
@@ -59,21 +59,17 @@
 #include "plgetopt.h"
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
 
-#ifndef XP_MAC
 #include "private/pprio.h"
-#else
-#include "pprio.h"
-#endif
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
--- a/pr/tests/priotest.c
+++ b/pr/tests/priotest.c
@@ -35,21 +35,16 @@
  *
  * ***** END LICENSE BLOCK ***** */
 
 /*
  * File:        priotest.c
  * Purpose:     testing priorities
  */
 
-#ifdef XP_MAC
-#error "This test does not run on Macintosh"
-#else
-
-
 #include "prcmon.h"
 #include "prinit.h"
 #include "prinrval.h"
 #include "prlock.h"
 #include "prlog.h"
 #include "prmon.h"
 #include "prprf.h"
 #include "prthread.h"
@@ -223,11 +218,9 @@ int main(int argc, char **argv)
 
     PR_ProcessExit((failed) ? 1 : 0);
 
 	PR_ASSERT(!"You can't get here -- but you did!");
 	return 1;  /* or here */
 
 }  /* main */
 
-#endif  /* ifdef XP_MAC */
-
 /* priotest.c */
--- a/pr/tests/provider.c
+++ b/pr/tests/provider.c
@@ -77,26 +77,20 @@
 
 #include "plstr.h"
 #include "plerror.h"
 #include "plgetopt.h"
 
 #include <stdlib.h>
 #include <string.h>
 
-
 #if defined(XP_UNIX)
 #include <math.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 /*
 ** This is the beginning of the test
 */
 
 #define RECV_FLAGS 0
 #define SEND_FLAGS 0
 #define BUFFER_SIZE 1024
 #define DEFAULT_BACKLOG 5
@@ -1198,20 +1192,16 @@ int main(int argc, char **argv)
     PR_STDIO_INIT();
     TimeOfDayMessage("Client/Server started at", PR_GetCurrentThread());
 
     cltsrv_log_file = PR_NewLogModule("cltsrv_log");
     MY_ASSERT(NULL != cltsrv_log_file);
     boolean = PR_SetLogFile("cltsrv.log");
     MY_ASSERT(boolean);
 
-#ifdef XP_MAC
-    debug_mode = PR_TRUE;
-#endif
-
     if (serverIsLocal)
     {
         /* Establish the server */
         TEST_LOG(
             cltsrv_log_file, TEST_LOG_INFO,
             ("main(0x%p): starting server\n", PR_GetCurrentThread()));
 
         server = PR_NEWZAP(CSServer_t);
--- a/pr/tests/prpoll.c
+++ b/pr/tests/prpoll.c
@@ -44,21 +44,17 @@
 #endif
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
 
-#ifndef XP_MAC
 #include "private/pprio.h"
-#else
-#include "pprio.h"
-#endif
 
 #define CLIENT_LOOPS	5
 #define BUF_SIZE		128
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
--- a/pr/tests/ranfile.c
+++ b/pr/tests/ranfile.c
@@ -92,22 +92,16 @@ typedef struct Hammer_s {
 #define DEFAULT_LIMIT		10
 #define DEFAULT_THREADS		2
 #define DEFAULT_LOOPS		1
 
 static PRInt32 pageSize = 1024;
 static const char* baseName = "./";
 static const char *programName = "Random File";
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 /***********************************************************************
 ** PRIVATE FUNCTION:    RandomNum
 ** DESCRIPTION:
 **   Generate a pseudo-random number
 ** INPUTS:      None
 ** OUTPUTS:     None
 ** RETURN:      A pseudo-random unsigned number, 32-bits wide
 ** SIDE EFFECTS:
@@ -323,21 +317,16 @@ int main(int argc, char **argv)
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
     interleave = PR_SecondsToInterval(10);
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("ranfile.log");
-	debug_mode = 1;
-#endif
-
     ml = PR_NewLock();
     cv = PR_NewCondVar(ml);
 
     if (loops == 0) loops = DEFAULT_LOOPS;
     if (limit == 0) limit = DEFAULT_LIMIT;
     if (threads == 0) threads = DEFAULT_THREADS;
 
     if (debug_mode) printf(
--- a/pr/tests/sel_spd.c
+++ b/pr/tests/sel_spd.c
@@ -46,48 +46,37 @@
 #include <stdlib.h>
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
 #ifdef SYMBIAN
 #include <getopt.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-PR_LogPrint(fmt);
-return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define PORT_BASE 19000
 
 typedef struct timer_slot_t {
 	unsigned long d_connect;
 	unsigned long d_cl_data;
 	unsigned long d_sv_data;
 	unsigned long d_close;
 	unsigned long d_total;
 	unsigned long requests;
 } timer_slot_t;
 
 static long _iterations = 5;
 static long _client_data = 8192;
 
-#if defined(XP_MAC) || defined(SYMBIAN)
+#ifdef SYMBIAN
 /*
- * Mac does not scale well specially the requirement for thread stack
+ * Symbian OS does not scale well specially the requirement for thread stack
  * space and buffer allocation space.  It is easy to get into a fragmented
  * memory and not be able to allocate thread stack or client/server data
  * buffer.
-*/
+ */
 static long _server_data = (8*1024);
 static long _threads_max = 10, _threads = 10;
 #else
 static long _server_data = (128*1024);
 static long _threads_max = 10, _threads = 10;
 #endif
 
 static int verbose=0;
@@ -483,20 +472,16 @@ int main(int argc, char **argv)
 				break;
 		}
 	}
 #endif
 
 	PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("sel_spd.log");
-#endif
-
 	fprintf(stdout, "Running test for %d iterations with %d simultaneous threads.\n", 
 		_iterations, _threads);
 	fprintf(stdout, "\tWill send %d bytes of client data and %d bytes of server data\n", 
 		_client_data, _server_data);
 
 	if ( (exit_cv = PR_NewMonitor()) == NULL) 
 		fprintf(stderr, "Error creating monitor for exit cv\n");
 	if ( (timer_data = (timer_slot_t *)PR_Malloc(2*_threads * sizeof(timer_slot_t))) == NULL) 
--- a/pr/tests/selct_er.c
+++ b/pr/tests/selct_er.c
@@ -195,18 +195,16 @@ int main(int argc, char **argv)
      * Make the fd invalid
      */
 #if defined(XP_UNIX)
     close(PR_FileDesc2NativeHandle(badFD));
 #elif defined(XP_OS2)
     soclose(PR_FileDesc2NativeHandle(badFD));
 #elif defined(WIN32) || defined(WIN16)
     closesocket(PR_FileDesc2NativeHandle(badFD));
-#elif defined(XP_MAC)
-    _PR_MD_CLOSE_SOCKET(PR_FileDesc2NativeHandle(badFD));
 #else
 #error "Unknown architecture"
 #endif
 
     retVal = PR_Select(0 /* unused */, &readFdSet, NULL, NULL,
 	    PR_INTERVAL_NO_TIMEOUT);
     if (retVal != -1 || PR_GetError() != PR_BAD_DESCRIPTOR_ERROR) {
 	fprintf(stderr, "Failed to detect the bad fd: "
--- a/pr/tests/selct_nm.c
+++ b/pr/tests/selct_nm.c
@@ -60,21 +60,17 @@
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prerror.h"
 #include "prnetdb.h"
 
-#ifdef XP_MAC
-#include "probslet.h"
-#else
 #include "obsolete/probslet.h"
-#endif
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 PRIntn failed_already=0;
 PRIntn debug_mode;
 
--- a/pr/tests/selct_to.c
+++ b/pr/tests/selct_to.c
@@ -59,21 +59,17 @@
 #include "plgetopt.h"
 
 #include "prinit.h"
 #include "prio.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prnetdb.h"
 
-#ifdef XP_MAC
-#include "probslet.h"
-#else
 #include "obsolete/probslet.h"
-#endif
 
 #include "prerror.h"
 
 #include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 
 PRIntn failed_already=0;
--- a/pr/tests/sem.c
+++ b/pr/tests/sem.c
@@ -69,24 +69,17 @@ PRIntn debug_mode;
 
 /* 
 	Since we don't have stdin, stdout everywhere, we will fake 
 	it with our in-memory buffers called stdin and stdout.
 */
 
 #define SBSIZE 1024
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 static char stdinBuf[SBSIZE];
 static char stdoutBuf[SBSIZE];
 
 static PRUintn stdinBufIdx = 0;
 static PRUintn stdoutBufIdx = 0;
 static PRStatus finalResult = PR_SUCCESS;
 
@@ -209,21 +202,16 @@ int main(int argc, char **argv)
                 break;
             }
         }
     	PL_DestroyOptState(opt);
     }        
 
  /* main test */
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("sem.log");
-	debug_mode = 1;
-#endif
-
     emptyBufs = PR_NewSem(2);	/* two empty buffers */
 
     fullBufs = PR_NewSem(0);	/* zero full buffers */
 
 	/* create the reader thread */
 	
 	r = PR_CreateThread(PR_USER_THREAD,
 				      reader, 0, 
--- a/pr/tests/socket.c
+++ b/pr/tests/socket.c
@@ -59,29 +59,17 @@
 
 #ifdef WIN32
 #include <process.h>
 #endif
 
 static int _debug_on = 0;
 static int test_cancelio = 0;
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-    PR_LogPrint(fmt);
-    return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 #ifdef XP_PC
 #define mode_t int
 #endif
 
 #define DPRINTF(arg) if (_debug_on) printf arg
 
 #ifdef XP_PC
@@ -124,26 +112,21 @@ char *LARGE_FILE_NAME = "/tmp/prsocket_t
 /*
  * set UDP datagram size small enough that datagrams sent to a port on the
  * local host will not be lost
  */
 #define UDP_DGRAM_SIZE            128
 #define NUM_TCP_CLIENTS            5	/* for a listen queue depth of 5 */
 #define NUM_UDP_CLIENTS            10
 
-#ifndef XP_MAC
 #ifdef SYMBIAN
 #define NUM_TRANSMITFILE_CLIENTS    1
 #else
 #define NUM_TRANSMITFILE_CLIENTS    4
 #endif
-#else
-/* Mac can't handle more than 2* (3Mb) allocations for large file size buffers */
-#define NUM_TRANSMITFILE_CLIENTS    2
-#endif
 
 #define NUM_TCP_CONNECTIONS_PER_CLIENT    5
 #define NUM_TCP_MESGS_PER_CONNECTION    10
 #define NUM_UDP_DATAGRAMS_PER_CLIENT    5
 #define TCP_SERVER_PORT            10000
 #define UDP_SERVER_PORT            TCP_SERVER_PORT
 #define SERVER_MAX_BIND_COUNT        100
 
@@ -1098,22 +1081,17 @@ UDP_Socket_Client_Server_Test(void)
         }
         cparamp->server_addr = udp_server_addr;
         cparamp->exit_mon = mon2;
         cparamp->exit_counter = &thread_count;
         cparamp->datalen = datalen;
         /*
          * Cause every other client thread to connect udp sockets
          */
-#ifndef XP_MAC
         cparamp->udp_connect = udp_connect;
-#else
-        /* No support for UDP connects on Mac */
-        cparamp->udp_connect = 0;
-#endif
         if (udp_connect)
             udp_connect = 0;
         else
             udp_connect = 1;
         DPRINTF(("Creating UDP client %d\n", i));
         t = PR_CreateThread(PR_USER_THREAD,
             UDP_Client, (void *) cparamp,
             PR_PRIORITY_NORMAL,
@@ -2232,19 +2210,16 @@ int main(int argc, char **argv)
             break;
         }
     }
     PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("socket.log");
-#endif
     PR_SetConcurrency(4);
 
     emuSendFileIdentity = PR_GetUniqueIdentity("Emulated SendFile");
     emuSendFileMethods = *PR_GetDefaultIOMethods();
     emuSendFileMethods.transmitfile = emu_TransmitFile;
     emuSendFileMethods.sendfile = emu_SendFile;
 
     /*
--- a/pr/tests/sockopt.c
+++ b/pr/tests/sockopt.c
@@ -34,48 +34,30 @@
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nspr.h"
 #include "prio.h"
 #include "prinit.h"
 #include "prprf.h"
-#ifdef XP_MAC
-#include "probslet.h"
-#else
 #include "obsolete/probslet.h"
-#endif
 
 #include "plerror.h"
 
 static PRFileDesc *err = NULL;
 static PRBool failed = PR_FALSE;
 
-#ifndef XP_MAC
 static void Failed(const char *msg1, const char *msg2)
 {
     if (NULL != msg1) PR_fprintf(err, "%s ", msg1);
     PL_FPrintError(err, msg2);
     failed = PR_TRUE;
 }  /* Failed */
 
-#else
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-static void Failed(const char *msg1, const char *msg2)
-{
-    if (NULL != msg1) printf("%s ", msg1);
-    printf (msg2);
-    failed |= PR_TRUE;
-}  /* Failed */
-
-#endif
-
 static PRSockOption Incr(PRSockOption *option)
 {
     PRIntn val = ((PRIntn)*option) + 1;
     *option = (PRSockOption)val;
     return (PRSockOption)val;
 }  /* Incr */
 
 int main(int argc, char **argv)
@@ -105,20 +87,16 @@ int main(int argc, char **argv)
         "PR_SockOpt_MaxSegment",      /* maximum segment size */
         "PR_SockOpt_Broadcast",       /* Enable broadcast */
         "PR_SockOpt_Last"
     };
 
     err = PR_GetSpecialFD(PR_StandardError);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("sockopt.log");
-#endif
-
     if (NULL == udp) Failed("PR_NewUDPSocket()", NULL);
     else if (NULL == tcp) Failed("PR_NewTCPSocket()", NULL);
     else
     {
         PRSockOption option;
         PRUint32 segment = 1024;
         PRNetAddr addr;
 
@@ -202,18 +180,14 @@ int main(int argc, char **argv)
 			}
 
             rv = PR_GetSocketOption(fd, &data);
             if (PR_FAILURE == rv) Failed("PR_GetSocketOption()", tag[option]);
         }
         PR_Close(udp);
         PR_Close(tcp);
     }
-#ifndef XP_MAC
     PR_fprintf(err, "%s\n", (failed) ? "FAILED" : "PASSED");
-#else
-   printf("%s\n", (failed) ? "FAILED" : "PASSED");
-#endif
     return (failed) ? 1 : 0;
 }  /* main */
 
 /* sockopt.c */
 
--- a/pr/tests/suspend.c
+++ b/pr/tests/suspend.c
@@ -43,31 +43,20 @@ int main()
     return 0;
 }
 #else
 
 #include "nspr.h"
 #include "prpriv.h"
 #include "prinrval.h"
 
-#if defined(XP_MAC)
-#include "gcint.h"
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "gcint.h"
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRMonitor *mon;
 PRInt32 count;
 PRInt32 alive;
 
 #define SLEEP_TIME    4    /* secs */
 
 void PR_CALLBACK
 Level_2_Thread(void *arg)
@@ -196,20 +185,16 @@ static void CreateThreadsKK(void)
 }
 
 
 int main(int argc, char **argv)
 {
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("suspend.log");
-#endif
-
     if (argc > 1) {
         count = atoi(argv[1]);
     } else {
         count = 5;
     }
 
     printf("\n\n%20s%30s\n\n"," ","Suspend_Resume Test");
     CreateThreadsUU();
--- a/pr/tests/switch.c
+++ b/pr/tests/switch.c
@@ -47,22 +47,17 @@
 #include "prlock.h"
 #include "prlog.h"
 #include "prthread.h"
 #include "prprf.h"
 
 #include "plerror.h"
 #include "plgetopt.h"
 
-#if defined(XP_MAC)
-#include "pprio.h"
-#define printf PR_LogPrint
-#else
 #include "private/pprio.h"
-#endif
 
 #include <stdlib.h>
 
 #define INNER_LOOPS 100
 #define DEFAULT_LOOPS 100
 #define DEFAULT_THREADS 10
 
 static PRFileDesc *debug_out = NULL;
--- a/pr/tests/testfile.c
+++ b/pr/tests/testfile.c
@@ -56,24 +56,16 @@
 #define INCL_DOSFILEMGR
 #include <os2.h>
 #include <getopt.h>
 #include <errno.h>
 #endif /* XP_OS2 */
 
 static int _debug_on = 0;
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "primpl.h"
-#define printf PR_LogPrint
-#define setbuf(x,y)
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #ifdef WINCE
 #define setbuf(x,y)
 #endif
 
 #ifdef XP_WIN
 #define mode_t int
 #endif
 
@@ -682,84 +674,36 @@ HANDLE hfile;
 		if (fd_file == NULL) {
 			printf(
 					"testfile failed to create/open file %s [%d, %d]\n",
 					pathname, PR_GetError(), PR_GetOSError());
 			return -1;
 		}
         PR_Close(fd_file);
 	}
-#if defined(XP_UNIX) || defined(XP_MAC) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
 	/*
 	 * Create a hidden file - a platform-dependent operation
 	 */
 	strcpy(pathname, TEST_DIR);
 	strcat(pathname, "/");
 	strcat(pathname, HIDDEN_FILE_NAME);
-#if defined(XP_UNIX) || defined(XP_MAC) || defined(XP_BEOS)
+#if defined(XP_UNIX) || defined(XP_BEOS)
 	DPRINTF(("Creating hidden test file %s\n",pathname));
 	fd_file = PR_Open(pathname, PR_RDWR | PR_CREATE_FILE, 0777);
 
 	if (fd_file == NULL) {
 		printf(
 				"testfile failed to create/open hidden file %s [%d, %d]\n",
 				pathname, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
 
-#if defined(XP_MAC)
-	{
-#include <files.h>
-
-	OSErr			err;
-	FCBPBRec		fcbpb;
-	CInfoPBRec		pb;
-	Str255			pascalMacPath;
-
-	fcbpb.ioNamePtr = pascalMacPath;
-	fcbpb.ioVRefNum = 0;
-	fcbpb.ioRefNum = fd_file->secret->md.osfd;
-	fcbpb.ioFCBIndx = 0;
-	
-	err = PBGetFCBInfoSync(&fcbpb);
-	if (err != noErr) {
-    	PR_Close(fd_file);
-    	return -1;
-	}
-	
-	pb.hFileInfo.ioNamePtr = pascalMacPath;
-	pb.hFileInfo.ioVRefNum = fcbpb.ioFCBVRefNum;
-	pb.hFileInfo.ioDirID = fcbpb.ioFCBParID;
-	pb.hFileInfo.ioFDirIndex = 0;
-	
-	err = PBGetCatInfoSync(&pb);
-	if (err != noErr) {
-    	PR_Close(fd_file);
-    	return -1;
-	}
-
-	pb.hFileInfo.ioNamePtr = pascalMacPath;
-	pb.hFileInfo.ioVRefNum = fcbpb.ioFCBVRefNum;
-	pb.hFileInfo.ioDirID = fcbpb.ioFCBParID;
-	pb.hFileInfo.ioFDirIndex = 0;
-	
-	pb.hFileInfo.ioFlFndrInfo.fdFlags |= fInvisible;
-
-	err = PBSetCatInfoSync(&pb);
-	if (err != noErr) {
-    	PR_Close(fd_file);
-    	return -1;
-	}
-
-	}
-#endif
-
     PR_Close(fd_file);
 
-	
 #elif defined(WINCE)
 	DPRINTF(("Creating hidden test file %s\n",pathname));
     MultiByteToWideChar(CP_ACP, 0, pathname, -1, wPathname, 256); 
 	hfile = CreateFile(wPathname, GENERIC_READ,
 						FILE_SHARE_READ|FILE_SHARE_WRITE,
 						NULL,
 						CREATE_NEW,
 						FILE_ATTRIBUTE_HIDDEN,
@@ -791,19 +735,19 @@ HANDLE hfile;
 	fd_file = PR_Open(pathname, PR_RDWR | PR_CREATE_FILE, (int)FILE_HIDDEN);
 
 	if (fd_file == NULL) {
 		printf("testfile failed to create/open hidden file %s [%d, %d]\n",
 				pathname, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
 	PR_Close(fd_file);
-#endif	/* XP _UNIX || XP_MAC*/
+#endif	/* XP_UNIX */
 
-#endif	/* XP_UNIX || XP_MAC ||(XP_PC && WIN32) */
+#endif	/* XP_UNIX || (XP_PC && WIN32) */
 
 
 	if (PR_FAILURE == PR_CloseDir(fd_dir))
 	{
 		printf(
 			"testfile failed to close dirctory %s [%d, %d]\n",
 			TEST_DIR, PR_GetError(), PR_GetOSError());
 		return -1;
@@ -815,17 +759,17 @@ HANDLE hfile;
 			TEST_DIR, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
   
 	/*
 	 * List all files, including hidden files
 	 */
 	DPRINTF(("Listing all files in directory %s\n",TEST_DIR));
-#if defined(XP_UNIX) || defined(XP_MAC) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
 	num_files = FILES_IN_DIR + 1;
 #else
 	num_files = FILES_IN_DIR;
 #endif
 	while ((dirEntry = PR_ReadDir(fd_dir, PR_SKIP_BOTH)) != NULL) {
 		num_files--;
 		strcpy(pathname, TEST_DIR);
 		strcat(pathname, "/");
@@ -851,17 +795,17 @@ HANDLE hfile;
 		printf(
 			"testfile failed to find all files in directory %s [%d, %d]\n",
 			TEST_DIR, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
 
     PR_CloseDir(fd_dir);
 
-#if defined(XP_UNIX) || defined(XP_MAC) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
+#if defined(XP_UNIX) || (defined(XP_PC) && defined(WIN32)) || defined(XP_OS2) || defined(XP_BEOS)
 
 	/*
 	 * List all files, except hidden files
 	 */
 
 	fd_dir = PR_OpenDir(TEST_DIR);
 	if (fd_dir == NULL) {
 		printf(
@@ -888,17 +832,17 @@ HANDLE hfile;
 	if (PR_FAILURE == PR_Delete(pathname)) {
 		printf(
 			"testfile failed to delete hidden file %s [%d, %d]\n",
 			pathname, PR_GetError(), PR_GetOSError());
 		return -1;
 	}
 
     PR_CloseDir(fd_dir);
-#endif	/* XP_UNIX || XP_MAC || (XP_PC && WIN32) */
+#endif	/* XP_UNIX || (XP_PC && WIN32) */
 
 	strcpy(renamename, TEST_DIR);
 	strcat(renamename, ".RENAMED");
 	if (PR_FAILURE == PR_Rename(TEST_DIR, renamename)) {
 		printf(
 			"testfile failed to rename directory %s [%d, %d]\n",
 			TEST_DIR, PR_GetError(), PR_GetOSError());
 		return -1;
@@ -995,20 +939,16 @@ int main(int argc, char **argv)
                         default:
                                 break;
                 }
         }
 #endif
 	PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("testfile.log");
-#endif
-
 	mon = PR_NewMonitor();
 	if (mon == NULL) {
 		printf("testfile: PR_NewMonitor failed\n");
 		exit(2);
 	}
 #ifdef WIN32
 
 #ifdef WINCE
--- a/pr/tests/threads.c
+++ b/pr/tests/threads.c
@@ -38,22 +38,16 @@
 #include "nspr.h"
 #include "prinrval.h"
 #include "plgetopt.h"
 #include "pprthred.h"
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 PRMonitor *mon;
 PRInt32 count, iterations, alive;
 
 PRBool debug_mode = PR_FALSE, passed = PR_TRUE;
 
 void 
 PR_CALLBACK
 ReallyDumbThread(void *arg)
@@ -195,27 +189,19 @@ int main(int argc, char **argv)
                 break;
              default:
                 break;
             }
         }
     	PL_DestroyOptState(opt);
     }
 
-#ifdef XP_MAC
-	SetupMacPrintfLog("threads.log");
-	count = 10;
-	iterations = 10;
-	debug_mode = PR_TRUE;
-#else
     if (0 == count) count = 50;
     if (0 == iterations) iterations = 10;
 
-#endif
-
     if (debug_mode)
     {
     printf("\
 ** Tests lots of thread creations.  \n\
 ** Create %ld native threads %ld times. \n\
 ** Create %ld user threads %ld times \n", iterations,count,iterations,count);
     }
 
--- a/pr/tests/thrpool_client.c
+++ b/pr/tests/thrpool_client.c
@@ -60,29 +60,17 @@
 #ifdef WIN32
 #include <process.h>
 #endif
 
 static int _debug_on = 0;
 static int server_port = -1;
 static char *program_name = NULL;
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-    PR_LogPrint(fmt);
-    return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 #ifdef XP_PC
 #define mode_t int
 #endif
 
 #define DPRINTF(arg) if (_debug_on) printf arg
 
 #define    BUF_DATA_SIZE    (2 * 1024)
@@ -371,19 +359,16 @@ int main(int argc, char **argv)
             break;
         }
     }
     PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("socket.log");
-#endif
     PR_SetConcurrency(4);
 
 	TCP_Socket_Client_Server_Test();
 
     PR_Cleanup();
     if (failed_already)
 		return 1;
     else
--- a/pr/tests/thrpool_server.c
+++ b/pr/tests/thrpool_server.c
@@ -67,29 +67,17 @@
 #ifdef WIN32
 #include <process.h>
 #endif
 
 static int _debug_on = 0;
 static char *program_name = NULL;
 static void serve_client_write(void *arg);
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "prsem.h"
-int fprintf(FILE *stream, const char *fmt, ...)
-{
-    PR_LogPrint(fmt);
-    return 0;
-}
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#else
 #include "obsolete/prsem.h"
-#endif
 
 #ifdef XP_PC
 #define mode_t int
 #endif
 
 #define DPRINTF(arg) if (_debug_on) printf arg
 
 
@@ -576,19 +564,16 @@ int main(int argc, char **argv)
             break;
         }
     }
     PL_DestroyOptState(opt);
 
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("socket.log");
-#endif
     PR_SetConcurrency(4);
 
 	tp = PR_CreateThreadPool(initial_threads, max_threads, stacksize);
     if (NULL == tp) {
         printf("PR_CreateThreadPool failed\n");
         failed_already=1;
         goto done;
 	}
--- a/pr/tests/timemac.c
+++ b/pr/tests/timemac.c
@@ -38,22 +38,16 @@
 /*
  * file: timemac.c
  * description: test time and date routines on the Mac
  */
 #include <stdio.h>
 #include "prinit.h"
 #include "prtime.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 
 static char *dayOfWeek[] =
 	{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "???" };
 static char *month[] =
 	{ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
 	  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "???" };
 
 static void printExplodedTime(const PRExplodedTime *et) {
@@ -86,20 +80,16 @@ static void printExplodedTime(const PREx
 }
 
 int main(int argc, char** argv)
 {
     PR_STDIO_INIT();
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
 
  
-#ifdef XP_MAC
-	SetupMacPrintfLog("timemac.log");
-#endif
-
    /*
      *************************************************************
      **
      **  Testing PR_Now(), PR_ExplodeTime, and PR_ImplodeTime
      **  on the current time
      **
      *************************************************************
      */
--- a/pr/tests/timetest.c
+++ b/pr/tests/timetest.c
@@ -48,22 +48,16 @@
 #include "prinit.h"
 #include "prtime.h"
 #include "prprf.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "macstdlibextras.h"
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 int failed_already=0;
 PRBool debug_mode = PR_FALSE;
 
 static char *dayOfWeek[] =
 	{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "???" };
 static char *month[] =
 	{ "Jan", "Feb", "Mar", "Apr", "May", "Jun",
 	  "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "???" };
@@ -201,21 +195,16 @@ int main(int argc, char** argv)
         }
     }
 	PL_DestroyOptState(opt);
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
 
-#ifdef XP_MAC
-	/* Set up the console */
-	InitializeSIOUX(true);
-	debug_mode = PR_TRUE;
-#endif
     /* Testing zero PRTime (the epoch) */
     {
 	PRTime t;
 	PRExplodedTime et;
 
 	LL_I2L(t, 0);
 	if (debug_mode) printf("The NSPR epoch is:\n");
         PR_ExplodeTime(t, PR_LocalTimeParameters, &et);
@@ -771,22 +760,12 @@ int main(int argc, char** argv)
                     }
 
 		    et = et1;
 		}
 	    }
         }
     }
 
-#ifdef XP_MAC
-	if (1)
-	{
-		char dummyChar;
-		
-		printf("Press return to exit\n\n");
-		scanf("%c", &dummyChar);
-	}
-#endif
-
 	if (failed_already) return 1;
 	else return 0;
 
 }
--- a/pr/tests/tmoacc.c
+++ b/pr/tests/tmoacc.c
@@ -38,21 +38,16 @@
 #include "nspr.h"
 
 #include <stdlib.h>
 #include <string.h>
 
 #include "plerror.h"
 #include "plgetopt.h"
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 #define BASE_PORT 9867
 #define DEFAULT_THREADS 1
 #define DEFAULT_BACKLOG 10
 #define DEFAULT_TIMEOUT 10
 #define RANDOM_RANGE 100  /* should be significantly smaller than RAND_MAX */
 
 typedef enum {running, stopped} Status;
 
--- a/pr/tests/tmocon.c
+++ b/pr/tests/tmocon.c
@@ -67,21 +67,16 @@
 
 /* for getcwd */
 #if defined(XP_UNIX) || defined (XP_OS2) || defined(XP_BEOS)
 #include <unistd.h>
 #elif defined(XP_PC)
 #include <direct.h>
 #endif
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 
 #define BASE_PORT 9867
 
 #define DEFAULT_DALLY 1
 #define DEFAULT_THREADS 1
 #define DEFAULT_TIMEOUT 10
 #define DEFAULT_MESSAGES 100
 #define DEFAULT_MESSAGESIZE 100
--- a/pr/tests/tpd.c
+++ b/pr/tests/tpd.c
@@ -42,21 +42,17 @@
 
 #include "prmem.h"
 #include "prinit.h"
 #include "prlog.h"
 #include "prprf.h"
 #include "prthread.h"
 #include "prtypes.h"
 
-#if defined(XP_MAC)
-#include "pprio.h"
-#else
 #include "private/pprio.h"
-#endif
 
 #include "plgetopt.h"
 
 static PRUintn key[128];
 static PRIntn debug = 0;
 static PRBool failed = PR_FALSE;
 static PRBool should = PR_TRUE;
 static PRBool did = PR_TRUE;
--- a/pr/tests/udpsrv.c
+++ b/pr/tests/udpsrv.c
@@ -490,20 +490,16 @@ int main(int argc, char **argv)
         }
     }
 	PL_DestroyOptState(opt);
 		
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     PR_STDIO_INIT();
     output = PR_STDERR;
 
-#ifdef XP_MAC
-    SetupMacPrintfLog("udpsrv.log");
-#endif
-
     PR_SetConcurrency(4);
     
     /*
     ** Create the Server thread
     */    
     DPRINTF( "udpsrv: Creating Server Thread\n" );
     srv =  PR_CreateThread( PR_USER_THREAD,
             UDP_Server,
--- a/pr/tests/writev.c
+++ b/pr/tests/writev.c
@@ -37,21 +37,16 @@
 
 #include "nspr.h"
 
 #include "plgetopt.h"
 
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
 
 #ifndef IOV_MAX
 #define IOV_MAX 16
 #endif
 
 #define BASE_PORT 9867
 
 int PR_CALLBACK Writev(int argc, char **argv)
--- a/pr/tests/y2k.c
+++ b/pr/tests/y2k.c
@@ -51,22 +51,16 @@
 #include "prtime.h"
 #include "prprf.h"
 #include "prlog.h"
 
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 
-#ifdef XP_MAC
-#include "prlog.h"
-#include "macstdlibextras.h"
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
 #define PRINT_DETAILS
 
 int failed_already=0;
 PRBool debug_mode = PR_FALSE;
 
 static char *dayOfWeek[] =
 	{ "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "???" };
 static char *month[] =
@@ -787,22 +781,16 @@ int main(int argc, char** argv)
     }
 	PL_DestroyOptState(opt);
 
  /* main test */
 	
     PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
     lm = PR_NewLogModule("test");
 
-#ifdef XP_MAC
-	/* Set up the console */
-	InitializeSIOUX(true);
-	debug_mode = PR_TRUE;
-#endif
-
     if ( PR_FAILURE == TestExplodeImplodeTime())
     {
         PR_LOG( lm, PR_LOG_ERROR,
             ("TestExplodeImplodeTime() failed"));
     }
     else
     	printf("Test 1: Calendar Time Test passed\n");
 
@@ -817,24 +805,14 @@ int main(int argc, char** argv)
     if ( PR_FAILURE == TestParseTime())
     {
         PR_LOG( lm, PR_LOG_ERROR,
             ("TestParseTime() failed"));
     }
     else
     	printf("Test 3: Parse Time Test passed\n");
 
-#ifdef XP_MAC
-	if (1)
-	{
-		char dummyChar;
-		
-		printf("Press return to exit\n\n");
-		scanf("%c", &dummyChar);
-	}
-#endif
-
 	if (failed_already) 
 	    return 1;
 	else 
 	    return 0;
 } /* end main() y2k.c */