Update to 4.6 which incorporates a lot of our local patches. There are now

a slew of test suites that can be run by issuing ``make tests'' from the port
directory.  They are disabled furing a normal build.

PR:		83345
Submitted by:	mi
This commit is contained in:
Joe Marcus Clarke 2005-07-13 03:14:59 +00:00
parent 29216de4a6
commit 34586a076e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=139021
10 changed files with 337 additions and 266 deletions

View file

@ -6,8 +6,7 @@
#
PORTNAME= nspr
PORTVERSION= 4.4.1
PORTREVISION= 1
PORTVERSION= 4.6
CATEGORIES= devel
MASTER_SITES= ${MASTER_SITE_MOZILLA}
MASTER_SITE_SUBDIR= nspr/releases/v${PORTVERSION}/src
@ -45,4 +44,27 @@ do-install:
${LN} -sf ${lib} ${PREFIX}/lib/${lib:S/.1$//}
.endfor
prtests:
${GMAKE} -C ${WRKSRC}/pr/tests runtests
libtests:
${GMAKE} -C ${WRKSRC}/lib/tests
${WRKSRC}/lib/tests/string
${WRKSRC}/lib/tests/base64t
# The test below is commented out, because arena requires
# command-line arguments. If you can provide reasonable values
# for it, please contact ${MAINTAINER}. Thank you.
# ${WRKSRC}/lib/tests/arena
#
#post-build test: libtests # prtests
#
#######################################################
# Several parts of the NSPR's comprehensive self-test
# suite appear broken. Please, consider typing
# make prtests
# To run them anyway. Your help in investigating
# any of the failures would be most appreciated.
# Please, contact ${MAINTAINER} with any patches. Thank you.
.include <bsd.port.mk>

View file

@ -1,2 +1,2 @@
MD5 (nspr-4.4.1.tar.gz) = 6187ec5f2c01554ceef2db35160f84dc
SIZE (nspr-4.4.1.tar.gz) = 1324075
MD5 (nspr-4.6.tar.gz) = a37c3cde875502e05576429312452465
SIZE (nspr-4.6.tar.gz) = 1279512

View file

@ -1,51 +0,0 @@
$FreeBSD$
--- ../config/FreeBSD.mk.orig Sat Jul 29 03:50:35 2000
+++ ../config/FreeBSD.mk Tue Dec 18 11:43:06 2001
@@ -37,19 +37,21 @@
include $(MOD_DEPTH)/config/UNIX.mk
-CC = gcc
-CCC = g++
+CCC = $(CXX)
RANLIB = ranlib
+# During FreeBSD port build, CFLAGS contains all of the optimizations
+# flags desired...
+OPTIMIZER = $(MOZ_OPTIMIZE_FLAGS)
+
ifeq ($(OS_TEST),alpha)
CPU_ARCH = alpha
else
-OS_REL_CFLAGS = -Di386
CPU_ARCH = x86
endif
CPU_ARCH_TAG = _$(CPU_ARCH)
-OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe $(THREAD_FLAG) -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
+OS_CFLAGS = $(DSO_CFLAGS) $(OS_REL_CFLAGS) -ansi -Wall -pipe -DFREEBSD -DHAVE_STRERROR -DHAVE_BSD_FLOCK
#
# The default implementation strategy for FreeBSD is pthreads.
@@ -60,8 +62,8 @@
else
USE_PTHREADS = 1
IMPL_STRATEGY = _PTH
-DEFINES += -D_THREAD_SAFE
-THREAD_FLAG += -pthread
+DEFINES += -D_THREAD_SAFE -D_REENTRANT
+DSO_LDOPTS += -pthread
endif
ARCH = freebsd
@@ -75,7 +77,7 @@
endif
DSO_CFLAGS = -fPIC
-DSO_LDOPTS = -Bshareable
+DSO_LDOPTS += -Bshareable
MKSHLIB = $(LD) $(DSO_LDOPTS)

View file

@ -1,161 +0,0 @@
--- ../pr/include/md/_freebsd.cfg.orig Wed Jan 2 13:06:24 2002
+++ ../pr/include/md/_freebsd.cfg Sun Feb 1 12:05:13 2004
@@ -91,7 +91,7 @@
#define PR_ALIGN_OF_DOUBLE 4
#define PR_ALIGN_OF_POINTER 4
-#elif defined(__alpha)
+#elif defined(__alpha__)
#define IS_LITTLE_ENDIAN 1
#undef IS_BIG_ENDIAN
@@ -138,6 +138,149 @@
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 8
+#elif defined(__sparc64__)
+#undef IS_LITTLE_ENDIAN
+#define IS_BIG_ENDIAN 1
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_DOUBLE 8
+#define IS_64
+
+#define PR_BYTES_PER_BYTE 1
+#define PR_BYTES_PER_SHORT 2
+#define PR_BYTES_PER_INT 4
+#define PR_BYTES_PER_INT64 8
+#define PR_BYTES_PER_LONG 8
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 8
+#define PR_BYTES_PER_DWORD 8
+#define PR_BYTES_PER_WORD_LOG2 3
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#define PR_BITS_PER_BYTE 8
+#define PR_BITS_PER_SHORT 16
+#define PR_BITS_PER_INT 32
+#define PR_BITS_PER_INT64 64
+#define PR_BITS_PER_LONG 64
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 64
+
+#define PR_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 6
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 6
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 8
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_POINTER 8
+
+#define HAVE_LONG_LONG
+#define HAVE_ALIGNED_DOUBLES
+#define HAVE_ALIGNED_LONGLONGS
+
+#elif defined(__ia64__)
+#define IS_LITTLE_ENDIAN 1
+#undef IS_BIG_ENDIAN
+#define HAVE_LONG_LONG
+#define HAVE_ALIGNED_DOUBLES
+#define HAVE_ALIGNED_LONGLONGS
+#define IS_64
+
+#define PR_BYTES_PER_BYTE 1
+#define PR_BYTES_PER_SHORT 2
+#define PR_BYTES_PER_INT 4
+#define PR_BYTES_PER_INT64 8
+#define PR_BYTES_PER_LONG 8
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 8
+#define PR_BYTES_PER_DWORD 8
+
+#define PR_BITS_PER_BYTE 8
+#define PR_BITS_PER_SHORT 16
+#define PR_BITS_PER_INT 32
+#define PR_BITS_PER_INT64 64
+#define PR_BITS_PER_LONG 64
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 64
+
+#define PR_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 6
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 6
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 8
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_DOUBLE 8
+#define PR_ALIGN_OF_POINTER 8
+#define PR_ALIGN_OF_WORD 8
+
+#define PR_BYTES_PER_WORD_LOG2 3
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#elif defined(__amd64__)
+#define IS_LITTLE_ENDIAN 1
+#undef IS_BIG_ENDIAN
+#define IS_64
+
+#define PR_BYTES_PER_BYTE 1
+#define PR_BYTES_PER_SHORT 2
+#define PR_BYTES_PER_INT 4
+#define PR_BYTES_PER_INT64 8
+#define PR_BYTES_PER_LONG 8
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 8
+#define PR_BYTES_PER_DWORD 8
+
+#define PR_BITS_PER_BYTE 8
+#define PR_BITS_PER_SHORT 16
+#define PR_BITS_PER_INT 32
+#define PR_BITS_PER_INT64 64
+#define PR_BITS_PER_LONG 64
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 64
+
+#define PR_BITS_PER_BYTE_LOG2 3
+#define PR_BITS_PER_SHORT_LOG2 4
+#define PR_BITS_PER_INT_LOG2 5
+#define PR_BITS_PER_INT64_LOG2 6
+#define PR_BITS_PER_LONG_LOG2 6
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 6
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 8
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_DOUBLE 8
+#define PR_ALIGN_OF_POINTER 8
+#define PR_ALIGN_OF_WORD 8
+
+#define PR_BYTES_PER_WORD_LOG2 3
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#define HAVE_LONG_LONG
+#define HAVE_ALIGNED_DOUBLES
+#define HAVE_ALIGNED_LONGLONGS
#else
#error "Unknown CPU architecture"

View file

@ -1,25 +0,0 @@
--- ../pr/include/md/_freebsd.h Thu Jan 16 08:16:27 2003
+++ ../pr/include/md/_freebsd.h Sat Dec 13 13:22:20 2003
@@ -40,14 +40,21 @@
#if __FreeBSD__ >= 2
#include <osreldate.h> /* for __FreeBSD_version */
#endif
+#include <sys/param.h>
#include <sys/syscall.h>
#define PR_LINKER_ARCH "freebsd"
#define _PR_SI_SYSNAME "FREEBSD"
#if defined(__i386__)
#define _PR_SI_ARCHITECTURE "x86"
-#elif defined(__alpha)
+#elif defined(__alpha__)
#define _PR_SI_ARCHITECTURE "alpha"
+#elif defined(__sparc64__)
+#define _PR_SI_ARCHITECTURE "sparc"
+#elif defined(__ia64__)
+#define _PR_SI_ARCHITECTURE "ia64"
+#elif defined(__amd64__)
+#define _PR_SI_ARCHITECTURE "amd64"
#else
#error "Unknown CPU architecture"
#endif

View file

@ -1,11 +0,0 @@
--- ../pr/include/md/_pth.h.orig Mon Jul 26 07:23:42 2004
+++ ../pr/include/md/_pth.h Mon Jul 26 07:18:37 2004
@@ -90,7 +90,7 @@
#define _PT_PTHREAD_MUTEXATTR_INIT pthread_mutexattr_init
#define _PT_PTHREAD_MUTEXATTR_DESTROY pthread_mutexattr_destroy
#define _PT_PTHREAD_MUTEX_INIT(m, a) pthread_mutex_init(&(m), &(a))
-#define _PT_PTHREAD_MUTEX_IS_LOCKED(m) (EBUSY == pthread_mutex_trylock(&(m)))
+#define _PT_PTHREAD_MUTEX_IS_LOCKED(m) (0 != pthread_mutex_trylock(&(m)))
#if defined(DARWIN)
#define _PT_PTHREAD_CONDATTR_INIT(x) 0
#else

View file

@ -1,12 +0,0 @@
--- ../pr/src/io/prprf.c Thu Jan 23 09:03:22 2003
+++ ../pr/src/io/prprf.c Thu Oct 16 23:14:36 2003
@@ -52,5 +52,8 @@
** and requires array notation.
*/
-#if (defined(LINUX) && defined(__powerpc__)) || \
+#if defined(__amd64__)
+#include <stdarg.h>
+#define VARARGS_ASSIGN(foo, bar) va_copy((foo), (bar))
+#elif (defined(LINUX) && defined(__powerpc__)) || \
(defined(LINUX) && defined(__s390__)) || \
(defined(LINUX) && defined(__s390x__)) || \

View file

@ -0,0 +1,35 @@
pthread_t can well be a 64-bit value -- on FreeBSD/amd64, for example.
Better to just keep calling it pthread_t isntead of casting to anything.
-mi
--- ../pr/include/private/pprthred.h Sun Apr 25 11:00:56 2004
+++ ../pr/include/private/pprthred.h Tue Jul 12 00:52:42 2005
@@ -44,4 +44,5 @@
*/
#include "nspr.h"
+#include <pthread.h>
#if defined(XP_OS2)
@@ -92,5 +92,5 @@
** when it is created or attached.
*/
-NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread);
+NSPR_API(pthread_t) PR_GetThreadID(PRThread *thread);
/*
--- ../pr/src/pthreads/ptthread.c Wed May 25 22:27:51 2005
+++ ../pr/src/pthreads/ptthread.c Tue Jul 12 00:49:50 2005
@@ -979,10 +979,10 @@
}
-PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred)
+PR_IMPLEMENT(pthread_t) PR_GetThreadID(PRThread *thred)
{
#if defined(_PR_DCETHREADS)
return (PRUint32)&thred->id; /* this is really a sham! */
#else
- return (PRUint32)thred->id; /* and I don't know what they will do with it */
+ return thred->id; /* and I don't know what they will do with it */
#endif
}

