summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2009-05-06 05:40:39 +0000
committerwtc%google.com <devnull@localhost>2009-05-06 05:40:39 +0000
commit70eab9ec5d635fffed0099faac90b964e4adb087 (patch)
treeaba26ff7c9f47e742b45187fa9ce96416d45e3cf
parentebc2e0fd858b7882dee5c507aff0f562785b20f7 (diff)
downloadnspr-hg-70eab9ec5d635fffed0099faac90b964e4adb087.tar.gz
Bug 476996: removed the remaining XP_MAC code. The patch is contributed by
Zack Weinberg <zweinberg@mozilla.com>. r=wtc.
-rw-r--r--lib/ds/plarena.c15
-rw-r--r--lib/ds/plhash.c16
-rw-r--r--lib/msgc/src/prgcapi.c8
-rw-r--r--lib/msgc/src/prmsgc.c28
-rw-r--r--lib/msgc/tests/gc1.c15
-rw-r--r--lib/msgc/tests/thrashgc.c32
-rw-r--r--pr/include/obsolete/probslet.h4
-rw-r--r--pr/include/obsolete/protypes.h13
-rw-r--r--pr/include/prenv.h7
-rw-r--r--pr/include/private/pprio.h9
-rw-r--r--pr/include/private/pprthred.h10
-rw-r--r--pr/include/private/primpl.h20
-rw-r--r--pr/include/private/prpriv.h5
-rw-r--r--pr/include/prtypes.h22
-rw-r--r--pr/src/io/prfile.c32
-rw-r--r--pr/src/io/prio.c6
-rw-r--r--pr/src/io/prlog.c17
-rw-r--r--pr/src/io/prmwait.c3
-rw-r--r--pr/src/io/prsocket.c19
-rw-r--r--pr/src/md/prosdep.c4
-rw-r--r--pr/src/misc/pralarm.c4
-rw-r--r--pr/src/misc/prenv.c10
-rw-r--r--pr/src/misc/prinit.c12
-rw-r--r--pr/src/misc/prolock.c12
-rw-r--r--pr/src/misc/prsystem.c6
-rw-r--r--pr/src/misc/prthinfo.c7
-rw-r--r--pr/src/misc/prtime.c12
-rw-r--r--pr/src/prvrsion.c2
-rw-r--r--pr/src/threads/combined/prucpu.c3
-rw-r--r--pr/src/threads/combined/prucv.c4
-rw-r--r--pr/src/threads/combined/prulock.c8
-rw-r--r--pr/src/threads/combined/pruthr.c23
-rw-r--r--pr/src/threads/prcthr.c20
-rw-r--r--pr/src/threads/prsem.c4
-rw-r--r--pr/tests/accept.c7
-rw-r--r--pr/tests/alarm.c18
-rw-r--r--pr/tests/cltsrv.c10
-rw-r--r--pr/tests/concur.c4
-rw-r--r--pr/tests/cvar.c11
-rw-r--r--pr/tests/cvar2.c16
-rw-r--r--pr/tests/fileio.c12
-rw-r--r--pr/tests/inrval.c4
-rw-r--r--pr/tests/intrio.c6
-rw-r--r--pr/tests/intrupt.c11
-rw-r--r--pr/tests/io_timeout.c11
-rw-r--r--pr/tests/join.c12
-rw-r--r--pr/tests/joinkk.c11
-rw-r--r--pr/tests/joinku.c10
-rw-r--r--pr/tests/joinuk.c10
-rw-r--r--pr/tests/joinuu.c10
-rw-r--r--pr/tests/lock.c11
-rw-r--r--pr/tests/lockfile.c15
-rw-r--r--pr/tests/logger.c8
-rw-r--r--pr/tests/nbconn.c40
-rw-r--r--pr/tests/nonblock.c18
-rw-r--r--pr/tests/op_2long.c10
-rw-r--r--pr/tests/op_filnf.c13
-rw-r--r--pr/tests/op_filok.c11
-rw-r--r--pr/tests/op_noacc.c12
-rw-r--r--pr/tests/op_nofil.c11
-rw-r--r--pr/tests/perf.c11
-rwxr-xr-xpr/tests/poll_er.c2
-rw-r--r--pr/tests/poll_nm.c23
-rw-r--r--pr/tests/poll_to.c4
-rw-r--r--pr/tests/priotest.c7
-rw-r--r--pr/tests/provider.c10
-rw-r--r--pr/tests/prpoll.c4
-rw-r--r--pr/tests/ranfile.c11
-rw-r--r--pr/tests/sel_spd.c21
-rwxr-xr-xpr/tests/selct_er.c2
-rw-r--r--pr/tests/selct_nm.c4
-rw-r--r--pr/tests/selct_to.c4
-rw-r--r--pr/tests/sem.c12
-rw-r--r--pr/tests/socket.c25
-rw-r--r--pr/tests/sockopt.c26
-rw-r--r--pr/tests/suspend.c15
-rw-r--r--pr/tests/switch.c5
-rw-r--r--pr/tests/testfile.c74
-rw-r--r--pr/tests/threads.c14
-rw-r--r--pr/tests/thrpool_client.c15
-rw-r--r--pr/tests/thrpool_server.c15
-rw-r--r--pr/tests/timemac.c10
-rw-r--r--pr/tests/timetest.c21
-rw-r--r--pr/tests/tmoacc.c5
-rw-r--r--pr/tests/tmocon.c5
-rw-r--r--pr/tests/tpd.c4
-rw-r--r--pr/tests/udpsrv.c4
-rw-r--r--pr/tests/writev.c5
-rw-r--r--pr/tests/y2k.c22
89 files changed, 15 insertions, 1089 deletions
diff --git a/lib/ds/plarena.c b/lib/ds/plarena.c
index c41d6b0a..2d274588 100644
--- a/lib/ds/plarena.c
+++ b/lib/ds/plarena.c
@@ -108,10 +108,6 @@ static void UnlockArena( void )
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.
@@ -345,17 +341,6 @@ PR_IMPLEMENT(void) PL_FinishArenaPool(PLArenaPool *pool)
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)
diff --git a/lib/ds/plhash.c b/lib/ds/plhash.c
index f82e2da8..4f69d04d 100644
--- a/lib/ds/plhash.c
+++ b/lib/ds/plhash.c
@@ -65,40 +65,24 @@
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);
}
diff --git a/lib/msgc/src/prgcapi.c b/lib/msgc/src/prgcapi.c
index 6b87220f..324ac7b9 100644
--- a/lib/msgc/src/prgcapi.c
+++ b/lib/msgc/src/prgcapi.c
@@ -43,11 +43,7 @@
#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"
/*
@@ -82,10 +78,6 @@ 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;
}
diff --git a/lib/msgc/src/prmsgc.c b/lib/msgc/src/prmsgc.c
index 13393df0..2c1e8539 100644
--- a/lib/msgc/src/prmsgc.c
+++ b/lib/msgc/src/prmsgc.c
@@ -58,11 +58,7 @@
#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);
@@ -130,11 +126,7 @@ static PRInt32 _pr_pageSize;
/* 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;
@@ -1287,9 +1279,6 @@ static void PrepareFinalize(void)
*/
extern void PR_CALLBACK _PR_ScanFinalQueue(void *notused)
{
-#ifdef XP_MAC
-#pragma unused (notused)
-#endif
PRCList *qp;
GCFinal *fp;
PRWord *p;
@@ -1308,9 +1297,6 @@ extern void PR_CALLBACK _PR_ScanFinalQueue(void *notused)
void PR_CALLBACK FinalizerLoop(void* unused)
{
-#ifdef XP_MAC
-#pragma unused (unused)
-#endif
GCFinal *fp;
PRWord *p;
PRWord h, tix;
@@ -1421,9 +1407,6 @@ PRCList _pr_freeWeakLinks = PR_INIT_STATIC_CLIST(&_pr_freeWeakLinks);
* 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);
@@ -1951,10 +1934,6 @@ pr_DumpUnknown(FILE *out, GCType* tp, PRWord tix, PRWord *p,
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);
}
@@ -2003,9 +1982,6 @@ PR_DumpMemory(PRBool 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);
@@ -2089,10 +2065,6 @@ 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);
}
diff --git a/lib/msgc/tests/gc1.c b/lib/msgc/tests/gc1.c
index d6846235..9bd485e9 100644
--- a/lib/msgc/tests/gc1.c
+++ b/lib/msgc/tests/gc1.c
@@ -45,21 +45,11 @@
#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;
@@ -193,11 +183,6 @@ int main(int argc, char **argv)
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();
diff --git a/lib/msgc/tests/thrashgc.c b/lib/msgc/tests/thrashgc.c
index 9d49ec19..a440d494 100644
--- a/lib/msgc/tests/thrashgc.c
+++ b/lib/msgc/tests/thrashgc.c
@@ -60,23 +60,13 @@
#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;
@@ -169,20 +159,12 @@ static void PR_CALLBACK AllocStuff(void *unused) {
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);
}
@@ -190,7 +172,6 @@ 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++) {
@@ -212,9 +193,6 @@ static int realMain(int argc, char **argv, char *notused) {
}
usage(progname);
}
-#else
- threads = 50;
-#endif
for (i = 0; i < threads; i++) {
PRThread* thread;
@@ -228,13 +206,8 @@ static int realMain(int argc, char **argv, char *notused) {
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;
}
}
@@ -255,11 +228,6 @@ int main(int argc, char **argv) {
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();
diff --git a/pr/include/obsolete/probslet.h b/pr/include/obsolete/probslet.h
index 98bed4d5..bad59474 100644
--- a/pr/include/obsolete/probslet.h
+++ b/pr/include/obsolete/probslet.h
@@ -169,11 +169,7 @@ 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 */
diff --git a/pr/include/obsolete/protypes.h b/pr/include/obsolete/protypes.h
index 8dffebc2..ee64810b 100644
--- a/pr/include/obsolete/protypes.h
+++ b/pr/include/obsolete/protypes.h
@@ -103,7 +103,7 @@ typedef PRUint64 uint64;
*/
#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;
@@ -140,7 +140,7 @@ typedef PRInt64 int64;
#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;
@@ -226,13 +226,4 @@ typedef PRWord prword_t;
#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) */
diff --git a/pr/include/prenv.h b/pr/include/prenv.h
index 2cae7d79..c73fffc7 100644
--- a/pr/include/prenv.h
+++ b/pr/include/prenv.h
@@ -145,13 +145,6 @@ NSPR_API(char*) PR_GetEnv(const char *var);
*/
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___ */
diff --git a/pr/include/private/pprio.h b/pr/include/private/pprio.h
index 61a454bc..8f296574 100644
--- a/pr/include/private/pprio.h
+++ b/pr/include/private/pprio.h
@@ -269,15 +269,6 @@ 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___ */
diff --git a/pr/include/private/pprthred.h b/pr/include/private/pprthred.h
index c9413396..fe8ae501 100644
--- a/pr/include/private/pprthred.h
+++ b/pr/include/private/pprthred.h
@@ -313,16 +313,6 @@ NSPR_API(PRIntn) PR_GetMonitorEntryCount(PRMonitor *mon);
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)
diff --git a/pr/include/private/primpl.h b/pr/include/private/primpl.h
index c0f4a3ab..15971bce 100644
--- a/pr/include/private/primpl.h
+++ b/pr/include/private/primpl.h
@@ -73,13 +73,8 @@
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>
@@ -328,10 +323,8 @@ NSPR_API(PRInt32) _pr_intsOff;
#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 */
@@ -376,20 +369,12 @@ extern PRInt32 _native_threads_only;
#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); \
@@ -1091,11 +1076,6 @@ extern PRStatus _PR_MD_DELETE_SEMAPHORE(const char *osname);
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
diff --git a/pr/include/private/prpriv.h b/pr/include/private/prpriv.h
index 780376e8..12a2cd6b 100644
--- a/pr/include/private/prpriv.h
+++ b/pr/include/private/prpriv.h
@@ -42,12 +42,7 @@
* 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___ */
diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h
index 2d963f14..dd66d0f5 100644
--- a/pr/include/prtypes.h
+++ b/pr/include/prtypes.h
@@ -112,22 +112,6 @@
#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
@@ -468,7 +452,7 @@ 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;
@@ -530,11 +514,7 @@ typedef unsigned long PRUword;
#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 */
diff --git a/pr/src/io/prfile.c b/pr/src/io/prfile.c
index 6545a48a..00dbb89d 100644
--- a/pr/src/io/prfile.c
+++ b/pr/src/io/prfile.c
@@ -132,9 +132,6 @@ static PROffset32 PR_CALLBACK FileSeek(PRFileDesc *fd, PROffset32 offset, PRSeek
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);
@@ -162,9 +159,6 @@ static PRInt32 PR_CALLBACK FileAvailable(PRFileDesc *fd)
static PRInt64 PR_CALLBACK FileAvailable64(PRFileDesc *fd)
{
-#ifdef XP_MAC
-#pragma unused( fd )
-#endif
PRInt64 result, cur, end;
PRInt64 minus_one;
@@ -198,10 +192,6 @@ static PRInt64 PR_CALLBACK PipeAvailable64(PRFileDesc *fd)
static PRStatus PR_CALLBACK PipeSync(PRFileDesc *fd)
{
-#if defined(XP_MAC)
-#pragma unused (fd)
-#endif
-
return PR_SUCCESS;
}
@@ -218,9 +208,6 @@ static PRStatus PR_CALLBACK FileGetInfo(PRFileDesc *fd, PRFileInfo *info)
static PRStatus PR_CALLBACK FileGetInfo64(PRFileDesc *fd, PRFileInfo64 *info)
{
-#ifdef XP_MAC
-#pragma unused( fd, info )
-#endif
/* $$$$ NOT YET IMPLEMENTED */
PRInt32 rv;
@@ -261,9 +248,6 @@ static PRStatus PR_CALLBACK FileClose(PRFileDesc *fd)
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 */
@@ -436,7 +420,7 @@ PR_IMPLEMENT(PRInt32) PR_GetSysfdTableMax(void)
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
@@ -485,10 +469,6 @@ PR_IMPLEMENT(PRInt32) PR_SetSysfdTableSize(int table_size)
|| 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
@@ -518,9 +498,6 @@ PR_IMPLEMENT(PRStatus) PR_GetFileInfo(const char *fn, PRFileInfo *info)
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();
@@ -715,10 +692,6 @@ PR_IMPLEMENT(PRStatus) PR_CreatePipe(
PRFileDesc **writePipe
)
{
-#if defined(XP_MAC)
-#pragma unused (readPipe, writePipe)
-#endif
-
#if defined(WIN32) && !defined(WINCE)
HANDLE readEnd, writeEnd;
SECURITY_ATTRIBUTES pipeAttributes;
@@ -827,9 +800,6 @@ PR_IMPLEMENT(PRFileDesc*) PR_OpenFileUTF16(
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();
diff --git a/pr/src/io/prio.c b/pr/src/io/prio.c
index 7426b723..b779b1c0 100644
--- a/pr/src/io/prio.c
+++ b/pr/src/io/prio.c
@@ -162,9 +162,6 @@ PR_IMPLEMENT(PRFileDesc*) PR_AllocFileDesc(
PR_IMPLEMENT(void) PR_FreeFileDesc(PRFileDesc *fd)
{
PR_ASSERT(fd);
-#ifdef XP_MAC
- _PR_MD_FREE_FILEDESC(fd);
-#endif
_PR_Putfd(fd);
}
@@ -200,9 +197,6 @@ PR_IMPLEMENT(PRStatus) PR_SetFDInheritable(
}
return PR_SUCCESS;
#else
-#ifdef XP_MAC
-#pragma unused (fd, inheritable)
-#endif
PR_SetError(PR_NOT_IMPLEMENTED_ERROR, 0);
return PR_FAILURE;
#endif
diff --git a/pr/src/io/prlog.c b/pr/src/io/prlog.c
index 0d6bfd15..c4d0b04b 100644
--- a/pr/src/io/prlog.c
+++ b/pr/src/io/prlog.c
@@ -128,8 +128,6 @@ static void OutputDebugStringA(const char* msg) {
#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
@@ -419,9 +417,6 @@ PR_IMPLEMENT(PRBool) PR_SetLogFile(const char *file)
PR_Close(logFile);
}
logFile = newLogFile;
-#if defined(XP_MAC)
- SetLogFileTypeCreator(file);
-#endif
}
return (PRBool) (newLogFile != 0);
#endif /* _PR_USE_STDIO_FOR_LOGGING */
@@ -549,23 +544,11 @@ PR_IMPLEMENT(void) PR_Assert(const char *s, const char *file, PRIntn 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
diff --git a/pr/src/io/prmwait.c b/pr/src/io/prmwait.c
index 6b3c46a3..5b30f694 100644
--- a/pr/src/io/prmwait.c
+++ b/pr/src/io/prmwait.c
@@ -1275,9 +1275,6 @@ invalid_arg:
PR_IMPLEMENT(PRWaitGroup*) PR_CreateWaitGroup(PRInt32 size /* ignored */)
{
-#ifdef XP_MAC
-#pragma unused (size)
-#endif
PRWaitGroup *wg;
if (NULL == (wg = PR_NEWZAP(PRWaitGroup)))
diff --git a/pr/src/io/prsocket.c b/pr/src/io/prsocket.c
index 1eae6d66..8b4ef269 100644
--- a/pr/src/io/prsocket.c
+++ b/pr/src/io/prsocket.c
@@ -355,14 +355,6 @@ static PRStatus PR_CALLBACK SocketConnectContinue(
}
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 */
@@ -765,10 +757,6 @@ static PRInt64 PR_CALLBACK SocketAvailable64(PRFileDesc *fd)
static PRStatus PR_CALLBACK SocketSync(PRFileDesc *fd)
{
-#if defined(XP_MAC)
-#pragma unused (fd)
-#endif
-
return PR_SUCCESS;
}
@@ -1117,9 +1105,6 @@ static PRStatus PR_CALLBACK SocketGetPeerName(PRFileDesc *fd, PRNetAddr *addr)
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 */
@@ -1684,11 +1669,7 @@ PR_IMPLEMENT(PRInt32) PR_FD_NISSET(PROsfd fd, PR_fd_set *set)
#if !defined(NEED_SELECT)
-#if !defined(XP_MAC)
#include "obsolete/probslet.h"
-#else
-#include "probslet.h"
-#endif
#define PD_INCR 20
diff --git a/pr/src/md/prosdep.c b/pr/src/md/prosdep.c
index 9130c239..d80256a4 100644
--- a/pr/src/md/prosdep.c
+++ b/pr/src/md/prosdep.c
@@ -76,10 +76,6 @@ static void GetPageSize(void)
#endif
#endif /* XP_UNIX */
-#ifdef XP_MAC
- _pr_pageSize = 4096;
-#endif /* XP_MAC */
-
#ifdef XP_BEOS
_pr_pageSize = B_PAGE_SIZE;
#endif
diff --git a/pr/src/misc/pralarm.c b/pr/src/misc/pralarm.c
index 9323bab6..932d077f 100644
--- a/pr/src/misc/pralarm.c
+++ b/pr/src/misc/pralarm.c
@@ -41,11 +41,7 @@
/******************************* 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 */
diff --git a/pr/src/misc/prenv.c b/pr/src/misc/prenv.c
index 5f16ce18..e07e0737 100644
--- a/pr/src/misc/prenv.c
+++ b/pr/src/misc/prenv.c
@@ -97,13 +97,3 @@ PR_IMPLEMENT(PRStatus) PR_SetEnv(const char *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
diff --git a/pr/src/misc/prinit.c b/pr/src/misc/prinit.c
index dc4ca98c..30b0c925 100644
--- a/pr/src/misc/prinit.c
+++ b/pr/src/misc/prinit.c
@@ -295,20 +295,12 @@ PR_IMPLEMENT(void) PR_UnblockClockInterrupts(void)
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);
@@ -857,13 +849,9 @@ PR_IMPLEMENT(PRStatus) PR_CallOnceWithArg(
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 */
diff --git a/pr/src/misc/prolock.c b/pr/src/misc/prolock.c
index f7339bac..a1d8a0f3 100644
--- a/pr/src/misc/prolock.c
+++ b/pr/src/misc/prolock.c
@@ -51,9 +51,6 @@ PR_IMPLEMENT(PROrderedLock *)
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;
@@ -65,9 +62,6 @@ PR_IMPLEMENT(void)
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() */
@@ -78,9 +72,6 @@ PR_IMPLEMENT(void)
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() */
@@ -91,9 +82,6 @@ PR_IMPLEMENT(PRStatus)
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;
diff --git a/pr/src/misc/prsystem.c b/pr/src/misc/prsystem.c
index 1c9fd861..1996468f 100644
--- a/pr/src/misc/prsystem.c
+++ b/pr/src/misc/prsystem.c
@@ -226,12 +226,6 @@ PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void )
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;
diff --git a/pr/src/misc/prthinfo.c b/pr/src/misc/prthinfo.c
index 76c44888..6dcf9c6a 100644
--- a/pr/src/misc/prthinfo.c
+++ b/pr/src/misc/prthinfo.c
@@ -37,11 +37,7 @@
#include "prlog.h"
#include "prthread.h"
-#ifdef XP_MAC
-#include "pprthred.h"
-#else
#include "private/pprthred.h"
-#endif
#include "primpl.h"
PR_IMPLEMENT(PRWord *)
@@ -175,9 +171,6 @@ typedef struct 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);
}
diff --git a/pr/src/misc/prtime.c b/pr/src/misc/prtime.c
index 9a3be28e..bd25c6a0 100644
--- a/pr/src/misc/prtime.c
+++ b/pr/src/misc/prtime.c
@@ -529,10 +529,6 @@ PR_NormalizeTime(PRExplodedTime *time, PRTimeParamFn params)
#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;
@@ -562,11 +558,7 @@ static struct tm *MT_safe_localtime(const time_t *clock, struct tm *result)
* 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 ||
@@ -908,10 +900,6 @@ PR_USPacificTimeParameters(const PRExplodedTime *gmt)
PR_IMPLEMENT(PRTimeParameters)
PR_GMTParameters(const PRExplodedTime *gmt)
{
-#if defined(XP_MAC)
-#pragma unused (gmt)
-#endif
-
PRTimeParameters retVal = { 0, 0 };
return retVal;
}
diff --git a/pr/src/prvrsion.c b/pr/src/prvrsion.c
index b8f4916d..7c494c65 100644
--- a/pr/src/prvrsion.c
+++ b/pr/src/prvrsion.c
@@ -41,9 +41,7 @@
/************************************************************************/
/**************************IDENTITY AND VERSIONING***********************/
/************************************************************************/
-#ifndef XP_MAC
#include "_pr_bld.h"
-#endif
#if !defined(_BUILD_TIME)
#ifdef HAVE_LONG_LONG
#define _BUILD_TIME 0
diff --git a/pr/src/threads/combined/prucpu.c b/pr/src/threads/combined/prucpu.c
index a3938b1f..3a3596be 100644
--- a/pr/src/threads/combined/prucpu.c
+++ b/pr/src/threads/combined/prucpu.c
@@ -392,9 +392,6 @@ static void PR_CALLBACK _PR_CPU_Idle(void *_cpu)
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 */
diff --git a/pr/src/threads/combined/prucv.c b/pr/src/threads/combined/prucv.c
index 80d919b8..6d5d6688 100644
--- a/pr/src/threads/combined/prucv.c
+++ b/pr/src/threads/combined/prucv.c
@@ -299,9 +299,7 @@ void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me)
_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;
@@ -348,10 +346,8 @@ void _PR_ClockInterrupt(void)
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);
diff --git a/pr/src/threads/combined/prulock.c b/pr/src/threads/combined/prulock.c
index 7c61fce1..b188ed5d 100644
--- a/pr/src/threads/combined/prulock.c
+++ b/pr/src/threads/combined/prulock.c
@@ -66,9 +66,7 @@ void _PR_IntsOn(_PRCPU *cpu)
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
@@ -92,10 +90,8 @@ void _PR_IntsOn(_PRCPU *cpu)
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)();
}
}
@@ -230,9 +226,7 @@ PR_IMPLEMENT(void) PR_Lock(PRLock *lock)
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);
@@ -343,9 +337,7 @@ PR_IMPLEMENT(PRStatus) PR_Unlock(PRLock *lock)
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;
}
diff --git a/pr/src/threads/combined/pruthr.c b/pr/src/threads/combined/pruthr.c
index 7e31b56b..9609d4d9 100644
--- a/pr/src/threads/combined/pruthr.c
+++ b/pr/src/threads/combined/pruthr.c
@@ -49,10 +49,6 @@
#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
@@ -98,10 +94,6 @@ 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;
@@ -116,8 +108,6 @@ void _PR_InitThreads(PRThreadType type, PRThreadPriority priority,
#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);
@@ -923,9 +913,7 @@ void _PR_Schedule(void)
/*
* 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;
@@ -1005,10 +993,6 @@ static PRThread *
_PR_AttachThread(PRThreadType type, PRThreadPriority priority,
PRThreadStack *stack)
{
-#if defined(XP_MAC)
-#pragma unused (type)
-#endif
-
PRThread *thread;
char *mem;
@@ -1047,10 +1031,6 @@ _PR_NativeCreateThread(PRThreadType type,
PRUint32 stackSize,
PRUint32 flags)
{
-#if defined(XP_MAC)
-#pragma unused (scope)
-#endif
-
PRThread *thread;
thread = _PR_AttachThread(type, priority, NULL);
@@ -1504,9 +1484,6 @@ PRThread* _PRI_AttachThread(PRThreadType type,
PR_IMPLEMENT(PRThread*) PR_AttachThread(PRThreadType type,
PRThreadPriority priority, PRThreadStack *stack)
{
-#ifdef XP_MAC
-#pragma unused( type, priority, stack )
-#endif
return PR_GetCurrentThread();
}
diff --git a/pr/src/threads/prcthr.c b/pr/src/threads/prcthr.c
index 1e2f469c..7c3e6273 100644
--- a/pr/src/threads/prcthr.c
+++ b/pr/src/threads/prcthr.c
@@ -304,11 +304,6 @@ 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
}
@@ -322,11 +317,6 @@ PR_IMPLEMENT(PRInt32) PR_SetThreadAffinityMask(PRThread *thread, PRUint32 mask )
return 0;
#endif
#else
-
-#if defined(XP_MAC)
-#pragma unused (thread, mask)
-#endif
-
return 0;
#endif
}
@@ -354,10 +344,6 @@ PR_IMPLEMENT(PRInt32) PR_SetCPUAffinityMask(PRUint32 mask)
}
#endif
-#if defined(XP_MAC)
-#pragma unused (mask)
-#endif
-
return 0;
}
@@ -397,9 +383,6 @@ PR_IMPLEMENT(PRThread*) PR_CreateThreadBound(PRThreadType type,
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;
@@ -423,9 +406,6 @@ PR_IMPLEMENT(void) PR_ClearThreadGCAble()
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)) {
diff --git a/pr/src/threads/prsem.c b/pr/src/threads/prsem.c
index 692bc0e9..d26897cd 100644
--- a/pr/src/threads/prsem.c
+++ b/pr/src/threads/prsem.c
@@ -36,11 +36,7 @@
* ***** END LICENSE BLOCK ***** */
#include "primpl.h"
-#if defined(XP_MAC)
-#include "prsem.h"
-#else
#include "obsolete/prsem.h"
-#endif
/************************************************************************/
diff --git a/pr/tests/accept.c b/pr/tests/accept.c
index 1d59d5e8..f1bfde46 100644
--- a/pr/tests/accept.c
+++ b/pr/tests/accept.c
@@ -83,7 +83,7 @@
#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
@@ -489,11 +489,6 @@ int main(int argc, char **argv)
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");
diff --git a/pr/tests/alarm.c b/pr/tests/alarm.c
index 7af2ed4c..7ae9d4fd 100644
--- a/pr/tests/alarm.c
+++ b/pr/tests/alarm.c
@@ -58,11 +58,7 @@
#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"
@@ -78,12 +74,6 @@
#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;
@@ -296,10 +286,6 @@ static PRIntervalTime Alarms1(PRUint32 loops)
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;
@@ -534,10 +520,6 @@ int prmain(int argc, char** argv)
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)
{
diff --git a/pr/tests/cltsrv.c b/pr/tests/cltsrv.c
index da5a4b83..33553aa1 100644
--- a/pr/tests/cltsrv.c
+++ b/pr/tests/cltsrv.c
@@ -82,16 +82,10 @@
#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
*/
@@ -1033,10 +1027,6 @@ int main(int argc, char** argv)
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);
diff --git a/pr/tests/concur.c b/pr/tests/concur.c
index 1f22d014..d7b95394 100644
--- a/pr/tests/concur.c
+++ b/pr/tests/concur.c
@@ -50,11 +50,7 @@
#include "plgetopt.h"
-#if defined(XP_MAC)
-#include "pprio.h"
-#else
#include "private/pprio.h"
-#endif
#include <stdlib.h>
diff --git a/pr/tests/cvar.c b/pr/tests/cvar.c
index c3a84c5d..928e1d3c 100644
--- a/pr/tests/cvar.c
+++ b/pr/tests/cvar.c
@@ -66,12 +66,6 @@
#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;
@@ -302,11 +296,6 @@ static PRIntn PR_CALLBACK RealMain(int argc, char **argv)
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");
diff --git a/pr/tests/cvar2.c b/pr/tests/cvar2.c
index 604510ca..5c33c614 100644
--- a/pr/tests/cvar2.c
+++ b/pr/tests/cvar2.c
@@ -64,12 +64,6 @@
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;
@@ -947,10 +941,6 @@ static PRIntn PR_CALLBACK RealMain(int argc, char **argv)
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\
@@ -979,14 +969,8 @@ default_threads, default_threads*2, default_threads*3, default_threads*4);
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");
diff --git a/pr/tests/fileio.c b/pr/tests/fileio.c
index 0b154047..efd4235a 100644
--- a/pr/tests/fileio.c
+++ b/pr/tests/fileio.c
@@ -66,14 +66,7 @@
#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
@@ -195,11 +188,6 @@ int main(int argc, char **argv)
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 */
diff --git a/pr/tests/inrval.c b/pr/tests/inrval.c
index aa06845c..1fb35d13 100644
--- a/pr/tests/inrval.c
+++ b/pr/tests/inrval.c
@@ -54,11 +54,7 @@
#include "plgetopt.h"
#include "prinit.h"
-#ifdef XP_MAC
-#include "pralarm.h"
-#else
#include "obsolete/pralarm.h"
-#endif
#include "prio.h"
#include "prprf.h"
diff --git a/pr/tests/intrio.c b/pr/tests/intrio.c
index ad678b3b..3e7c9c12 100644
--- a/pr/tests/intrio.c
+++ b/pr/tests/intrio.c
@@ -46,12 +46,6 @@
#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;
diff --git a/pr/tests/intrupt.c b/pr/tests/intrupt.c
index 1385bddd..1d9dc691 100644
--- a/pr/tests/intrupt.c
+++ b/pr/tests/intrupt.c
@@ -55,12 +55,6 @@
#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;
@@ -258,11 +252,6 @@ void PR_CALLBACK Intrupt(void *arg)
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(
diff --git a/pr/tests/io_timeout.c b/pr/tests/io_timeout.c
index 2a680aa5..617d6e84 100644
--- a/pr/tests/io_timeout.c
+++ b/pr/tests/io_timeout.c
@@ -57,12 +57,6 @@
#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
@@ -276,11 +270,6 @@ int main(int argc, char **argv)
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);
diff --git a/pr/tests/join.c b/pr/tests/join.c
index 670df7ef..0875aeb2 100644
--- a/pr/tests/join.c
+++ b/pr/tests/join.c
@@ -64,11 +64,6 @@
#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
@@ -227,13 +222,6 @@ static PRIntn PR_CALLBACK RealMain(int argc, char **argv)
}
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);
diff --git a/pr/tests/joinkk.c b/pr/tests/joinkk.c
index 77f2176f..ac731d39 100644
--- a/pr/tests/joinkk.c
+++ b/pr/tests/joinkk.c
@@ -65,11 +65,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
PRIntn failed_already=0;
PRIntn debug_mode;
/*
@@ -159,12 +154,6 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
}
PL_DestroyOptState(opt);
-#ifdef XP_MAC
- SetupMacPrintfLog("join.log");
-#endif
-
-
-
/* main test */
if (debug_mode) printf("Kernel-Kernel test\n");
diff --git a/pr/tests/joinku.c b/pr/tests/joinku.c
index c639ce1a..89d15291 100644
--- a/pr/tests/joinku.c
+++ b/pr/tests/joinku.c
@@ -65,10 +65,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
PRIntn failed_already=0;
PRIntn debug_mode;
@@ -163,12 +159,6 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
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");
diff --git a/pr/tests/joinuk.c b/pr/tests/joinuk.c
index 07425932..284a64e5 100644
--- a/pr/tests/joinuk.c
+++ b/pr/tests/joinuk.c
@@ -65,10 +65,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
PRIntn failed_already=0;
PRIntn debug_mode;
/*
@@ -161,12 +157,6 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
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");
diff --git a/pr/tests/joinuu.c b/pr/tests/joinuu.c
index 71f17a83..d8958a31 100644
--- a/pr/tests/joinuu.c
+++ b/pr/tests/joinuu.c
@@ -65,10 +65,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
PRIntn failed_already=0;
PRIntn debug_mode;
@@ -163,12 +159,6 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
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);
diff --git a/pr/tests/lock.c b/pr/tests/lock.c
index 0f207ba0..4b0db4a4 100644
--- a/pr/tests/lock.c
+++ b/pr/tests/lock.c
@@ -87,12 +87,6 @@
#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;
@@ -499,11 +493,6 @@ int main(int argc, char **argv)
/* main test */
PR_SetConcurrency(8);
-#ifdef XP_MAC
- SetupMacPrintfLog("lock.log");
- debug_mode = 1;
-#endif
-
if (loops == 0) loops = 100;
if (debug_mode)
{
diff --git a/pr/tests/lockfile.c b/pr/tests/lockfile.c
index 27f8821e..c737f00d 100644
--- a/pr/tests/lockfile.c
+++ b/pr/tests/lockfile.c
@@ -66,22 +66,12 @@
#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;
@@ -241,11 +231,6 @@ int main(int argc, char **argv)
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);
diff --git a/pr/tests/logger.c b/pr/tests/logger.c
index d17f2f97..1280c269 100644
--- a/pr/tests/logger.c
+++ b/pr/tests/logger.c
@@ -49,10 +49,6 @@
#include <stdio.h>
-#ifdef XP_MAC
-extern void SetupMacPrintfLog(char *logFile);
-#endif
-
/* lth. re-define PR_LOG() */
#if 0
#undef PR_LOG_TEST
@@ -126,7 +122,6 @@ int main(int argc, char **argv)
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
PR_STDIO_INIT();
-#ifndef XP_MAC
if (argc > 1)
{
if (!PR_SetLogFile(argv[1]))
@@ -135,9 +130,6 @@ int main(int argc, char **argv)
goto exit;
}
}
-#else
- SetupMacPrintfLog("logger.log");
-#endif
/* Start logging something here */
PR_LogPrint("%s logging into %s\n", argv[0], argv[1]);
diff --git a/pr/tests/nbconn.c b/pr/tests/nbconn.c
index 099150a5..3598cba2 100644
--- a/pr/tests/nbconn.c
+++ b/pr/tests/nbconn.c
@@ -61,12 +61,6 @@
#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
@@ -94,10 +88,6 @@ int main(int argc, char **argv)
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
@@ -122,23 +112,11 @@ int main(int argc, char **argv)
}
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) {
@@ -175,11 +153,7 @@ int main(int argc, char **argv)
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);
@@ -203,8 +177,6 @@ int main(int argc, char **argv)
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;
@@ -218,7 +190,6 @@ int main(int argc, char **argv)
}
PR_Write(PR_STDOUT, buf, n);
}
-#endif
} else {
if (PR_GetError() == PR_IN_PROGRESS_ERROR) {
printf( "PR_GetConnectStatus: connect still in progress\n");
@@ -228,9 +199,6 @@ int main(int argc, char **argv)
PR_GetError(), PR_GetOSError());
}
PR_Close(sock);
-#ifdef XP_MAC
- } /* end of for loop */
-#endif
printf( "PASS\n");
return 0;
@@ -378,11 +346,7 @@ connection_success_test()
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());
@@ -556,11 +520,7 @@ connection_failure_test()
}
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());
diff --git a/pr/tests/nonblock.c b/pr/tests/nonblock.c
index 29376189..bacb1ceb 100644
--- a/pr/tests/nonblock.c
+++ b/pr/tests/nonblock.c
@@ -42,11 +42,7 @@
#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>
@@ -72,16 +68,6 @@
#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)
{
@@ -165,10 +151,6 @@ static PRIntn PR_CALLBACK RealMain( PRIntn argc, char **argv )
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");
diff --git a/pr/tests/op_2long.c b/pr/tests/op_2long.c
index 27f64d79..deb55b7a 100644
--- a/pr/tests/op_2long.c
+++ b/pr/tests/op_2long.c
@@ -57,12 +57,6 @@
#include "plerror.h"
#include "plgetopt.h"
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
static PRFileDesc *t1;
PRIntn error_code;
@@ -88,10 +82,6 @@ int main(int argc, char **argv)
}
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) {
diff --git a/pr/tests/op_filnf.c b/pr/tests/op_filnf.c
index 5f676250..c4cc48ee 100644
--- a/pr/tests/op_filnf.c
+++ b/pr/tests/op_filnf.c
@@ -57,24 +57,11 @@
#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) {
diff --git a/pr/tests/op_filok.c b/pr/tests/op_filok.c
index 5c3c65a9..9a5dc9b1 100644
--- a/pr/tests/op_filok.c
+++ b/pr/tests/op_filok.c
@@ -55,12 +55,6 @@
#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.
@@ -83,11 +77,6 @@ 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);
diff --git a/pr/tests/op_noacc.c b/pr/tests/op_noacc.c
index ab1254de..2bc6256c 100644
--- a/pr/tests/op_noacc.c
+++ b/pr/tests/op_noacc.c
@@ -56,23 +56,11 @@
#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);
diff --git a/pr/tests/op_nofil.c b/pr/tests/op_nofil.c
index 20bc11e1..fa7ed6df 100644
--- a/pr/tests/op_nofil.c
+++ b/pr/tests/op_nofil.c
@@ -56,12 +56,6 @@
#include <stdio.h>
#include "plgetopt.h"
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#else
-#endif
-
/*
* A file name that cannot exist
*/
@@ -71,11 +65,6 @@ 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) {
diff --git a/pr/tests/perf.c b/pr/tests/perf.c
index dda69682..4e2fc687 100644
--- a/pr/tests/perf.c
+++ b/pr/tests/perf.c
@@ -45,14 +45,7 @@
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;
@@ -428,10 +421,6 @@ int main(int argc, char **argv)
PR_UnblockClockInterrupts();
PR_STDIO_INIT();
-#ifdef XP_MAC
- SetupMacPrintfLog("perf.log");
-#endif
-
lock = PR_NewLock();
mon = PR_NewMonitor();
mon2 = PR_NewMonitor();
diff --git a/pr/tests/poll_er.c b/pr/tests/poll_er.c
index b68c7986..4a3d9cbb 100755
--- a/pr/tests/poll_er.c
+++ b/pr/tests/poll_er.c
@@ -89,8 +89,6 @@ ClientThreadFunc(void *arg)
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
diff --git a/pr/tests/poll_nm.c b/pr/tests/poll_nm.c
index 05304beb..b2000b77 100644
--- a/pr/tests/poll_nm.c
+++ b/pr/tests/poll_nm.c
@@ -63,17 +63,9 @@
#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>
@@ -84,16 +76,6 @@ 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)
{
@@ -166,11 +148,6 @@ int main(int argc, char **argv)
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");
diff --git a/pr/tests/poll_to.c b/pr/tests/poll_to.c
index c9197ed9..e1a101fc 100644
--- a/pr/tests/poll_to.c
+++ b/pr/tests/poll_to.c
@@ -64,11 +64,7 @@
#include "prprf.h"
#include "prnetdb.h"
-#ifndef XP_MAC
#include "private/pprio.h"
-#else
-#include "pprio.h"
-#endif
#include <stdio.h>
#include <string.h>
diff --git a/pr/tests/priotest.c b/pr/tests/priotest.c
index bff791c0..e08fb8af 100644
--- a/pr/tests/priotest.c
+++ b/pr/tests/priotest.c
@@ -40,11 +40,6 @@
* Purpose: testing priorities
*/
-#ifdef XP_MAC
-#error "This test does not run on Macintosh"
-#else
-
-
#include "prcmon.h"
#include "prinit.h"
#include "prinrval.h"
@@ -228,6 +223,4 @@ int main(int argc, char **argv)
} /* main */
-#endif /* ifdef XP_MAC */
-
/* priotest.c */
diff --git a/pr/tests/provider.c b/pr/tests/provider.c
index 4a1f2c7b..0f566159 100644
--- a/pr/tests/provider.c
+++ b/pr/tests/provider.c
@@ -82,16 +82,10 @@
#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
*/
@@ -1203,10 +1197,6 @@ int main(int argc, char **argv)
boolean = PR_SetLogFile("cltsrv.log");
MY_ASSERT(boolean);
-#ifdef XP_MAC
- debug_mode = PR_TRUE;
-#endif
-
if (serverIsLocal)
{
/* Establish the server */
diff --git a/pr/tests/prpoll.c b/pr/tests/prpoll.c
index 706ec192..116a4842 100644
--- a/pr/tests/prpoll.c
+++ b/pr/tests/prpoll.c
@@ -49,11 +49,7 @@
#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
diff --git a/pr/tests/ranfile.c b/pr/tests/ranfile.c
index 8fbc5854..c639382f 100644
--- a/pr/tests/ranfile.c
+++ b/pr/tests/ranfile.c
@@ -97,12 +97,6 @@ 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:
@@ -328,11 +322,6 @@ int main(int argc, char **argv)
interleave = PR_SecondsToInterval(10);
-#ifdef XP_MAC
- SetupMacPrintfLog("ranfile.log");
- debug_mode = 1;
-#endif
-
ml = PR_NewLock();
cv = PR_NewCondVar(ml);
diff --git a/pr/tests/sel_spd.c b/pr/tests/sel_spd.c
index 72b85f82..56388e6f 100644
--- a/pr/tests/sel_spd.c
+++ b/pr/tests/sel_spd.c
@@ -51,17 +51,6 @@
#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 {
@@ -76,13 +65,13 @@ typedef struct 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
@@ -488,10 +477,6 @@ int main(int argc, char **argv)
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",
diff --git a/pr/tests/selct_er.c b/pr/tests/selct_er.c
index e658813f..2a5b8b24 100755
--- a/pr/tests/selct_er.c
+++ b/pr/tests/selct_er.c
@@ -200,8 +200,6 @@ int main(int argc, char **argv)
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
diff --git a/pr/tests/selct_nm.c b/pr/tests/selct_nm.c
index 56a80a76..62927c90 100644
--- a/pr/tests/selct_nm.c
+++ b/pr/tests/selct_nm.c
@@ -65,11 +65,7 @@
#include "prerror.h"
#include "prnetdb.h"
-#ifdef XP_MAC
-#include "probslet.h"
-#else
#include "obsolete/probslet.h"
-#endif
#include <stdio.h>
#include <string.h>
diff --git a/pr/tests/selct_to.c b/pr/tests/selct_to.c
index b5600fa9..2a58d65b 100644
--- a/pr/tests/selct_to.c
+++ b/pr/tests/selct_to.c
@@ -64,11 +64,7 @@
#include "prprf.h"
#include "prnetdb.h"
-#ifdef XP_MAC
-#include "probslet.h"
-#else
#include "obsolete/probslet.h"
-#endif
#include "prerror.h"
diff --git a/pr/tests/sem.c b/pr/tests/sem.c
index 09c9f3cd..83e872cc 100644
--- a/pr/tests/sem.c
+++ b/pr/tests/sem.c
@@ -74,14 +74,7 @@ PRIntn debug_mode;
#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];
@@ -214,11 +207,6 @@ int main(int argc, char **argv)
/* 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 */
diff --git a/pr/tests/socket.c b/pr/tests/socket.c
index c3235d59..2acdd05e 100644
--- a/pr/tests/socket.c
+++ b/pr/tests/socket.c
@@ -64,19 +64,7 @@
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
@@ -129,16 +117,11 @@ char *LARGE_FILE_NAME = "/tmp/prsocket_test_dir/large_file";
#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
@@ -1103,12 +1086,7 @@ UDP_Socket_Client_Server_Test(void)
/*
* 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
@@ -2237,9 +2215,6 @@ int main(int argc, char **argv)
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");
diff --git a/pr/tests/sockopt.c b/pr/tests/sockopt.c
index 3765feac..5c7a899e 100644
--- a/pr/tests/sockopt.c
+++ b/pr/tests/sockopt.c
@@ -39,18 +39,13 @@
#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);
@@ -58,19 +53,6 @@ static void Failed(const char *msg1, const char *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;
@@ -110,10 +92,6 @@ int main(int argc, char **argv)
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
@@ -207,11 +185,7 @@ int main(int argc, char **argv)
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 */
diff --git a/pr/tests/suspend.c b/pr/tests/suspend.c
index d3cbc7f1..58a563b1 100644
--- a/pr/tests/suspend.c
+++ b/pr/tests/suspend.c
@@ -48,21 +48,10 @@ int main()
#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;
@@ -201,10 +190,6 @@ 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 {
diff --git a/pr/tests/switch.c b/pr/tests/switch.c
index 79981272..5c3211e6 100644
--- a/pr/tests/switch.c
+++ b/pr/tests/switch.c
@@ -52,12 +52,7 @@
#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>
diff --git a/pr/tests/testfile.c b/pr/tests/testfile.c
index b00dca99..f2fe4728 100644
--- a/pr/tests/testfile.c
+++ b/pr/tests/testfile.c
@@ -61,14 +61,6 @@
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
@@ -687,14 +679,14 @@ HANDLE hfile;
}
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);
@@ -705,56 +697,8 @@ HANDLE hfile;
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);
@@ -796,9 +740,9 @@ HANDLE hfile;
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))
@@ -820,7 +764,7 @@ HANDLE hfile;
* 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;
@@ -856,7 +800,7 @@ HANDLE hfile;
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
@@ -893,7 +837,7 @@ HANDLE hfile;
}
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");
@@ -1000,10 +944,6 @@ int main(int argc, char **argv)
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");
diff --git a/pr/tests/threads.c b/pr/tests/threads.c
index e1d188d4..2a9df417 100644
--- a/pr/tests/threads.c
+++ b/pr/tests/threads.c
@@ -43,12 +43,6 @@
#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;
@@ -200,17 +194,9 @@ int main(int argc, char **argv)
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("\
diff --git a/pr/tests/thrpool_client.c b/pr/tests/thrpool_client.c
index 2acf24fd..706f87ab 100644
--- a/pr/tests/thrpool_client.c
+++ b/pr/tests/thrpool_client.c
@@ -65,19 +65,7 @@ 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
@@ -376,9 +364,6 @@ int main(int argc, char **argv)
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();
diff --git a/pr/tests/thrpool_server.c b/pr/tests/thrpool_server.c
index e647186a..64355543 100644
--- a/pr/tests/thrpool_server.c
+++ b/pr/tests/thrpool_server.c
@@ -72,19 +72,7 @@ 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
@@ -581,9 +569,6 @@ int main(int argc, char **argv)
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);
diff --git a/pr/tests/timemac.c b/pr/tests/timemac.c
index c58c24bd..fd98a379 100644
--- a/pr/tests/timemac.c
+++ b/pr/tests/timemac.c
@@ -43,12 +43,6 @@
#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", "???" };
@@ -91,10 +85,6 @@ int main(int argc, char** argv)
PR_Init(PR_USER_THREAD, PR_PRIORITY_NORMAL, 0);
-#ifdef XP_MAC
- SetupMacPrintfLog("timemac.log");
-#endif
-
/*
*************************************************************
**
diff --git a/pr/tests/timetest.c b/pr/tests/timetest.c
index c57c15e6..d55a41b1 100644
--- a/pr/tests/timetest.c
+++ b/pr/tests/timetest.c
@@ -53,12 +53,6 @@
#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;
@@ -206,11 +200,6 @@ int main(int argc, char** argv)
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;
@@ -776,16 +765,6 @@ int main(int argc, char** argv)
}
}
-#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;
diff --git a/pr/tests/tmoacc.c b/pr/tests/tmoacc.c
index fa974a13..7ea6f0a9 100644
--- a/pr/tests/tmoacc.c
+++ b/pr/tests/tmoacc.c
@@ -43,11 +43,6 @@
#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
diff --git a/pr/tests/tmocon.c b/pr/tests/tmocon.c
index b762e451..0326e2d7 100644
--- a/pr/tests/tmocon.c
+++ b/pr/tests/tmocon.c
@@ -72,11 +72,6 @@
#include <direct.h>
#endif
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
#define BASE_PORT 9867
diff --git a/pr/tests/tpd.c b/pr/tests/tpd.c
index 6db204ce..4cbce5af 100644
--- a/pr/tests/tpd.c
+++ b/pr/tests/tpd.c
@@ -47,11 +47,7 @@
#include "prthread.h"
#include "prtypes.h"
-#if defined(XP_MAC)
-#include "pprio.h"
-#else
#include "private/pprio.h"
-#endif
#include "plgetopt.h"
diff --git a/pr/tests/udpsrv.c b/pr/tests/udpsrv.c
index b9b615a2..bf497a90 100644
--- a/pr/tests/udpsrv.c
+++ b/pr/tests/udpsrv.c
@@ -495,10 +495,6 @@ int main(int argc, char **argv)
PR_STDIO_INIT();
output = PR_STDERR;
-#ifdef XP_MAC
- SetupMacPrintfLog("udpsrv.log");
-#endif
-
PR_SetConcurrency(4);
/*
diff --git a/pr/tests/writev.c b/pr/tests/writev.c
index 603526c9..26e52480 100644
--- a/pr/tests/writev.c
+++ b/pr/tests/writev.c
@@ -42,11 +42,6 @@
#include <stdlib.h>
#include <string.h>
-#ifdef XP_MAC
-#include "prlog.h"
-#define printf PR_LogPrint
-#endif
-
#ifndef IOV_MAX
#define IOV_MAX 16
diff --git a/pr/tests/y2k.c b/pr/tests/y2k.c
index 80fc10a5..68ee245a 100644
--- a/pr/tests/y2k.c
+++ b/pr/tests/y2k.c
@@ -56,12 +56,6 @@
#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;
@@ -792,12 +786,6 @@ int main(int argc, char** argv)
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,
@@ -822,16 +810,6 @@ int main(int argc, char** argv)
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