View file

@ -0,0 +1,275 @@
--- ../pr/tests/cleanup.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/cleanup.c Tue Jul 12 01:19:53 2005
@@ -48,5 +48,5 @@
static void PR_CALLBACK Thread(void *sleep)
{
- PR_Sleep(PR_SecondsToInterval((PRUint32)sleep));
+ PR_Sleep(PR_SecondsToInterval((intptr_t)sleep));
printf("Thread exiting\n");
}
@@ -72,5 +72,6 @@
PRFileDesc *err = PR_GetSpecialFD(PR_StandardError);
PLOptState *opt = PL_CreateOptState(argc, argv, "Ghs:S:t:cC:");
- PRIntn concurrency = 1, child_sleep = 10, main_sleep = 5, threads = 1;
+ PRIntn concurrency = 1, main_sleep = 5, threads = 1;
+ intptr_t child_sleep = 10;
PR_STDIO_INIT();
@@ -113,5 +114,5 @@
PR_fprintf(err, "\tConcurrency: %d\n", concurrency);
PR_fprintf(err, "\tNumber of threads: %d\n", threads);
- PR_fprintf(err, "\tThread sleep: %d\n", child_sleep);
+ PR_fprintf(err, "\tThread sleep: %ld\n", (long)child_sleep);
PR_fprintf(err, "\tMain sleep: %d\n", main_sleep);
PR_fprintf(err, "\tCleanup will %sbe called\n\n", (cleanup) ? "" : "NOT ");
--- ../pr/tests/cvar.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/cvar.c Tue Jul 12 01:22:52 2005
@@ -174,5 +174,5 @@
{
CircBuf *cbp = (CircBuf *)arg;
- PRInt32 i, n;
+ intptr_t i, n;
void *data;
@@ -180,6 +180,6 @@
for (i = 0; i < n; i++) {
data = GetCBData(cbp);
- if ((int)data != i)
- if (debug_mode) printf("data mismatch at for i = %d usec\n", i);
+ if ((intptr_t)data != i)
+ if (debug_mode) printf("data mismatch at for i = %ld usec\n", (long)i);
}
@@ -193,5 +193,5 @@
{
CircBuf *cbp = (CircBuf *)arg;
- PRInt32 i, n;
+ intptr_t i, n;
n = count / 2;
--- ../pr/tests/foreign.c Mon Mar 7 20:22:57 2005
+++ ../pr/tests/foreign.c Tue Jul 12 01:25:31 2005
@@ -269,5 +269,5 @@
PRDir *dir;
PRFileDesc *pair[2];
- PRIntn test = (PRIntn)arg;
+ intptr_t test = (intptr_t)arg;
for (test = 0; test < 12; ++test) {
@@ -364,5 +364,5 @@
{
PRStatus rv;
- PRInt32 thread_cnt = DEFAULT_THREAD_COUNT;
+ intptr_t thread_cnt = DEFAULT_THREAD_COUNT;
PLOptStatus os;
PLOptState *opt = PL_CreateOptState(argc, argv, "dt:");
--- ../pr/tests/forktest.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/forktest.c Tue Jul 12 01:28:15 2005
@@ -80,5 +80,5 @@
PRNetAddr addr;
PRFileDesc *sock = NULL;
- PRInt32 tmp = (PRInt32)arg;
+ intptr_t tmp = (intptr_t)arg;
/*
@@ -176,5 +176,5 @@
}
clientThread = PR_CreateThread( PR_USER_THREAD, ClientThreadFunc,
- (void *) PR_ntohs(addr.inet.port), PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
+ (void *)(intptr_t)PR_ntohs(addr.inet.port), PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
PR_JOINABLE_THREAD, 0);
if (clientThread == NULL) {
--- ../pr/tests/mbcs.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/mbcs.c Tue Jul 12 01:34:26 2005
@@ -114,14 +114,14 @@
}
if ( PR_FILE_FILE == info.type ) {
- printf("File: %s \tsize: %ld\n", dirEntry->name, info.size );
+ printf("File: %s \tsize: %ld\n", dirEntry->name, (long)info.size );
fd = PR_Open( file, PR_RDONLY, 0 );
if ( NULL == fd ) {
printf("PR_Open() failed. Error: %ld, OSError: %ld\n",
- PR_GetError(), PR_GetOSError());
+ (long)PR_GetError(), (long)PR_GetOSError());
}
rc = PR_Close( fd );
if ( PR_FAILURE == rc ) {
printf("PR_Close() failed. Error: %ld, OSError: %ld\n",
- PR_GetError(), PR_GetOSError());
+ (long)PR_GetError(), (long)PR_GetOSError());
}
} else if ( PR_FILE_DIRECTORY == info.type ) {
--- ../pr/tests/nbconn.c Fri Apr 29 18:46:05 2005
+++ ../pr/tests/nbconn.c Tue Jul 12 01:36:03 2005
@@ -226,5 +226,5 @@
}
printf( "PR_GetConnectStatus: connect failed: (%ld, %ld)\n",
- PR_GetError(), PR_GetOSError());
+ (long)PR_GetError(), (long)PR_GetOSError());
}
PR_Close(sock);
@@ -376,5 +376,5 @@
goto def_exit;
}
- DPRINTF(("Created TCP_Server thread [0x%x]\n",thr));
+ DPRINTF(("Created TCP_Server thread [%p]\n", thr));
pd.fd = conn_fd;
pd.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
@@ -459,5 +459,5 @@
} else {
fprintf(stderr,"PR_GetConnectStatus: connect failed: (%ld, %ld)\n",
- PR_GetError(), PR_GetOSError());
+ (long)PR_GetError(), (long)PR_GetOSError());
failed_already = 1;
goto def_exit;
--- ../pr/tests/nonblock.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/nonblock.c Tue Jul 12 01:37:52 2005
@@ -84,5 +84,5 @@
clientThreadFunc(void *arg)
{
- PRUintn port = (PRUintn)arg;
+ intptr_t port = (intptr_t)arg;
PRFileDesc *sock;
PRNetAddr addr;
@@ -196,5 +196,5 @@
clientThread = PR_CreateThread(PR_USER_THREAD,
- clientThreadFunc, (void *) listenPort,
+ clientThreadFunc, (void *) (intptr_t)listenPort,
PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD, 0);
@@ -240,5 +240,5 @@
PL_PrintError("First Receive:\n");
fprintf(stderr, "First PR_Recv: retVal: %ld, Error: %ld\n",
- retVal, PR_GetError());
+ (long)retVal, (long)PR_GetError());
exit(1);
}
@@ -250,5 +250,5 @@
PL_PrintError("Second Receive:\n");
fprintf(stderr, "Second PR_Recv: retVal: %ld, Error: %ld\n",
- retVal, PR_GetError());
+ (long)retVal, (long)PR_GetError());
exit(1);
}
--- ../pr/tests/op_noacc.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/op_noacc.c Tue Jul 12 01:40:22 2005
@@ -82,5 +82,5 @@
PR_STDIO_INIT();
err01 = PR_Open("err01.tmp", PR_CREATE_FILE | PR_RDWR, 0);
- if (err01 == NULL)
+ if (err01 == NULL) {
if (PR_GetError() == PR_NO_ACCESS_RIGHTS_ERROR) {
printf ("error code is %d\n",PR_GetError());
@@ -92,3 +92,7 @@
return 1;
}
-}
+ } else {
+ perror("err01.tmp");
+ return 2;
+ }
+}
--- ../pr/tests/peek.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/peek.c Tue Jul 12 01:41:44 2005
@@ -168,5 +168,5 @@
PRFileDesc *sock;
PRSocketOptionData opt;
- PRUint16 port = (PRUint16) arg;
+ PRUint16 port = (intptr_t) arg;
PRNetAddr addr;
char buf[BUFFER_SIZE];
@@ -332,5 +332,5 @@
}
client = PR_CreateThread(
- PR_USER_THREAD, ClientNB, (void *) port,
+ PR_USER_THREAD, ClientNB, (void *)(intptr_t) port,
PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0);
if (NULL == client) {
--- ../pr/tests/pipepong.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/pipepong.c Tue Jul 12 01:43:52 2005
@@ -69,5 +69,5 @@
fprintf(stderr, "pong process: received \"%s\"\n", buf);
if (nBytes != 5) {
- fprintf(stderr, "pong process: expected 5 bytes but got %d bytes\n",
+ fprintf(stderr, "pong process: expected 5 bytes but got %zd bytes\n",
nBytes);
exit(1);
--- ../pr/tests/poll_nm.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/poll_nm.c Tue Jul 12 01:45:57 2005
@@ -97,5 +97,5 @@
clientThreadFunc(void *arg)
{
- PRUintn port = (PRUintn) arg;
+ PRUintn port = (intptr_t) arg;
PRFileDesc *sock;
PRNetAddr addr;
@@ -251,5 +251,5 @@
clientThread = PR_CreateThread(PR_USER_THREAD,
- clientThreadFunc, (void *) listenPort1,
+ clientThreadFunc, (void *)(intptr_t)listenPort1,
PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD, 0);
@@ -261,5 +261,5 @@
clientThread = PR_CreateThread(PR_USER_THREAD,
- clientThreadFunc, (void *) listenPort2,
+ clientThreadFunc, (void *)(intptr_t)listenPort2,
PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
PR_UNJOINABLE_THREAD, 0);
--- ../lib/tests/Makefile.in Sun Nov 7 21:52:55 2004
+++ ../lib/tests/Makefile.in Tue Jul 12 01:49:15 2005
@@ -247,5 +247,5 @@
$(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS)
else
- $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(EXTRA_LIBS) -o $@
+ $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) -o $@
endif
endif
--- ../pr/tests/getai.c Sun Apr 25 11:01:02 2004
+++ ../pr/tests/getai.c Tue Jul 12 02:20:40 2005
@@ -46,6 +46,11 @@
void *iter;
PRNetAddr addr;
+ const char *host;
- ai = PR_GetAddrInfoByName(argv[1], PR_AF_UNSPEC, PR_AI_ADDRCONFIG);
+ if (argc > 1)
+ host = argv[1];
+ else
+ host = "www.FreeBSD.org";
+ ai = PR_GetAddrInfoByName(host, PR_AF_UNSPEC, PR_AI_ADDRCONFIG);
if (ai == NULL) {
fprintf(stderr, "PR_GetAddrInfoByName failed: (%d, %d)\n",
--- ../pr/tests/Makefile.in Sun Apr 25 11:01:02 2004
+++ ../pr/tests/Makefile.in Tue Jul 12 02:25:18 2005
@@ -556,16 +557,17 @@
runtests:: $(PROGS) ALWAYS
- @$(ECHO) "\nNSPR Test Results - $(OBJDIR)\n"
- @$(ECHO) "BEGIN\t\t\t`date`"
- @$(ECHO) "NSPR_TEST_LOGFILE\t$(LOGFILE)\n"
- @$(ECHO) "Test\t\t\tResult\n"
+ @$(ECHO) "NSPR Test Results - $(OBJDIR)"
+ @$(ECHO) "BEGIN `date`"
+ @$(ECHO) "Test Result"
@cd $(OBJDIR); for i in $(PROGRAMS); do \
- $(ECHO) "$$i\c"; \
- ./$$i >> $(LOGFILE) 2>&1 ; \
+ printf "$$i"; \
+ ./$$i > $$i.output 2>&1; \
if [ 0 = $$? ] ; then \
- $(ECHO) "\t\t\tPassed"; \
- else \
- $(ECHO) "\t\t\tFAILED"; \
- fi; \
+ $(ECHO) " Passed"; \
+ rm $$i.output; \
+ else \
+ $(ECHO) " FAILED"; \
+ cat $$i.output; \
+ fi; \
done
- @$(ECHO) "\nEND\t\t`date`\n"
+ @$(ECHO) "END `date`"

View file

@ -52,8 +52,7 @@ include/nspr/md/_rhapsody.h
include/nspr/md/_scoos.cfg
include/nspr/md/_scoos.h
include/nspr/md/_solaris.h
include/nspr/md/_solaris32.cfg
include/nspr/md/_solaris64.cfg
include/nspr/md/_solaris.cfg
include/nspr/md/_sony.cfg
include/nspr/md/_sony.h
include/nspr/md/_sunos4.cfg