1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= Platform-neutral API for system-like functions
8 HOMEPAGE= http://www.mozilla.org/projects/nspr/index.html
12 SITES[main]= MOZILLA/nspr/releases/v4.17/src
13 DISTFILE[1]= nspr-4.17.tar.gz:main
15 SPKGS[standard]= single
17 OPTIONS_AVAILABLE= none
18 OPTIONS_STANDARD= none
22 DISTNAME= nspr-4.17/nspr
24 CPE_PRODUCT= netscape_portable_runtime
26 FPC_EQUIVALENT= devel/nspr
29 CONFIGURE_ARGS= --enable-64bit
32 # Do not install tools to build itself
33 @${REINPLACE_CMD} -e '/RELEASE_BINS/d' \
34 ${WRKSRC}/pr/src/misc/Makefile.in
37 @${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/*.so
39 [FILE:207:descriptions/desc.single]
40 Netscape Portable Runtime (NSPR) provides a platform-neutral API for
41 system level and libc like functions. The API is used in the Mozilla
42 client, many of Netscape/AOL/iPlanet's and other software offerings.
46 590a0aea29412ae22d7728038c21ef2ab42646e48172a47d2e4bb782846d1095 1141300 nspr-4.17.tar.gz
49 [FILE:1258:manifests/plist.single]
58 %%ONLY-DRAGONFLY%%include/nspr/md/_dragonfly.cfg
81 include/nspr/obsolete/
110 include/nspr/private/
139 @(,,444) lib/libnspr4.a
140 @(,,444) lib/libnspr4.so
141 @(,,444) lib/libplc4.a
142 @(,,444) lib/libplc4.so
143 @(,,444) lib/libplds4.a
144 @(,,444) lib/libplds4.so
145 lib/pkgconfig/nspr.pc
146 share/aclocal/nspr.m4
149 [FILE:1298:patches/patch-bug301986]
150 pthread_t can well be a 64-bit value -- on FreeBSD/amd64, for example.
151 Better to just keep calling it pthread_t isntead of casting to anything.
155 --- pr/include/private/pprthred.h.orig 2015-10-16 13:22:19 UTC
156 +++ pr/include/private/pprthred.h
161 +#include <pthread.h>
165 @@ -59,7 +60,7 @@ NSPR_API(void) PR_DetachThread(void);
166 ** Get the id of the named thread. Each thread is assigned a unique id
167 ** when it is created or attached.
169 -NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread);
170 +NSPR_API(pthread_t) PR_GetThreadID(PRThread *thread);
173 ** Set the procedure that is called when a thread is dumped. The procedure
174 --- pr/src/pthreads/ptthread.c.orig 2015-10-16 13:22:19 UTC
175 +++ pr/src/pthreads/ptthread.c
176 @@ -1155,12 +1155,12 @@ PR_IMPLEMENT(void) PR_ProcessExit(PRIntn
180 -PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred)
181 +PR_IMPLEMENT(pthread_t) PR_GetThreadID(PRThread *thred)
183 #if defined(_PR_DCETHREADS)
184 return (PRUint32)&thred->id; /* this is really a sham! */
186 - return (PRUint32)thred->id; /* and I don't know what they will do with it */
187 + return thred->id; /* and I don't know what they will do with it */
193 [FILE:916:patches/patch-bug782109]
194 --- pr/include/md/_freebsd.h.orig 2015-10-16 13:22:19 UTC
195 +++ pr/include/md/_freebsd.h
197 #define _PR_HAVE_LARGE_OFF_T
199 #if defined(_PR_PTHREADS)
200 +#if __FreeBSD_version >= 602000
201 +#define _PR_HAVE_GETPROTO_R
202 +#define _PR_HAVE_5_ARG_GETPROTO_R
204 +#if __FreeBSD_version >= 700016
205 +#define _PR_HAVE_GETHOST_R
206 +#define _PR_HAVE_GETHOST_R_INT
208 #if __FreeBSD_version >= 400008
210 * libc_r before this version of FreeBSD doesn't have poll().
211 --- pr/src/misc/prnetdb.c.orig 2015-10-16 13:22:19 UTC
212 +++ pr/src/misc/prnetdb.c
213 @@ -78,11 +78,6 @@ PRLock *_pr_dnsLock = NULL;
214 #define _PR_HAVE_GETPROTO_R_INT
217 -#if __FreeBSD_version >= 602000
218 -#define _PR_HAVE_GETPROTO_R
219 -#define _PR_HAVE_5_ARG_GETPROTO_R
222 /* BeOS has glibc but not the glibc-style getprotobyxxx_r functions. */
223 #if (defined(__GLIBC__) && __GLIBC__ >= 2 && !defined(XP_BEOS))
224 #define _PR_HAVE_GETPROTO_R
227 [FILE:489:patches/patch-config_nspr.pc.in]
228 --- config/nspr.pc.in.orig 2015-10-16 13:22:19 UTC
229 +++ config/nspr.pc.in
230 @@ -6,5 +6,5 @@ includedir=@includedir@
232 Description: The Netscape Portable Runtime
233 Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@
234 -Libs: -L@libdir@ -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@
235 -Cflags: -I@includedir@
236 +Libs: -L${libdir} -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ @OS_LIBS@
237 +Cflags: -I${includedir}
240 [FILE:29847:patches/patch-libtests]
241 --- lib/tests/arena.c.orig 2015-10-16 13:22:19 UTC
242 +++ lib/tests/arena.c
243 @@ -36,6 +36,7 @@ void DumpAll( void )
249 ** Test Arena allocation.
251 @@ -96,6 +97,7 @@ static void ArenaGrow( void )
254 } /* end ArenaGrow() */
259 --- lib/tests/base64t.c.orig 2015-10-16 13:22:19 UTC
260 +++ lib/tests/base64t.c
261 @@ -1987,7 +1987,6 @@ PRBool test_008(void)
262 for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
264 PRUint32 plen = PL_strlen(array[i].plaintext);
265 - PRUint32 clen = ((plen + 2)/3)*4;
267 char *rv = PL_Base64Encode(array[i].plaintext, plen, (char *)0);
269 @@ -2747,9 +2746,6 @@ PRBool test_024(void)
271 for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
273 - PRUint32 plen = PL_strlen(array[i].plaintext);
274 - PRUint32 clen = ((plen + 2)/3)*4;
276 char *rv = PL_Base64Encode(array[i].plaintext, 0, (char *)0);
278 if( (char *)0 == rv )
279 @@ -2883,8 +2879,6 @@ PRBool test_027(void)
281 for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ )
283 - PRUint32 clen = PL_strlen(array[i].cyphertext);
285 char *rv = PL_Base64Decode(array[i].cyphertext, 0, (char *)0);
287 if( (char *)0 == rv )
288 --- lib/tests/string.c.orig 2015-10-16 13:22:19 UTC
289 +++ lib/tests/string.c
290 @@ -127,7 +127,7 @@ PRBool test_003(void)
291 rv = PL_strcpy(array[i].dest, array[i].str);
292 if( array[i].rv != rv )
294 - printf("FAIL %d: (0x%x, %s)->0x%x\n", i, array[i].dest,
295 + printf("FAIL %d: (%p, %s)->%p\n", i, array[i].dest,
296 array[i].str ? array[i].str : "(null)", rv);
299 @@ -237,8 +237,8 @@ PRBool test_004(void)
300 rv = PL_strncpy(array[i].dest, array[i].str, array[i].len);
301 if( array[i].rv != rv )
303 - printf("FAIL %d: (0x%x, %s, %lu)->0x%x\n", i, array[i].dest,
304 - array[i].str ? array[i].str : "(null)", array[i].len, rv);
305 + printf("FAIL %d: (%p, %s, %u)->%p\n", i, array[i].dest,
306 + array[i].str ? array[i].str : "(null)", (unsigned)array[i].len, rv);
310 @@ -363,8 +363,8 @@ PRBool test_005(void)
311 rv = PL_strncpyz(array[i].dest, array[i].str, array[i].len);
312 if( array[i].rv != rv )
314 - printf("FAIL %d: (0x%x, %s, %lu)->0x%x\n", i, array[i].dest,
315 - array[i].str ? array[i].str : "(null)", array[i].len, rv);
316 + printf("FAIL %d: (%p, %s, %u)->%p\n", i, array[i].dest,
317 + array[i].str ? array[i].str : "(null)", (unsigned)array[i].len, rv);
321 @@ -415,7 +415,7 @@ PRBool test_006(void)
323 if( (char *)0 == rv )
325 - printf("FAIL %d: 0x%x -> 0\n", i, array[i]);
326 + printf("FAIL %d: %p -> 0\n", i, array[i]);
330 @@ -499,8 +499,8 @@ PRBool test_007(void)
332 if( (char *)0 == rv )
334 - printf("FAIL %d: %s,%lu -> 0\n", i,
335 - array[i].str ? array[i].str : "(null)", array[i].len);
336 + printf("FAIL %d: %s,%u -> 0\n", i,
337 + array[i].str ? array[i].str : "(null)", (unsigned)array[i].len);
341 @@ -684,10 +684,10 @@ PRBool test_009(void)
343 if( (char *)0 != rv )
345 - printf("FAIL %d: %s+%s/%lu -> %.32s, not zero\n", i,
346 + printf("FAIL %d: %s+%s/%u -> %.32s, not zero\n", i,
347 array[i].first ? array[i].first : "(null)",
348 array[i].second ? array[i].second : "(null)",
349 - array[i].length, rv);
350 + (unsigned)array[i].length, rv);
354 @@ -695,10 +695,10 @@ PRBool test_009(void)
356 if( (char *)0 == rv )
358 - printf("FAIL %d: %s+%s/%lu -> null, not %s\n", i,
359 + printf("FAIL %d: %s+%s/%u -> null, not %s\n", i,
360 array[i].first ? array[i].first : "(null)",
361 array[i].second ? array[i].second : "(null)",
362 - array[i].length, array[i].result);
363 + (unsigned)array[i].length, array[i].result);
367 @@ -710,10 +710,10 @@ PRBool test_009(void)
371 - printf("FAIL %d: %s+%s/%lu -> %.32s, not %s\n", i,
372 + printf("FAIL %d: %s+%s/%u -> %.32s, not %s\n", i,
373 array[i].first ? array[i].first : "(null)",
374 array[i].second ? array[i].second : "(null)",
375 - array[i].length, rv, array[i].result);
376 + (unsigned)array[i].length, rv, array[i].result);
380 @@ -725,10 +725,10 @@ PRBool test_009(void)
384 - printf("FAIL %d: %s+%s/%lu -> not nulled\n", i,
385 + printf("FAIL %d: %s+%s/%u -> not nulled\n", i,
386 array[i].first ? array[i].first : "(null)",
387 array[i].second ? array[i].second : "(null)",
389 + (unsigned)array[i].length);
393 @@ -736,10 +736,10 @@ PRBool test_009(void)
397 - printf("FAIL %d: %s+%s/%lu -> overrun\n", i,
398 + printf("FAIL %d: %s+%s/%u -> overrun\n", i,
399 array[i].first ? array[i].first : "(null)",
400 array[i].second ? array[i].second : "(null)",
402 + (unsigned)array[i].length);
406 @@ -814,10 +814,10 @@ PRBool test_010(void)
408 if( (char *)0 != rv )
410 - printf("FAIL %d: %s+%s/%lu -> %.32s, not zero\n", i,
411 + printf("FAIL %d: %s+%s/%u -> %.32s, not zero\n", i,
412 array[i].first ? array[i].first : "(null)",
413 array[i].second ? array[i].second : "(null)",
414 - array[i].length, rv);
415 + (unsigned)array[i].length, rv);
419 @@ -825,10 +825,10 @@ PRBool test_010(void)
421 if( (char *)0 == rv )
423 - printf("FAIL %d: %s+%s/%lu -> null, not %s\n", i,
424 + printf("FAIL %d: %s+%s/%u -> null, not %s\n", i,
425 array[i].first ? array[i].first : "(null)",
426 array[i].second ? array[i].second : "(null)",
427 - array[i].length, array[i].result);
428 + (unsigned)array[i].length, array[i].result);
432 @@ -840,10 +840,10 @@ PRBool test_010(void)
436 - printf("FAIL %d: %s+%s/%lu -> %.32s, not %s\n", i,
437 + printf("FAIL %d: %s+%s/%u -> %.32s, not %s\n", i,
438 array[i].first ? array[i].first : "(null)",
439 array[i].second ? array[i].second : "(null)",
440 - array[i].length, rv, array[i].result);
441 + (unsigned)array[i].length, rv, array[i].result);
445 @@ -1072,10 +1072,10 @@ PRBool test_012(void)
449 - printf("FAIL %d: %s-%s/%ld -> %d, not %d\n", i,
450 + printf("FAIL %d: %s-%s/%d -> %d, not %d\n", i,
451 array[i].one ? array[i].one : "(null)",
452 array[i].two ? array[i].two : "(null)",
453 - array[i].max, rv, array[i].sign);
454 + (int)array[i].max, rv, array[i].sign);
458 @@ -1294,10 +1294,10 @@ PRBool test_014(void)
462 - printf("FAIL %d: %s-%s/%ld -> %d, not %d\n", i,
463 + printf("FAIL %d: %s-%s/%d -> %d, not %d\n", i,
464 array[i].one ? array[i].one : "(null)",
465 array[i].two ? array[i].two : "(null)",
466 - array[i].max, rv, array[i].sign);
467 + (int)array[i].max, rv, array[i].sign);
471 @@ -1367,15 +1367,15 @@ PRBool test_015(void)
473 if( (char *)0 == rv )
475 - printf("FAIL %d: %s,%c -> null, not +%lu\n", i, array[i].str,
476 - array[i].chr, array[i].off);
477 + printf("FAIL %d: %s,%c -> null, not +%u\n", i, array[i].str,
478 + array[i].chr, (unsigned)array[i].off);
482 if( &array[i].str[ array[i].off ] != rv )
484 - printf("FAIL %d: %s,%c -> 0x%x, not 0x%x+%lu\n", i, array[i].str,
485 - array[i].chr, rv, array[i].str, array[i].off);
486 + printf("FAIL %d: %s,%c -> %p, not %p+%u\n", i, array[i].str,
487 + array[i].chr, rv, array[i].str, (unsigned)array[i].off);
491 @@ -1447,15 +1447,15 @@ PRBool test_016(void)
493 if( (char *)0 == rv )
495 - printf("FAIL %d: %s,%c -> null, not +%lu\n", i, array[i].str,
496 - array[i].chr, array[i].off);
497 + printf("FAIL %d: %s,%c -> null, not +%u\n", i, array[i].str,
498 + array[i].chr, (unsigned)array[i].off);
502 if( &array[i].str[ array[i].off ] != rv )
504 - printf("FAIL %d: %s,%c -> 0x%x, not 0x%x+%lu\n", i, array[i].str,
505 - array[i].chr, rv, array[i].str, array[i].off);
506 + printf("FAIL %d: %s,%c -> %p, not %p+%u\n", i, array[i].str,
507 + array[i].chr, rv, array[i].str, (unsigned)array[i].off);
511 @@ -1522,8 +1522,8 @@ PRBool test_017(void)
513 if( (char *)0 != rv )
515 - printf("FAIL %d: %s,%c/%lu -> %.32s, not zero\n", i, array[i].str,
516 - array[i].chr, array[i].max, rv);
517 + printf("FAIL %d: %s,%c/%u -> %.32s, not zero\n", i, array[i].str,
518 + array[i].chr, (unsigned)array[i].max, rv);
522 @@ -1531,15 +1531,15 @@ PRBool test_017(void)
524 if( (char *)0 == rv )
526 - printf("FAIL %d: %s,%c/%lu -> null, not +%lu\n", i, array[i].str,
527 - array[i].chr, array[i].max, array[i].off);
528 + printf("FAIL %d: %s,%c/%u -> null, not +%u\n", i, array[i].str,
529 + array[i].chr, (unsigned)array[i].max, (unsigned)array[i].off);
533 if( &array[i].str[ array[i].off ] != rv )
535 - printf("FAIL %d: %s,%c/%lu -> 0x%x, not 0x%x+%lu\n", i, array[i].str,
536 - array[i].chr, array[i].max, rv, array[i].str, array[i].off);
537 + printf("FAIL %d: %s,%c/%u -> %p, not %p+%u\n", i, array[i].str,
538 + array[i].chr, (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off);
542 @@ -1606,8 +1606,8 @@ PRBool test_018(void)
544 if( (char *)0 != rv )
546 - printf("FAIL %d: %s,%c/%lu -> %.32s, not zero\n", i, array[i].str,
547 - array[i].chr, array[i].max, rv);
548 + printf("FAIL %d: %s,%c/%u -> %.32s, not zero\n", i, array[i].str,
549 + array[i].chr, (unsigned)array[i].max, rv);
553 @@ -1615,15 +1615,15 @@ PRBool test_018(void)
555 if( (char *)0 == rv )
557 - printf("FAIL %d: %s,%c/%lu -> null, not +%lu\n", i, array[i].str,
558 - array[i].chr, array[i].max, array[i].off);
559 + printf("FAIL %d: %s,%c/%u -> null, not +%u\n", i, array[i].str,
560 + array[i].chr, (unsigned)array[i].max, (unsigned)array[i].off);
564 - if( &array[i].str[ array[i].off ] != rv )
565 + if( &array[i].str[ array[i].off ] != rv)
567 - printf("FAIL %d: %s,%c/%lu -> 0x%x, not 0x%x+%lu\n", i, array[i].str,
568 - array[i].chr, array[i].max, rv, array[i].str, array[i].off);
569 + printf("FAIL %d: %s,%c/%u -> %p, not %p+%u\n", i, array[i].str,
570 + array[i].chr, (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off);
574 @@ -1702,19 +1702,19 @@ PRBool test_019(void)
576 if( (char *)0 == rv )
578 - printf("FAIL %d: %s,%s -> null, not +%lu\n", i,
579 + printf("FAIL %d: %s,%s -> null, not +%u\n", i,
580 array[i].str ? array[i].str : "(null)",
581 array[i].chrs ? array[i].chrs : "(null)",
583 + (unsigned)array[i].off);
587 if( &array[i].str[ array[i].off ] != rv )
589 - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
590 + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i,
591 array[i].str ? array[i].str : "(null)",
592 array[i].chrs ? array[i].chrs : "(null)",
593 - rv, array[i].str, array[i].off);
594 + rv, array[i].str, (unsigned)array[i].off);
598 @@ -1793,19 +1793,19 @@ PRBool test_020(void)
600 if( (char *)0 == rv )
602 - printf("FAIL %d: %s,%s -> null, not +%lu\n", i,
603 + printf("FAIL %d: %s,%s -> null, not +%u\n", i,
604 array[i].str ? array[i].str : "(null)",
605 array[i].chrs ? array[i].chrs : "(null)",
607 + (unsigned)array[i].off);
611 if( &array[i].str[ array[i].off ] != rv )
613 - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
614 + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i,
615 array[i].str ? array[i].str : "(null)",
616 array[i].chrs ? array[i].chrs : "(null)",
617 - rv, array[i].str, array[i].off);
618 + rv, array[i].str, (unsigned)array[i].off);
622 @@ -1879,10 +1879,10 @@ PRBool test_021(void)
624 if( (char *)0 != rv )
626 - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
627 + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i,
628 array[i].str ? array[i].str : "(null)",
629 array[i].chrs ? array[i].chrs : "(null)",
631 + (unsigned)array[i].max, rv);
635 @@ -1890,19 +1890,19 @@ PRBool test_021(void)
637 if( (char *)0 == rv )
639 - printf("FAIL %d: %s,%s/%lu -> null, not +%lu\n", i,
640 + printf("FAIL %d: %s,%s/%u -> null, not +%u\n", i,
641 array[i].str ? array[i].str : "(null)",
642 array[i].chrs ? array[i].chrs : "(null)",
643 - array[i].max, array[i].off);
644 + (unsigned)array[i].max, array[i].off);
648 if( &array[i].str[ array[i].off ] != rv )
650 - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
651 + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i,
652 array[i].str ? array[i].str : "(null)",
653 array[i].chrs ? array[i].chrs : "(null)",
654 - array[i].max, rv, array[i].str, array[i].off);
655 + (unsigned)array[i].max, rv, array[i].str, array[i].off);
659 @@ -1985,10 +1985,10 @@ PRBool test_022(void)
661 if( (char *)0 != rv )
663 - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
664 + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i,
665 array[i].str ? array[i].str : "(null)",
666 array[i].chrs ? array[i].chrs : "(null)",
668 + (unsigned)array[i].max, rv);
672 @@ -1996,19 +1996,19 @@ PRBool test_022(void)
674 if( (char *)0 == rv )
676 - printf("FAIL %d: %s,%s/%lu -> null, not +%lu\n", i,
677 + printf("FAIL %d: %s,%s/%u -> null, not +%u\n", i,
678 array[i].str ? array[i].str : "(null)",
679 array[i].chrs ? array[i].chrs : "(null)",
680 - array[i].max, array[i].off);
681 + (unsigned)array[i].max, array[i].off);
685 if( &array[i].str[ array[i].off ] != rv )
687 - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
688 + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i,
689 array[i].str ? array[i].str : "(null)",
690 array[i].chrs ? array[i].chrs : "(null)",
691 - array[i].max, rv, array[i].str, array[i].off);
692 + (unsigned)array[i].max, rv, array[i].str, array[i].off);
696 @@ -2104,19 +2104,19 @@ PRBool test_023(void)
698 if( (char *)0 == rv )
700 - printf("FAIL %d: %s,%s -> null, not 0x%x+%lu\n", i,
701 + printf("FAIL %d: %s,%s -> null, not %p+%u\n", i,
702 array[i].str ? array[i].str : "(null)",
703 array[i].sub ? array[i].sub : "(null)",
704 - array[i].str, array[i].off);
705 + array[i].str, (unsigned)array[i].off);
709 if( &array[i].str[ array[i].off ] != rv )
711 - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
712 + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i,
713 array[i].str ? array[i].str : "(null)",
714 array[i].sub ? array[i].sub : "(null)",
715 - rv, array[i].str, array[i].off);
716 + rv, array[i].str, (unsigned)array[i].off);
720 @@ -2212,19 +2212,19 @@ PRBool test_024(void)
722 if( (char *)0 == rv )
724 - printf("FAIL %d: %s,%s -> null, not 0x%x+%lu\n", i,
725 + printf("FAIL %d: %s,%s -> null, not %p+%u\n", i,
726 array[i].str ? array[i].str : "(null)",
727 array[i].sub ? array[i].sub : "(null)",
728 - array[i].str, array[i].off);
729 + array[i].str, (unsigned)array[i].off);
733 if( &array[i].str[ array[i].off ] != rv )
735 - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
736 + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i,
737 array[i].str ? array[i].str : "(null)",
738 array[i].sub ? array[i].sub : "(null)",
739 - rv, array[i].str, array[i].off);
740 + rv, array[i].str, (unsigned)array[i].off);
744 @@ -2331,10 +2331,10 @@ PRBool test_025(void)
746 if( (char *)0 != rv )
748 - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
749 + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i,
750 array[i].str ? array[i].str : "(null)",
751 array[i].sub ? array[i].sub : "(null)",
753 + (unsigned)array[i].max, rv);
757 @@ -2342,19 +2342,19 @@ PRBool test_025(void)
759 if( (char *)0 == rv )
761 - printf("FAIL %d: %s,%s/%lu -> null, not 0x%x+%lu\n", i,
762 + printf("FAIL %d: %s,%s/%u -> null, not %p+%u\n", i,
763 array[i].str ? array[i].str : "(null)",
764 array[i].sub ? array[i].sub : "(null)",
765 - array[i].max, array[i].str, array[i].off);
766 + (unsigned)array[i].max, array[i].str, (unsigned)array[i].off);
770 if( &array[i].str[ array[i].off ] != rv )
772 - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
773 + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i,
774 array[i].str ? array[i].str : "(null)",
775 array[i].sub ? array[i].sub : "(null)",
776 - array[i].max, rv, array[i].str, array[i].off);
777 + (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off);
781 @@ -2463,10 +2463,10 @@ PRBool test_026(void)
783 if( (char *)0 != rv )
785 - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
786 + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i,
787 array[i].str ? array[i].str : "(null)",
788 array[i].sub ? array[i].sub : "(null)",
790 + (unsigned)array[i].max, rv);
794 @@ -2474,19 +2474,19 @@ PRBool test_026(void)
796 if( (char *)0 == rv )
798 - printf("FAIL %d: %s,%s/%lu -> null, not 0x%x+%lu\n", i,
799 + printf("FAIL %d: %s,%s/%u -> null, not %p+%u\n", i,
800 array[i].str ? array[i].str : "(null)",
801 array[i].sub ? array[i].sub : "(null)",
802 - array[i].max, array[i].str, array[i].off);
803 + (unsigned)array[i].max, array[i].str, (unsigned)array[i].off);
807 if( &array[i].str[ array[i].off ] != rv )
809 - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
810 + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i,
811 array[i].str ? array[i].str : "(null)",
812 array[i].sub ? array[i].sub : "(null)",
813 - array[i].max, rv, array[i].str, array[i].off);
814 + (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off);
818 @@ -2582,19 +2582,19 @@ PRBool test_027(void)
820 if( (char *)0 == rv )
822 - printf("FAIL %d: %s,%s -> null, not 0x%x+%lu\n", i,
823 + printf("FAIL %d: %s,%s -> null, not %p+%u\n", i,
824 array[i].str ? array[i].str : "(null)",
825 array[i].sub ? array[i].sub : "(null)",
826 - array[i].str, array[i].off);
827 + array[i].str, (unsigned)array[i].off);
831 if( &array[i].str[ array[i].off ] != rv )
833 - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
834 + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i,
835 array[i].str ? array[i].str : "(null)",
836 array[i].sub ? array[i].sub : "(null)",
837 - rv, array[i].str, array[i].off);
838 + rv, array[i].str, (unsigned)array[i].off);
842 @@ -2690,19 +2690,19 @@ PRBool test_028(void)
844 if( (char *)0 == rv )
846 - printf("FAIL %d: %s,%s -> null, not 0x%x+%lu\n", i,
847 + printf("FAIL %d: %s,%s -> null, not %p+%u\n", i,
848 array[i].str ? array[i].str : "(null)",
849 array[i].sub ? array[i].sub : "(null)",
850 - array[i].str, array[i].off);
851 + array[i].str, (unsigned)array[i].off);
855 if( &array[i].str[ array[i].off ] != rv )
857 - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i,
858 + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i,
859 array[i].str ? array[i].str : "(null)",
860 array[i].sub ? array[i].sub : "(null)",
861 - rv, array[i].str, array[i].off);
862 + rv, array[i].str, (unsigned)array[i].off);
866 @@ -2809,10 +2809,10 @@ PRBool test_029(void)
868 if( (char *)0 != rv )
870 - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
871 + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i,
872 array[i].str ? array[i].str : "(null)",
873 array[i].sub ? array[i].sub : "(null)",
875 + (unsigned)array[i].max, rv);
879 @@ -2820,19 +2820,19 @@ PRBool test_029(void)
881 if( (char *)0 == rv )
883 - printf("FAIL %d: %s,%s/%lu -> null, not 0x%x+%lu\n", i,
884 + printf("FAIL %d: %s,%s/%u -> null, not %p+%u\n", i,
885 array[i].str ? array[i].str : "(null)",
886 array[i].sub ? array[i].sub : "(null)",
887 - array[i].max, array[i].str, array[i].off);
888 + (unsigned)array[i].max, array[i].str, (unsigned)array[i].off);
892 if( &array[i].str[ array[i].off ] != rv )
894 - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
895 + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i,
896 array[i].str ? array[i].str : "(null)",
897 array[i].sub ? array[i].sub : "(null)",
898 - array[i].max, rv, array[i].str, array[i].off);
899 + (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off);
903 @@ -2941,10 +2941,10 @@ PRBool test_030(void)
905 if( (char *)0 != rv )
907 - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i,
908 + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i,
909 array[i].str ? array[i].str : "(null)",
910 array[i].sub ? array[i].sub : "(null)",
912 + (unsigned)array[i].max, rv);
916 @@ -2952,19 +2952,19 @@ PRBool test_030(void)
918 if( (char *)0 == rv )
920 - printf("FAIL %d: %s,%s/%lu -> null, not 0x%x+%lu\n", i,
921 + printf("FAIL %d: %s,%s/%u -> null, not %p+%u\n", i,
922 array[i].str ? array[i].str : "(null)",
923 array[i].sub ? array[i].sub : "(null)",
924 - array[i].max, array[i].str, array[i].off);
925 + (unsigned)array[i].max, array[i].str, (unsigned)array[i].off);
929 if( &array[i].str[ array[i].off ] != rv )
931 - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i,
932 + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i,
933 array[i].str ? array[i].str : "(null)",
934 array[i].sub ? array[i].sub : "(null)",
935 - array[i].max, rv, array[i].str, array[i].off);
936 + (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off);
942 [FILE:85333:patches/patch-tests]
943 --- lib/tests/Makefile.in.orig 2015-10-16 13:22:19 UTC
944 +++ lib/tests/Makefile.in
945 @@ -167,7 +167,7 @@ else
946 ifeq ($(OS_ARCH),OS2)
947 $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS)
949 - $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(EXTRA_LIBS) -o $@
950 + $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) -o $@
954 --- pr/tests/Makefile.in.orig 2015-10-16 13:22:19 UTC
955 +++ pr/tests/Makefile.in
956 @@ -489,17 +489,18 @@ endif
959 runtests:: $(PROGS) ALWAYS
960 - @$(ECHO) "\nNSPR Test Results - $(OBJDIR)\n"
961 - @$(ECHO) "BEGIN\t\t\t`date`"
962 - @$(ECHO) "NSPR_TEST_LOGFILE\t$(LOGFILE)\n"
963 - @$(ECHO) "Test\t\t\tResult\n"
964 + @$(ECHO) "NSPR Test Results - $(OBJDIR)"
965 + @$(ECHO) "BEGIN `date`"
966 + @$(ECHO) "Test Result"
967 @cd $(OBJDIR); for i in $(PROGRAMS); do \
969 - ./$$i >> $(LOGFILE) 2>&1 ; \
971 + ./$$i > $$i.output 2>&1; \
972 if [ 0 = $$? ] ; then \
973 - $(ECHO) "\t\t\tPassed"; \
975 - $(ECHO) "\t\t\tFAILED"; \
977 + $(ECHO) " Passed"; \
980 + $(ECHO) " FAILED"; \
984 - @$(ECHO) "\nEND\t\t`date`\n"
985 + @$(ECHO) "END `date`"
986 --- pr/tests/cleanup.c.orig 2015-10-16 13:22:19 UTC
987 +++ pr/tests/cleanup.c
990 static void PR_CALLBACK Thread(void *sleep)
992 - PR_Sleep(PR_SecondsToInterval((PRUint32)sleep));
993 + PR_Sleep(PR_SecondsToInterval((intptr_t)sleep));
994 printf("Thread exiting\n");
997 @@ -39,7 +39,8 @@ int main(int argc, char **argv)
998 PRThreadScope type = PR_LOCAL_THREAD;
999 PRFileDesc *err = PR_GetSpecialFD(PR_StandardError);
1000 PLOptState *opt = PL_CreateOptState(argc, argv, "Ghs:S:t:cC:");
1001 - PRIntn concurrency = 1, child_sleep = 10, main_sleep = 5, threads = 1;
1002 + PRIntn concurrency = 1, main_sleep = 5, threads = 1;
1003 + intptr_t child_sleep = 10;
1006 while (PL_OPT_EOL != (os = PL_GetNextOpt(opt)))
1007 @@ -80,7 +81,7 @@ int main(int argc, char **argv)
1008 (PR_LOCAL_THREAD == type) ? "LOCAL" : "GLOBAL");
1009 PR_fprintf(err, "\tConcurrency: %d\n", concurrency);
1010 PR_fprintf(err, "\tNumber of threads: %d\n", threads);
1011 - PR_fprintf(err, "\tThread sleep: %d\n", child_sleep);
1012 + PR_fprintf(err, "\tThread sleep: %d\n", (int)child_sleep);
1013 PR_fprintf(err, "\tMain sleep: %d\n", main_sleep);
1014 PR_fprintf(err, "\tCleanup will %sbe called\n\n", (cleanup) ? "" : "NOT ");
1016 --- pr/tests/cltsrv.c.orig 2015-10-16 13:22:19 UTC
1017 +++ pr/tests/cltsrv.c
1018 @@ -887,7 +887,7 @@ int main(int argc, char** argv)
1022 - CSClient_t *client;
1023 + CSClient_t *client = NULL;
1024 PRStatus rv, joinStatus;
1025 CSServer_t *server = NULL;
1027 --- pr/tests/cvar.c.orig 2015-10-16 13:22:19 UTC
1029 @@ -135,14 +135,14 @@ static int alive;
1030 static void PR_CALLBACK CXReader(void *arg)
1032 CircBuf *cbp = (CircBuf *)arg;
1038 for (i = 0; i < n; i++) {
1039 data = GetCBData(cbp);
1040 - if ((int)data != i)
1041 - if (debug_mode) printf("data mismatch at for i = %d usec\n", i);
1042 + if ((intptr_t)data != i)
1043 + if (debug_mode) printf("data mismatch at for i = %ld usec\n", (long)i);
1046 PR_EnterMonitor(mon);
1047 @@ -154,7 +154,7 @@ static void PR_CALLBACK CXReader(void *a
1048 static void PR_CALLBACK CXWriter(void *arg)
1050 CircBuf *cbp = (CircBuf *)arg;
1055 for (i = 0; i < n; i++)
1056 --- pr/tests/cvar2.c.orig 2015-10-16 13:22:19 UTC
1057 +++ pr/tests/cvar2.c
1058 @@ -95,7 +95,7 @@ PrivateCondVarThread(void *_info)
1059 for (index=0; index<info->loops; index++) {
1060 PR_Lock(info->lock);
1061 if (*info->tcount == 0) {
1062 - DPRINTF(("PrivateCondVarThread: thread 0x%lx waiting on cvar = 0x%lx\n",
1063 + DPRINTF(("PrivateCondVarThread: thread %p waiting on cvar = %p\n",
1064 PR_GetCurrentThread(), info->cvar));
1065 PR_WaitCondVar(info->cvar, info->timeout);
1067 @@ -108,8 +108,8 @@ PrivateCondVarThread(void *_info)
1068 PR_Lock(info->exitlock);
1069 (*info->exitcount)++;
1070 PR_NotifyCondVar(info->exitcvar);
1071 -DPRINTF(("PrivateCondVarThread: thread 0x%lx notified exitcvar = 0x%lx cnt = %ld\n",
1072 - PR_GetCurrentThread(), info->exitcvar,(*info->exitcount)));
1073 +DPRINTF(("PrivateCondVarThread: thread %p notified exitcvar = %p cnt = %d\n",
1074 + PR_GetCurrentThread(), info->exitcvar,(int)(*info->exitcount)));
1075 PR_Unlock(info->exitlock);
1078 @@ -157,7 +157,7 @@ CreateTestThread(threadinfo *info,
1080 CondVarTestSUU(void *_arg)
1082 - PRInt32 arg = (PRInt32)_arg;
1083 + PRInt32 arg = (PRInt32)(intptr_t)_arg;
1084 PRInt32 index, loops;
1087 @@ -189,7 +189,7 @@ CondVarTestSUU(void *_arg)
1091 - DPRINTF(("CondVarTestSUU: created thread 0x%lx\n",list[index].thread));
1092 + DPRINTF(("CondVarTestSUU: created thread %p\n",list[index].thread));
1095 for (loops = 0; loops < count; loops++) {
1096 @@ -199,7 +199,7 @@ CondVarTestSUU(void *_arg)
1097 (*list[index].tcount)++;
1098 PR_NotifyCondVar(list[index].cvar);
1099 PR_Unlock(list[index].lock);
1100 - DPRINTF(("PrivateCondVarThread: thread 0x%lx notified cvar = 0x%lx\n",
1101 + DPRINTF(("PrivateCondVarThread: thread %p notified cvar = %p\n",
1102 PR_GetCurrentThread(), list[index].cvar));
1105 @@ -227,7 +227,7 @@ CondVarTestSUU(void *_arg)
1107 CondVarTestSUK(void *_arg)
1109 - PRInt32 arg = (PRInt32)_arg;
1110 + PRInt32 arg = (PRInt32)(intptr_t)_arg;
1111 PRInt32 index, loops;
1114 @@ -301,7 +301,7 @@ CondVarTestSUK(void *_arg)
1116 CondVarTestPUU(void *_arg)
1118 - PRInt32 arg = (PRInt32)_arg;
1119 + PRInt32 arg = (PRInt32)(intptr_t)_arg;
1120 PRInt32 index, loops;
1123 @@ -336,7 +336,7 @@ CondVarTestPUU(void *_arg)
1127 - DPRINTF(("CondVarTestPUU: created thread 0x%lx\n",list[index].thread));
1128 + DPRINTF(("CondVarTestPUU: created thread %p\n",list[index].thread));
1132 @@ -354,8 +354,8 @@ CondVarTestPUU(void *_arg)
1134 /* Wait for threads to finish */
1135 while(exitcount < arg) {
1136 -DPRINTF(("CondVarTestPUU: thread 0x%lx waiting on exitcvar = 0x%lx cnt = %ld\n",
1137 - PR_GetCurrentThread(), exitcvar, exitcount));
1138 +DPRINTF(("CondVarTestPUU: thread %p waiting on exitcvar = %p cnt = %d\n",
1139 + PR_GetCurrentThread(), exitcvar, (int)exitcount));
1140 PR_WaitCondVar(exitcvar, PR_SecondsToInterval(60));
1142 PR_ASSERT(exitcount >= arg);
1143 @@ -365,7 +365,7 @@ DPRINTF(("CondVarTestPUU: thread 0x%lx w
1145 /* Join all the threads */
1146 for(index=0; index<(arg); index++) {
1147 - DPRINTF(("CondVarTestPUU: joining thread 0x%lx\n",list[index].thread));
1148 + DPRINTF(("CondVarTestPUU: joining thread %p\n",list[index].thread));
1149 PR_JoinThread(list[index].thread);
1150 if (list[index].internal) {
1151 PR_Lock(list[index].lock);
1152 @@ -387,7 +387,7 @@ DPRINTF(("CondVarTestPUU: thread 0x%lx w
1154 CondVarTestPUK(void *_arg)
1156 - PRInt32 arg = (PRInt32)_arg;
1157 + PRInt32 arg = (PRInt32)(intptr_t)_arg;
1158 PRInt32 index, loops;
1161 @@ -468,7 +468,7 @@ CondVarTestPUK(void *_arg)
1163 CondVarTest(void *_arg)
1165 - PRInt32 arg = (PRInt32)_arg;
1166 + PRInt32 arg = (PRInt32)(intptr_t)_arg;
1167 PRInt32 index, loops;
1170 @@ -601,7 +601,7 @@ CondVarTest(void *_arg)
1172 CondVarTimeoutTest(void *_arg)
1174 - PRInt32 arg = (PRInt32)_arg;
1175 + PRInt32 arg = (PRInt32)(intptr_t)_arg;
1176 PRInt32 index, loops;
1179 @@ -712,7 +712,7 @@ CondVarTimeoutTest(void *_arg)
1181 CondVarMixedTest(void *_arg)
1183 - PRInt32 arg = (PRInt32)_arg;
1184 + PRInt32 arg = (PRInt32)(intptr_t)_arg;
1185 PRInt32 index, loops;
1188 @@ -802,7 +802,7 @@ CondVarMixedTest(void *_arg)
1189 for(index=0; index<(arg*4); index+=3) {
1191 PR_Lock(list[index].lock);
1192 - *list[index].tcount++;
1193 + list[index].tcount++;
1194 PR_NotifyCondVar(list[index].cvar);
1195 PR_Unlock(list[index].lock);
1197 @@ -873,7 +873,7 @@ static void Measure(void (*func)(void *)
1200 start = PR_IntervalNow();
1201 - (*func)((void *)arg);
1202 + (*func)((void *)(intptr_t)arg);
1203 stop = PR_IntervalNow();
1205 d = (double)PR_IntervalToMicroseconds(stop - start);
1206 @@ -932,7 +932,7 @@ default_threads, default_threads*2, defa
1207 PR_SetConcurrency(2);
1209 for (threads = default_threads; threads < default_threads*5; threads+=default_threads) {
1210 - printf("\n%ld Thread tests\n", threads);
1211 + printf("\n%d Thread tests\n", (int)threads);
1212 Measure(CondVarTestSUU, threads, "Condvar simple test shared UU");
1213 Measure(CondVarTestSUK, threads, "Condvar simple test shared UK");
1214 Measure(CondVarTestPUU, threads, "Condvar simple test priv UU");
1215 --- pr/tests/foreign.c.orig 2015-10-16 13:22:19 UTC
1216 +++ pr/tests/foreign.c
1217 @@ -202,7 +202,7 @@ static void OneShot(void *arg)
1220 PRFileDesc *pair[2];
1221 - PRIntn test = (PRIntn)arg;
1222 + intptr_t test = (intptr_t)arg;
1224 for (test = 0; test < 12; ++test) {
1226 @@ -302,7 +302,7 @@ static void OneShot(void *arg)
1227 int main(int argc, char **argv)
1230 - PRInt32 thread_cnt = DEFAULT_THREAD_COUNT;
1231 + intptr_t thread_cnt = DEFAULT_THREAD_COUNT;
1233 PLOptState *opt = PL_CreateOptState(argc, argv, "dt:");
1235 --- pr/tests/forktest.c.orig 2015-10-16 13:22:19 UTC
1236 +++ pr/tests/forktest.c
1237 @@ -47,7 +47,7 @@ ClientThreadFunc(void *arg)
1240 PRFileDesc *sock = NULL;
1241 - PRInt32 tmp = (PRInt32)arg;
1242 + intptr_t tmp = (intptr_t)arg;
1245 * Make sure the PR_Accept call will block
1246 @@ -143,7 +143,7 @@ DoIO(void)
1249 clientThread = PR_CreateThread( PR_USER_THREAD, ClientThreadFunc,
1250 - (void *) PR_ntohs(addr.inet.port), PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
1251 + (void *)(intptr_t)PR_ntohs(addr.inet.port), PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
1252 PR_JOINABLE_THREAD, 0);
1253 if (clientThread == NULL) {
1254 fprintf(stderr, "Cannot create client thread: (%d, %d)\n",
1255 @@ -151,6 +151,9 @@ DoIO(void)
1259 + printf("Wait one second before accept\n");
1261 + PR_Sleep(PR_SecondsToInterval(1));
1262 printf("Accepting connection at port %hu\n", PR_ntohs(addr.inet.port));
1264 sock = PR_Accept(listenSock, &addr, PR_SecondsToInterval(5));
1265 --- pr/tests/getai.c.orig 2015-10-16 13:22:19 UTC
1266 +++ pr/tests/getai.c
1267 @@ -13,8 +13,13 @@ int main(int argc, char **argv)
1273 - ai = PR_GetAddrInfoByName(argv[1], PR_AF_UNSPEC, PR_AI_ADDRCONFIG);
1277 + host = "www.FreeBSD.org";
1278 + ai = PR_GetAddrInfoByName(host, PR_AF_UNSPEC, PR_AI_ADDRCONFIG);
1280 fprintf(stderr, "PR_GetAddrInfoByName failed: (%d, %d)\n",
1281 PR_GetError(), PR_GetOSError());
1282 --- pr/tests/instrumt.c.orig 2015-10-16 13:22:19 UTC
1283 +++ pr/tests/instrumt.c
1290 #include <prclist.h>
1293 #define COUNT_LIMIT (10 * ( 1024))
1295 #define SMALL_TRACE_BUFSIZE ( 60 * 1024 )
1300 @@ -78,10 +78,10 @@ static void Help(void)
1302 static void ListCounters(void)
1304 +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS)
1305 PR_DEFINE_COUNTER( qh );
1306 PR_DEFINE_COUNTER( rh );
1307 const char *qn, *rn, *dn;
1308 - const char **qname = &qn, **rname = &rn, **desc = &dn;
1311 PR_INIT_COUNTER_HANDLE( qh, NULL );
1312 @@ -92,7 +92,7 @@ static void ListCounters(void)
1313 PR_FIND_NEXT_COUNTER_RNAME(rh, rh, qh );
1314 while ( rh != NULL )
1316 - PR_GET_COUNTER_NAME_FROM_HANDLE( rh, qname, rname, desc );
1317 + PR_GET_COUNTER_NAME_FROM_HANDLE( rh, &qn, &rn, &dn );
1318 PR_GET_COUNTER(tCtr, rh);
1319 PR_LOG( lm, msgLevel,
1320 ( "QName: %s RName: %s Desc: %s Value: %ld\n",
1321 @@ -101,15 +101,15 @@ static void ListCounters(void)
1323 PR_FIND_NEXT_COUNTER_QNAME(qh, qh);
1327 } /* end ListCounters() */
1329 static void ListTraces(void)
1331 +#if defined(DEBUG) || defined(FORCE_NSPR_TRACE)
1332 PR_DEFINE_TRACE( qh );
1333 PR_DEFINE_TRACE( rh );
1334 const char *qn, *rn, *dn;
1335 - const char **qname = &qn, **rname = &rn, **desc = &dn;
1337 PR_INIT_TRACE_HANDLE( qh, NULL );
1338 PR_FIND_NEXT_TRACE_QNAME(qh, qh );
1339 @@ -119,7 +119,7 @@ static void ListTraces(void)
1340 PR_FIND_NEXT_TRACE_RNAME(rh, rh, qh );
1341 while ( rh != NULL )
1343 - PR_GET_TRACE_NAME_FROM_HANDLE( rh, qname, rname, desc );
1344 + PR_GET_TRACE_NAME_FROM_HANDLE( rh, &qn, &rn, &dn );
1345 PR_LOG( lm, msgLevel,
1346 ( "QName: %s RName: %s Desc: %s",
1348 @@ -127,7 +127,7 @@ static void ListTraces(void)
1350 PR_FIND_NEXT_TRACE_QNAME(qh, qh);
1354 } /* end ListCounters() */
1357 @@ -326,7 +326,7 @@ static void PR_CALLBACK SampleTrace( voi
1359 static void TraceTest( void )
1364 PR_DEFINE_TRACE( th );
1366 --- pr/tests/io_timeout.c.orig 2015-10-16 13:22:19 UTC
1367 +++ pr/tests/io_timeout.c
1369 /* Used to get the command line option */
1370 #include "plgetopt.h"
1374 +#include <string.h>
1377 #define NUM_THREADS 1
1378 -#define BASE_PORT 8000
1379 +#define BASE_PORT 38011
1380 #define DEFAULT_ACCEPT_TIMEOUT 2
1382 typedef struct threadInfo {
1383 @@ -38,7 +40,7 @@ typedef struct threadInfo {
1386 PRIntn failed_already = 0;
1387 -PRIntn debug_mode = 0;
1388 +PRIntn debug_mode = 1;
1390 #define LOCAL_SCOPE_STRING "LOCAL scope"
1391 #define GLOBAL_SCOPE_STRING "GLOBAL scope"
1392 @@ -54,7 +56,7 @@ thread_main(void *_info)
1393 PRFileDesc *clientSock;
1395 PRThreadScope tscope;
1397 + const char *scope_str;
1401 @@ -73,6 +75,7 @@ thread_main(void *_info)
1404 PR_NOT_REACHED("Invalid thread scope");
1408 printf("thread id %d, scope %s\n", info->id, scope_str);
1409 @@ -91,7 +94,12 @@ thread_main(void *_info)
1410 rv = PR_Bind(listenSock, &listenAddr);
1411 if (rv == PR_FAILURE) {
1413 - printf("unable to bind\n");
1414 + printf("unable to bind to %d: %s\n",
1415 + BASE_PORT + info->id, strerror(PR_GetOSError()));
1416 + if (PR_GetOSError() == EADDRINUSE) {
1417 + printf("can not proceed with this test\n");
1423 @@ -113,8 +121,9 @@ thread_main(void *_info)
1424 if (clientSock == NULL) {
1425 if (PR_GetError() == PR_IO_TIMEOUT_ERROR) {
1427 - printf("PR_Accept() timeout worked!\n");
1428 - printf("TEST PASSED! PR_Accept() returned error %d\n",
1429 + printf("PR_Accept() timeout worked!\n"
1430 + "TEST PASSED! PR_Accept() returned error "
1431 + "PR_IO_TIMEOUT_ERROR (%ld)\n",
1432 PR_IO_TIMEOUT_ERROR);
1435 --- pr/tests/layer.c.orig 2015-10-16 13:22:19 UTC
1436 +++ pr/tests/layer.c
1437 @@ -45,7 +45,10 @@ static PRUint16 default_port = 12273;
1438 static PRFileDesc *PushLayer(PRFileDesc *stack)
1440 PRFileDesc *layer = PR_CreateIOLayerStub(identity, &myMethods);
1441 - PRStatus rv = PR_PushIOLayer(stack, PR_GetLayersIdentity(stack), layer);
1442 +#if defined(DEBUG) || defined(FORCE_PR_ASSERT)
1443 + PRStatus rv = /* we only need rv for PR_ASSERT() */
1445 + PR_PushIOLayer(stack, PR_GetLayersIdentity(stack), layer);
1446 if (verbosity > quiet)
1447 PR_fprintf(logFile, "Pushed layer(0x%x) onto stack(0x%x)\n", layer, stack);
1448 PR_ASSERT(PR_SUCCESS == rv);
1449 --- pr/tests/lazyinit.c.orig 2015-10-16 13:22:19 UTC
1450 +++ pr/tests/lazyinit.c
1451 @@ -43,7 +43,6 @@ int main(int argc, char **argv)
1455 - PRCondVar *cv = NULL;
1456 PRThread *thread = NULL;
1457 PRIntervalTime interval = 0;
1458 PRFileDesc *file, *udp, *tcp, *pair[2];
1459 --- pr/tests/lltest.c.orig 2015-10-16 13:22:19 UTC
1460 +++ pr/tests/lltest.c
1461 @@ -545,6 +545,7 @@ TestConversion( void )
1466 static void ShiftCompileOnly()
1469 @@ -561,6 +562,7 @@ static void ShiftCompileOnly()
1470 LL_ISHL(ia, 49, 32);
1472 } /* ShiftCompileOnly */
1477 @@ -635,7 +637,6 @@ TestArithmetic( void )
1478 PRInt64 largeValPlusOne = LL_INIT( 0x00000002, 0x00000000 );
1479 PRInt64 largeValTimesTwo = LL_INIT( 0x00000003, 0xfffffffe );
1480 PRInt64 largeMultCand = LL_INIT( 0x00000000, 0x7fffffff );
1481 - PRInt64 largeMinusMultCand = LL_INIT( 0xffffffff, 0x10000001 );
1482 PRInt64 largeMultCandx64K = LL_INIT( 0x00007fff, 0xffff0000 );
1483 PRInt64 largeNumSHL5 = LL_INIT( 0x0000001f, 0xffffffe0 );
1484 PRInt64 result, result2;
1485 --- pr/tests/mbcs.c.orig 2015-10-16 13:22:19 UTC
1487 @@ -54,13 +54,12 @@ char *dirName = NULL; /* directory nam
1489 ** Traverse directory
1491 -static void TraverseDirectory( unsigned char *dir )
1492 +static void TraverseDirectory(const char *dir)
1495 PRDirEntry *dirEntry;
1502 @@ -81,16 +80,16 @@ static void TraverseDirectory( unsigned
1505 if ( PR_FILE_FILE == info.type ) {
1506 - printf("File: %s \tsize: %ld\n", dirEntry->name, info.size );
1507 + printf("File: %s \tsize: %ld\n", dirEntry->name, (long)info.size );
1508 fd = PR_Open( file, PR_RDONLY, 0 );
1510 printf("PR_Open() failed. Error: %ld, OSError: %ld\n",
1511 - PR_GetError(), PR_GetOSError());
1512 + (long)PR_GetError(), (long)PR_GetOSError());
1514 rc = PR_Close( fd );
1515 if ( PR_FAILURE == rc ) {
1516 printf("PR_Close() failed. Error: %ld, OSError: %ld\n",
1517 - PR_GetError(), PR_GetOSError());
1518 + (long)PR_GetError(), (long)PR_GetOSError());
1520 } else if ( PR_FILE_DIRECTORY == info.type ) {
1521 sprintf( nextDir, "%s/%s", dir, dirEntry->name );
1522 --- pr/tests/nbconn.c.orig 2015-10-16 13:22:19 UTC
1523 +++ pr/tests/nbconn.c
1524 @@ -54,8 +54,7 @@ int main(int argc, char **argv)
1526 PRSocketOptionData optData;
1527 const char *hostname = NULL;
1528 - PRIntn default_case, n, bytes_read, bytes_sent;
1529 - PRInt32 failed_already = 0;
1530 + PRIntn default_case, n;
1534 @@ -164,7 +163,7 @@ int main(int argc, char **argv)
1537 printf( "PR_GetConnectStatus: connect failed: (%ld, %ld)\n",
1538 - PR_GetError(), PR_GetOSError());
1539 + (long)PR_GetError(), (long)PR_GetOSError());
1543 @@ -235,7 +234,7 @@ connection_success_test()
1544 PRThread *thr = NULL;
1546 char send_buf[DATA_BUF_SIZE], recv_buf[DATA_BUF_SIZE];
1547 - PRIntn default_case, n, bytes_read, bytes_sent;
1548 + PRIntn n, bytes_read, bytes_sent;
1549 PRIntn failed_already = 0;
1552 @@ -311,7 +310,7 @@ connection_success_test()
1556 - DPRINTF(("Created TCP_Server thread [0x%x]\n",thr));
1557 + DPRINTF(("Created TCP_Server thread [%p]\n", thr));
1559 pd.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT;
1560 n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT);
1561 @@ -390,7 +389,7 @@ connection_success_test()
1562 DPRINTF(("Data integrity verified\n"));
1564 fprintf(stderr,"PR_GetConnectStatus: connect failed: (%ld, %ld)\n",
1565 - PR_GetError(), PR_GetOSError());
1566 + (long)PR_GetError(), (long)PR_GetOSError());
1570 @@ -496,7 +495,6 @@ connection_failure_test()
1573 if (PR_GetConnectStatus(&pd) == PR_SUCCESS) {
1575 fprintf(stderr,"PR_GetConnectStatus succeeded, expected to fail\n");
1578 --- pr/tests/nblayer.c.orig 2015-10-16 13:22:19 UTC
1579 +++ pr/tests/nblayer.c
1580 @@ -299,7 +299,7 @@ static PRStatus PR_CALLBACK MyClose(PRFi
1581 static PRInt16 PR_CALLBACK MyPoll(
1582 PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags)
1584 - PRInt16 my_flags, new_flags;
1585 + PRInt16 my_flags = -1, new_flags;
1586 PRFilePrivate *mine = (PRFilePrivate*)fd->secret;
1587 if (0 != (PR_POLL_READ & in_flags))
1589 @@ -342,7 +342,7 @@ static PRFileDesc * PR_CALLBACK MyAccept
1590 PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout)
1593 - PRFileDesc *newfd, *layer = fd;
1594 + PRFileDesc *newfd;
1595 PRFileDesc *newstack;
1596 PRFilePrivate *newsecret;
1598 @@ -428,6 +428,8 @@ static PRInt32 PR_CALLBACK MyRecv(
1599 mine->rcvinprogress = 0;
1600 return mine->rcvreq; /* << -- that's it! */
1602 + PR_ASSERT(!"How did I get this mine->rcvstate?");
1607 @@ -484,6 +486,8 @@ static PRInt32 PR_CALLBACK MySend(
1608 mine->xmtinprogress = 0;
1609 return mine->xmtreq; /* <<-- That's the one! */
1611 + PR_ASSERT(!"How did I get this mine->xmtstate?");
1616 --- pr/tests/nonblock.c.orig 2015-10-16 13:22:19 UTC
1617 +++ pr/tests/nonblock.c
1619 static void PR_CALLBACK
1620 clientThreadFunc(void *arg)
1622 - PRUintn port = (PRUintn)arg;
1623 + intptr_t port = (intptr_t)arg;
1626 char buf[CHUNK_SIZE];
1627 @@ -147,7 +147,7 @@ static PRIntn PR_CALLBACK RealMain( PRIn
1630 clientThread = PR_CreateThread(PR_USER_THREAD,
1631 - clientThreadFunc, (void *) listenPort,
1632 + clientThreadFunc, (void *) (intptr_t)listenPort,
1633 PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
1634 PR_UNJOINABLE_THREAD, 0);
1635 if (clientThread == NULL) {
1636 @@ -191,7 +191,7 @@ static PRIntn PR_CALLBACK RealMain( PRIn
1637 if (retVal != -1 || PR_GetError() != PR_WOULD_BLOCK_ERROR) {
1638 PL_PrintError("First Receive:\n");
1639 fprintf(stderr, "First PR_Recv: retVal: %ld, Error: %ld\n",
1640 - retVal, PR_GetError());
1641 + (long)retVal, (long)PR_GetError());
1644 printf("read: EWOULDBLOCK, good\n");
1645 @@ -201,7 +201,7 @@ static PRIntn PR_CALLBACK RealMain( PRIn
1646 if (retVal != CHUNK_SIZE) {
1647 PL_PrintError("Second Receive:\n");
1648 fprintf(stderr, "Second PR_Recv: retVal: %ld, Error: %ld\n",
1649 - retVal, PR_GetError());
1650 + (long)retVal, (long)PR_GetError());
1653 printf("read: %d bytes, good\n", retVal);
1654 --- pr/tests/obsints.c.orig 2015-10-16 13:22:19 UTC
1655 +++ pr/tests/obsints.c
1656 @@ -25,6 +25,9 @@ int main(int argc, char **argv)
1657 #else /* NO_NSPR_10_SUPPORT */
1659 #include "prtypes.h" /* which includes protypes.h */
1660 +#if !defined(__GNUC__)
1664 int main(int argc, char **argv)
1666 @@ -32,17 +35,17 @@ int main(int argc, char **argv)
1667 * Compilation fails if any of these integer types are not
1668 * defined by protypes.h.
1682 + uintn uin __unused;
1685 + uint8 ui8 __unused;
1686 + int16 i16 __unused;
1687 + uint16 ui16 __unused;
1688 + int32 i32 __unused;
1689 + uint32 ui32 __unused;
1690 + int64 i64 __unused;
1691 + uint64 ui64 __unused;
1695 --- pr/tests/parsetm.c.orig 2015-10-16 13:22:19 UTC
1696 +++ pr/tests/parsetm.c
1697 @@ -31,8 +31,8 @@ static void PrintExplodedTime(const PREx
1699 /* Print day of the week, month, day, hour, minute, and second */
1700 if (debug_mode) printf("%s %s %ld %02ld:%02ld:%02ld ",
1701 - dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday,
1702 - et->tm_hour, et->tm_min, et->tm_sec);
1703 + dayOfWeek[et->tm_wday], month[et->tm_month], (long)et->tm_mday,
1704 + (long)et->tm_hour, (long)et->tm_min, (long)et->tm_sec);
1706 /* Print time zone */
1707 totalOffset = et->tm_params.tp_gmt_offset + et->tm_params.tp_dst_offset;
1708 @@ -47,7 +47,7 @@ static void PrintExplodedTime(const PREx
1709 hourOffset = totalOffset / 3600;
1710 minOffset = (totalOffset % 3600) / 60;
1712 - printf("%s%02ld%02ld ", sign, hourOffset, minOffset);
1713 + printf("%s%02ld%02ld ", sign, (long)hourOffset, (long)minOffset);
1717 --- pr/tests/peek.c.orig 2015-10-16 13:22:19 UTC
1719 @@ -135,7 +135,7 @@ static void ClientNB(void *arg)
1722 PRSocketOptionData opt;
1723 - PRUint16 port = (PRUint16) arg;
1724 + PRUint16 port = (intptr_t) arg;
1726 char buf[BUFFER_SIZE];
1728 @@ -299,7 +299,7 @@ RunTest(PRThreadScope scope, PRFileDesc
1731 client = PR_CreateThread(
1732 - PR_USER_THREAD, ClientNB, (void *) port,
1733 + PR_USER_THREAD, ClientNB, (void *)(intptr_t) port,
1734 PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0);
1735 if (NULL == client) {
1736 fprintf(stderr, "PR_CreateThread failed\n");
1737 --- pr/tests/perf.c.orig 2015-10-16 13:22:19 UTC
1739 @@ -141,7 +141,7 @@ static void PR_CALLBACK CXReader(void *a
1741 for (i = 0; i < n; i++) {
1743 - DPRINTF(("CXReader: thread = 0x%lx waiting\n",
1744 + DPRINTF(("CXReader: thread = %p waiting\n",
1745 PR_GetCurrentThread()));
1746 PR_Wait(mon, PR_INTERVAL_NO_TIMEOUT);
1748 @@ -154,7 +154,7 @@ static void PR_CALLBACK CXReader(void *a
1751 PR_ExitMonitor(mon2);
1752 - DPRINTF(("CXReader: thread = 0x%lx exiting\n", PR_GetCurrentThread()));
1753 + DPRINTF(("CXReader: thread = %p exiting\n", PR_GetCurrentThread()));
1756 static void PR_CALLBACK CXWriter(void *arg)
1757 @@ -165,7 +165,7 @@ static void PR_CALLBACK CXWriter(void *a
1759 for (i = 0; i < n; i++) {
1761 - DPRINTF(("CXWriter: thread = 0x%lx waiting\n",
1762 + DPRINTF(("CXWriter: thread = %p waiting\n",
1763 PR_GetCurrentThread()));
1764 PR_Wait(mon, PR_INTERVAL_NO_TIMEOUT);
1766 @@ -178,7 +178,7 @@ static void PR_CALLBACK CXWriter(void *a
1769 PR_ExitMonitor(mon2);
1770 - DPRINTF(("CXWriter: thread = 0x%lx exiting\n", PR_GetCurrentThread()));
1771 + DPRINTF(("CXWriter: thread = %p exiting\n", PR_GetCurrentThread()));
1774 static void ContextSwitch(PRThreadScope scope1, PRThreadScope scope2)
1775 @@ -198,7 +198,7 @@ static void ContextSwitch(PRThreadScope
1777 fprintf(stderr, "ContextSwitch: cannot create thread\n");
1779 - DPRINTF(("ContextSwitch: created %s thread = 0x%lx\n",
1780 + DPRINTF(("ContextSwitch: created %s thread = %p\n",
1781 (scope1 == PR_GLOBAL_THREAD ?
1782 "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD"),
1784 @@ -212,7 +212,7 @@ static void ContextSwitch(PRThreadScope
1786 fprintf(stderr, "ContextSwitch: cannot create thread\n");
1788 - DPRINTF(("ContextSwitch: created %s thread = 0x%lx\n",
1789 + DPRINTF(("ContextSwitch: created %s thread = %p\n",
1790 (scope2 == PR_GLOBAL_THREAD ?
1791 "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD"),
1793 @@ -254,10 +254,10 @@ static void PR_CALLBACK SemaThread(void
1796 for (i = 0; i < n; i++) {
1797 - DPRINTF(("SemaThread: thread = 0x%lx waiting on sem = 0x%lx\n",
1798 + DPRINTF(("SemaThread: thread = %p waiting on sem = %p\n",
1799 PR_GetCurrentThread(), sem[0]));
1801 - DPRINTF(("SemaThread: thread = 0x%lx posting on sem = 0x%lx\n",
1802 + DPRINTF(("SemaThread: thread = %p posting on sem = %p\n",
1803 PR_GetCurrentThread(), sem[1]));
1806 @@ -266,7 +266,7 @@ static void PR_CALLBACK SemaThread(void
1809 PR_ExitMonitor(mon2);
1810 - DPRINTF(("SemaThread: thread = 0x%lx exiting\n", PR_GetCurrentThread()));
1811 + DPRINTF(("SemaThread: thread = %p exiting\n", PR_GetCurrentThread()));
1814 static PRSemaphore *sem_set1[2];
1815 @@ -294,7 +294,7 @@ static void SemaContextSwitch(PRThreadSc
1817 fprintf(stderr, "SemaContextSwitch: cannot create thread\n");
1819 - DPRINTF(("SemaContextSwitch: created %s thread = 0x%lx\n",
1820 + DPRINTF(("SemaContextSwitch: created %s thread = %p\n",
1821 (scope1 == PR_GLOBAL_THREAD ?
1822 "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD"),
1824 @@ -309,7 +309,7 @@ static void SemaContextSwitch(PRThreadSc
1826 fprintf(stderr, "SemaContextSwitch: cannot create thread\n");
1828 - DPRINTF(("SemaContextSwitch: created %s thread = 0x%lx\n",
1829 + DPRINTF(("SemaContextSwitch: created %s thread = %p\n",
1830 (scope2 == PR_GLOBAL_THREAD ?
1831 "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD"),
1833 --- pr/tests/pipepong.c.orig 2015-10-16 13:22:19 UTC
1834 +++ pr/tests/pipepong.c
1835 @@ -36,7 +36,7 @@ int main(int argc, char **argv)
1836 nBytes = fread(buf, 1, 5, stdin);
1837 fprintf(stderr, "pong process: received \"%s\"\n", buf);
1839 - fprintf(stderr, "pong process: expected 5 bytes but got %d bytes\n",
1840 + fprintf(stderr, "pong process: expected 5 bytes but got %zd bytes\n",
1844 --- pr/tests/poll_nm.c.orig 2015-10-16 13:22:19 UTC
1845 +++ pr/tests/poll_nm.c
1846 @@ -47,7 +47,7 @@ PRIntn debug_mode;
1847 static void PR_CALLBACK
1848 clientThreadFunc(void *arg)
1850 - PRUintn port = (PRUintn) arg;
1851 + PRUintn port = (intptr_t) arg;
1855 @@ -196,7 +196,7 @@ int main(int argc, char **argv)
1858 clientThread = PR_CreateThread(PR_USER_THREAD,
1859 - clientThreadFunc, (void *) listenPort1,
1860 + clientThreadFunc, (void *)(intptr_t)listenPort1,
1861 PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
1862 PR_UNJOINABLE_THREAD, 0);
1863 if (clientThread == NULL) {
1864 @@ -206,7 +206,7 @@ int main(int argc, char **argv)
1867 clientThread = PR_CreateThread(PR_USER_THREAD,
1868 - clientThreadFunc, (void *) listenPort2,
1869 + clientThreadFunc, (void *)(intptr_t)listenPort2,
1870 PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
1871 PR_UNJOINABLE_THREAD, 0);
1872 if (clientThread == NULL) {
1873 --- pr/tests/prfz.c.orig 2015-10-16 13:22:19 UTC
1879 -#include <sys/types.h>
1880 +#include <stdint.h>
1884 --- pr/tests/provider.c.orig 2015-10-16 13:22:19 UTC
1885 +++ pr/tests/provider.c
1886 @@ -1049,7 +1049,7 @@ int main(int argc, char **argv)
1890 - CSClient_t *client;
1891 + CSClient_t *client = NULL;
1892 PRStatus rv, joinStatus;
1893 CSServer_t *server = NULL;
1895 --- pr/tests/prpoll.c.orig 2015-10-16 13:22:19 UTC
1896 +++ pr/tests/prpoll.c
1897 @@ -39,7 +39,7 @@ int main(int argc, char **argv)
1899 clientThreadFunc(void *arg)
1901 - PRUint16 port = (PRUint16) arg;
1902 + PRUint16 port = (PRUint16)(uintptr_t)arg;
1906 @@ -73,7 +73,7 @@ int main(int argc, char **argv)
1909 struct sockaddr_in saddr;
1911 + socklen_t saddr_len;
1912 PRUint16 listenPort3;
1913 PRFileDesc *socket_poll_fd;
1915 @@ -199,7 +199,7 @@ int main(int argc, char **argv)
1918 clientThread = PR_CreateThread(PR_USER_THREAD,
1919 - clientThreadFunc, (void *) listenPort1,
1920 + clientThreadFunc, (void *)(uintptr_t)listenPort1,
1921 PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
1922 PR_UNJOINABLE_THREAD, 0);
1923 if (clientThread == NULL) {
1924 @@ -208,7 +208,7 @@ int main(int argc, char **argv)
1927 clientThread = PR_CreateThread(PR_USER_THREAD,
1928 - clientThreadFunc, (void *) listenPort2,
1929 + clientThreadFunc, (void *)(uintptr_t)listenPort2,
1930 PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD,
1931 PR_UNJOINABLE_THREAD, 0);
1932 if (clientThread == NULL) {
1933 @@ -217,7 +217,7 @@ int main(int argc, char **argv)
1936 clientThread = PR_CreateThread(PR_USER_THREAD,
1937 - clientThreadFunc, (void *) listenPort3,
1938 + clientThreadFunc, (void *)(uintptr_t)listenPort3,
1939 PR_PRIORITY_NORMAL, PR_GLOBAL_BOUND_THREAD,
1940 PR_UNJOINABLE_THREAD, 0);
1941 if (clientThread == NULL) {
1942 --- pr/tests/randseed.c.orig 2015-10-16 13:22:19 UTC
1943 +++ pr/tests/randseed.c
1944 @@ -48,7 +48,6 @@ static void Help( void )
1945 static void PrintRand( void *buf, PRIntn size )
1950 printf("%4.4d--\n", size );
1952 --- pr/tests/ranfile.c.orig 2015-10-16 13:22:19 UTC
1953 +++ pr/tests/ranfile.c
1954 @@ -130,7 +130,7 @@ static void PR_CALLBACK Thread(void *arg
1955 PRStatus rv = PR_SUCCESS;
1956 Hammer_t *cd = (Hammer_t*)arg;
1958 - (void)sprintf(filename, "%ssg%04ld.dat", baseName, cd->id);
1959 + (void)sprintf(filename, "%ssg%04d.dat", baseName, (int)cd->id);
1961 if (debug_mode) printf("Starting work on %s\n", filename);
1963 @@ -364,14 +364,14 @@ int main(int argc, char **argv)
1966 if (debug_mode) printf(
1967 - "%s: test failed %s after %ld seconds\n",
1968 - programName, where[hammer[poll].problem], duration);
1969 + "%s: test failed %s after %d seconds\n",
1970 + programName, where[hammer[poll].problem], (int)duration);
1971 else failed_already=1;
1975 if (debug_mode) printf(
1976 - "%s: [%ld [%ld] %ld] writes/sec average\n",
1977 + "%s: [%d [%d] %d] writes/sec average\n",
1978 programName, writesMin, writesTot * 1000 / durationTot, writesMax);
1980 PR_DestroyCondVar(cv);
1981 --- pr/tests/runtests.sh.orig 2015-10-16 13:22:19 UTC
1982 +++ pr/tests/runtests.sh
1983 @@ -58,9 +58,6 @@ fi
1984 # Tests not run (but should)
1987 -#forktest (failed on IRIX)
1988 -#nbconn - fails on some platforms
1989 -#poll_er - fails on some platforms? limited use?
1990 #prpoll - the bad-FD test needs to be moved to a different test
1991 #sleep - specific to OS/2
1993 @@ -92,6 +89,7 @@ exit
2001 @@ -99,7 +97,6 @@ getproto
2009 @@ -120,6 +117,7 @@ logger
2017 @@ -136,6 +134,7 @@ perf
2025 @@ -208,7 +207,7 @@ OBJDIR=`basename $PWD`
2026 printf "\nNSPR Test Results - $OBJDIR\n\n"
2027 printf "BEGIN\t\t\t`date`\n"
2028 printf "NSPR_TEST_LOGFILE\t${LOGFILE}\n\n"
2029 -printf "Test\t\t\tResult\n\n"
2030 +printf " Test\t\t\tResult\n\n"
2031 if [ $OS_PLATFORM = "Windows_95" ] || [ $OS_PLATFORM = "Windows_98" ] || [ $OS_PLATFORM = "Windows_NT" ] || [ $OS_PLATFORM = "OS/2" ] ; then
2034 @@ -226,10 +225,8 @@ if [ $OS_PLATFORM = "Windows_95" ] || [
2039 - printf "\nBEGIN TEST: $prog\n\n" >> ${LOGFILE} 2>&1
2041 - ./$prog >> ${LOGFILE} 2>&1 &
2043 + ./$prog >> $prog.output 2>&1 &
2046 if test -n "$TEST_TIMEOUT" && test "$TEST_TIMEOUT" -gt 0
2047 @@ -244,28 +241,11 @@ else
2048 printf "\t\t\tPassed\n";
2050 printf "\t\t\tFAILED\n";
2051 + sed "s,^, $prog: ," < $prog.output
2054 - printf "\nEND TEST: $prog\n\n" >> ${LOGFILE} 2>&1
2058 printf "END\t\t\t`date`\n"
2077 --- pr/tests/sel_spd.c.orig 2015-10-16 13:22:19 UTC
2078 +++ pr/tests/sel_spd.c
2083 +#if defined(XP_UNIX) || defined(XP_OS2_EMX)
2084 +# include <unistd.h> /* getopt(3) */
2090 #define PORT_BASE 19000
2092 typedef struct timer_slot_t {
2093 - unsigned long d_connect;
2094 - unsigned long d_cl_data;
2095 - unsigned long d_sv_data;
2096 - unsigned long d_close;
2097 - unsigned long d_total;
2098 - unsigned long requests;
2099 + unsigned int d_connect;
2100 + unsigned int d_cl_data;
2101 + unsigned int d_sv_data;
2102 + unsigned int d_close;
2103 + unsigned int d_total;
2104 + unsigned int requests;
2107 -static long _iterations = 5;
2108 -static long _client_data = 8192;
2109 +static int _iterations = 5;
2110 +static int _client_data = 8192;
2114 @@ -40,12 +43,11 @@ static long _client_data = 8192;
2115 * memory and not be able to allocate thread stack or client/server data
2118 -static long _server_data = (8*1024);
2119 -static long _threads_max = 10, _threads = 10;
2120 +static int _server_data = (8*1024);
2122 -static long _server_data = (128*1024);
2123 -static long _threads_max = 10, _threads = 10;
2124 +static int _server_data = (128*1024);
2126 +static int _threads_max = 10, _threads = 10;
2128 static int verbose=0;
2129 static PRMonitor *exit_cv;
2130 @@ -101,7 +103,7 @@ _server_thread(void *arg_id)
2131 void _client_thread(void *);
2133 int *id = (int *)arg_id;
2135 + PRFileDesc *sock = NULL;
2136 PRSocketOptionData sockopt;
2138 PRFileDesc * newsock;
2139 @@ -469,12 +471,12 @@ void
2140 tally_results(int verbose)
2143 - unsigned long tot_connect = 0;
2144 - unsigned long tot_cl_data = 0;
2145 - unsigned long tot_sv_data = 0;
2146 - unsigned long tot_close = 0;
2147 - unsigned long tot_all = 0;
2148 - unsigned long tot_requests = 0;
2149 + unsigned int tot_connect = 0;
2150 + unsigned int tot_cl_data = 0;
2151 + unsigned int tot_sv_data = 0;
2152 + unsigned int tot_close = 0;
2153 + unsigned int tot_all = 0;
2154 + unsigned int tot_requests = 0;
2156 fprintf(stdout, "Server results:\n\n");
2157 for (index=0; index<_threads_max*2; index+=2) {
2158 --- pr/tests/selct_nm.c.orig 2015-10-16 13:22:19 UTC
2159 +++ pr/tests/selct_nm.c
2160 @@ -45,7 +45,7 @@ PRIntn debug_mode;
2162 clientThreadFunc(void *arg)
2164 - PRUintn port = (PRUintn) arg;
2165 + PRUintn port = (PRUintn)(uintptr_t)arg;
2169 @@ -165,7 +165,7 @@ failed_already=1;
2170 if (debug_mode) printf("%s", buf);
2172 clientThread = PR_CreateThread(PR_USER_THREAD,
2173 - clientThreadFunc, (void *) listenPort1,
2174 + clientThreadFunc, (void *)(uintptr_t)listenPort1,
2175 PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
2176 PR_UNJOINABLE_THREAD, 0);
2177 if (clientThread == NULL) {
2178 @@ -175,7 +175,7 @@ failed_already=1;
2181 clientThread = PR_CreateThread(PR_USER_THREAD,
2182 - clientThreadFunc, (void *) listenPort2,
2183 + clientThreadFunc, (void *)(uintptr_t)listenPort2,
2184 PR_PRIORITY_NORMAL, PR_LOCAL_THREAD,
2185 PR_UNJOINABLE_THREAD, 0);
2186 if (clientThread == NULL) {
2187 --- pr/tests/select2.c.orig 2015-10-16 13:22:19 UTC
2188 +++ pr/tests/select2.c
2189 @@ -53,6 +53,7 @@ PRInt32 count;
2191 ***********************************************************************/
2193 +static int exitcode = 2;
2195 static void Test_Result (int result)
2197 @@ -60,9 +61,12 @@ static void Test_Result (int result)
2201 + if (exitcode == 2)
2209 printf ("NOSTATUS\n");
2210 @@ -319,4 +323,5 @@ int main(int argc, char **argv)
2216 --- pr/tests/semaerr.c.orig 2015-10-16 13:22:19 UTC
2217 +++ pr/tests/semaerr.c
2218 @@ -65,7 +65,7 @@ int main(int argc, char **argv)
2221 if (PR_GetError() != PR_FILE_NOT_FOUND_ERROR) {
2222 - fprintf(stderr, "Expected error is %d but got (%d, %d)\n",
2223 + fprintf(stderr, "Expected error is %ld (PR_FILE_NOT_FOUND_ERROR) but got (%d, %d)\n",
2224 PR_FILE_NOT_FOUND_ERROR, PR_GetError(), PR_GetOSError());
2227 --- pr/tests/semaerr1.c.orig 2015-10-16 13:22:19 UTC
2228 +++ pr/tests/semaerr1.c
2229 @@ -75,7 +75,7 @@ int main(int argc, char **argv)
2232 if (PR_GetError() != PR_FILE_EXISTS_ERROR) {
2233 - fprintf(stderr, "Expect %d but got %d\n", PR_FILE_EXISTS_ERROR,
2234 + fprintf(stderr, "Expected %ld (PR_FILE_EXISTS_ERROR) but got %d\n", PR_FILE_EXISTS_ERROR,
2238 --- pr/tests/sendzlf.c.orig 2015-10-16 13:22:19 UTC
2239 +++ pr/tests/sendzlf.c
2240 @@ -26,7 +26,7 @@ static void ClientThread(void *arg)
2244 - PRUint16 port = (PRUint16) arg;
2245 + PRUint16 port = (PRUint16)(uintptr_t)arg;
2249 @@ -184,7 +184,7 @@ int main(int argc, char **argv)
2252 clientThread = PR_CreateThread(PR_USER_THREAD,
2253 - ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)),
2254 + ClientThread, (void *)(uintptr_t)PR_ntohs(PR_NetAddrInetPort(&addr)),
2255 PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0);
2256 if (NULL == clientThread) {
2257 fprintf(stderr, "PR_CreateThread failed\n");
2258 --- pr/tests/server_test.c.orig 2015-10-16 13:22:19 UTC
2259 +++ pr/tests/server_test.c
2260 @@ -60,7 +60,7 @@ PRCondVar *ServerStateCV;
2262 #define DPRINTF printf
2265 +#define DPRINTF(...)
2269 @@ -502,6 +502,7 @@ static void do_workUU(void)
2274 static void do_workUK(void)
2276 ServerScope = PR_LOCAL_THREAD;
2277 @@ -522,6 +523,7 @@ static void do_workKK(void)
2278 ClientScope = PR_GLOBAL_THREAD;
2284 static void Measure(void (*func)(void), const char *msg)
2285 --- pr/tests/servr_kk.c.orig 2015-10-16 13:22:19 UTC
2286 +++ pr/tests/servr_kk.c
2287 @@ -57,7 +57,7 @@ PRCondVar *ServerStateCV;
2289 #define DPRINTF printf
2292 +#define DPRINTF(...)
2295 PRIntn failed_already=0;
2296 @@ -472,6 +472,7 @@ void do_work()
2297 PR_JoinThread(ServerThread);
2301 static void do_workUU(void)
2303 ServerScope = PR_LOCAL_THREAD;
2304 @@ -492,6 +493,7 @@ static void do_workKU(void)
2305 ClientScope = PR_LOCAL_THREAD;
2310 static void do_workKK(void)
2312 --- pr/tests/servr_ku.c.orig 2015-10-16 13:22:19 UTC
2313 +++ pr/tests/servr_ku.c
2314 @@ -57,7 +57,7 @@ PRCondVar *ServerStateCV;
2316 #define DPRINTF printf
2319 +#define DPRINTF(...)
2322 PRIntn failed_already=0;
2323 --- pr/tests/servr_uk.c.orig 2015-10-16 13:22:19 UTC
2324 +++ pr/tests/servr_uk.c
2325 @@ -57,7 +57,7 @@ PRCondVar *ServerStateCV;
2327 #define DPRINTF printf
2330 +#define DPRINTF(...)
2333 PRIntn failed_already=0;
2334 --- pr/tests/servr_uu.c.orig 2015-10-16 13:22:19 UTC
2335 +++ pr/tests/servr_uu.c
2336 @@ -57,7 +57,7 @@ PRCondVar *ServerStateCV;
2338 #define DPRINTF printf
2341 +#define DPRINTF(...)
2344 PRIntn failed_already=0;
2345 --- pr/tests/short_thread.c.orig 2015-10-16 13:22:19 UTC
2346 +++ pr/tests/short_thread.c
2347 @@ -43,8 +43,8 @@ int main (int argc, char **argv)
2348 PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD, 0))
2351 - "simple_test: Error - PR_CreateThread failed: (%ld, %ld)\n",
2352 - PR_GetError(), PR_GetOSError());
2353 + "simple_test: Error - PR_CreateThread failed: (%d, %d)\n",
2354 + PR_GetError(), PR_GetOSError());
2358 --- pr/tests/socket.c.orig 2015-10-16 13:22:19 UTC
2359 +++ pr/tests/socket.c
2360 @@ -103,13 +103,15 @@ char *LARGE_FILE_NAME = "/tmp/prsocket_t
2363 static PRInt32 num_tcp_clients = NUM_TCP_CLIENTS;
2364 -static PRInt32 num_udp_clients = NUM_UDP_CLIENTS;
2365 static PRInt32 num_transmitfile_clients = NUM_TRANSMITFILE_CLIENTS;
2366 static PRInt32 num_tcp_connections_per_client = NUM_TCP_CONNECTIONS_PER_CLIENT;
2367 static PRInt32 tcp_mesg_size = TCP_MESG_SIZE;
2368 static PRInt32 num_tcp_mesgs_per_connection = NUM_TCP_MESGS_PER_CONNECTION;
2369 +#if defined(SYMBIAN) && !defined(__WINSCW__)
2370 +static PRInt32 num_udp_clients = NUM_UDP_CLIENTS;
2371 static PRInt32 num_udp_datagrams_per_client = NUM_UDP_DATAGRAMS_PER_CLIENT;
2372 static PRInt32 udp_datagram_size = UDP_DGRAM_SIZE;
2375 static PRInt32 thread_count;
2376 PRUint16 server_domain = PR_AF_INET, client_domain = PR_AF_INET;
2377 @@ -181,19 +183,23 @@ readn(PRFileDesc *sockfd, char *buf, int
2384 PRIntervalTime timeout = PR_INTERVAL_NO_TIMEOUT;
2387 timeout = PR_SecondsToInterval(2);
2389 for (rem=len; rem; offset += bytes, rem -= bytes) {
2390 - DPRINTF(("thread = 0x%lx: calling PR_Recv, bytes = %d\n",
2391 + DPRINTF(("thread = %p: calling PR_Recv, bytes = %d\n",
2392 PR_GetCurrentThread(), rem));
2396 bytes = PR_Recv(sockfd, buf + offset, rem, 0,
2398 - DPRINTF(("thread = 0x%lx: returning from PR_Recv, bytes = %d\n",
2399 + DPRINTF(("thread = %p: returning from PR_Recv, bytes = %d\n",
2400 PR_GetCurrentThread(), bytes));
2403 @@ -224,11 +230,11 @@ writen(PRFileDesc *sockfd, char *buf, in
2406 for (rem=len; rem; offset += bytes, rem -= bytes) {
2407 - DPRINTF(("thread = 0x%lx: calling PR_Send, bytes = %d\n",
2408 + DPRINTF(("thread = %p: calling PR_Send, bytes = %d\n",
2409 PR_GetCurrentThread(), rem));
2410 bytes = PR_Send(sockfd, buf + offset, rem, 0,
2411 PR_INTERVAL_NO_TIMEOUT);
2412 - DPRINTF(("thread = 0x%lx: returning from PR_Send, bytes = %d\n",
2413 + DPRINTF(("thread = %p: returning from PR_Send, bytes = %d\n",
2414 PR_GetCurrentThread(), bytes));
2417 @@ -279,7 +285,7 @@ Serve_Client(void *arg)
2418 fprintf(stderr,"prsocket_test: ERROR - PR_Shutdown\n");
2421 - DPRINTF(("Serve_Client [0x%lx]: inbuf[0] = 0x%lx\n",PR_GetCurrentThread(),
2422 + DPRINTF(("Serve_Client [%p]: inbuf[0] = %d\n",PR_GetCurrentThread(),
2423 (*((int *) in_buf->data))));
2424 if (writen(sockfd, in_buf->data, bytes) < bytes) {
2425 fprintf(stderr,"prsocket_test: ERROR - Serve_Client:writen\n");
2426 @@ -418,7 +424,7 @@ TCP_Server(void *arg)
2430 - DPRINTF(("TCP_Server: PR_BIND netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n",
2431 + DPRINTF(("TCP_Server: PR_BIND netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n",
2432 netaddr.inet.ip, netaddr.inet.port));
2433 if (PR_SetNetAddr(PR_IpAddrLoopback, client_domain,
2434 PR_ntohs(PR_NetAddrInetPort(&netaddr)),
2435 @@ -460,7 +466,7 @@ TCP_Server(void *arg)
2436 scp->datalen = sp->datalen;
2438 t = create_new_thread(PR_USER_THREAD,
2439 - Serve_Client, (void *)scp,
2440 + Serve_Client, (void *)scp,
2443 PR_UNJOINABLE_THREAD,
2444 @@ -470,7 +476,7 @@ TCP_Server(void *arg)
2448 - DPRINTF(("TCP_Server: Created Serve_Client = 0x%lx\n", t));
2449 + DPRINTF(("TCP_Server: Created Serve_Client = %p\n", t));
2453 @@ -486,9 +492,10 @@ exit:
2454 --(*sp->exit_counter);
2455 PR_Notify(sp->exit_mon);
2456 PR_ExitMonitor(sp->exit_mon);
2457 - DPRINTF(("TCP_Server [0x%lx] exiting\n", PR_GetCurrentThread()));
2458 + DPRINTF(("TCP_Server [%p] exiting\n", PR_GetCurrentThread()));
2461 +#if defined(SYMBIAN) && !defined(__WINSCW__)
2465 @@ -544,7 +551,7 @@ UDP_Server(void *arg)
2469 - DPRINTF(("PR_Bind: UDP Server netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n",
2470 + DPRINTF(("PR_Bind: UDP Server netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n",
2471 netaddr.inet.ip, netaddr.inet.port));
2473 * We can't use the IP address returned by PR_GetSockName in
2474 @@ -582,13 +589,13 @@ UDP_Server(void *arg)
2476 memset(&netaddr, 0 , sizeof(netaddr));
2477 for (i = 0; i < (num_udp_clients * num_udp_datagrams_per_client); i++) {
2478 - DPRINTF(("UDP_Server: calling PR_RecvFrom client - ip = 0x%lx, port = %d bytes = %d inbuf = 0x%lx, inbuf[0] = 0x%lx\n",
2479 + DPRINTF(("UDP_Server: calling PR_RecvFrom client - ip = 0x%x, port = %d bytes = %d inbuf = %p, inbuf[0] = 0x%x\n",
2480 netaddr.inet.ip, netaddr.inet.port, bytes, in_buf->data,
2483 rv = PR_RecvFrom(sockfd, in_buf->data, bytes, 0, &netaddr,
2484 PR_INTERVAL_NO_TIMEOUT);
2485 - DPRINTF(("UDP_Server: PR_RecvFrom client - ip = 0x%lx, port = %d bytes = %d inbuf = 0x%lx, inbuf[0] = 0x%lx\n",
2486 + DPRINTF(("UDP_Server: PR_RecvFrom client - ip = 0x%x, port = %d bytes = %d inbuf = %p, inbuf[0] = 0x%x\n",
2487 netaddr.inet.ip, netaddr.inet.port, rv, in_buf->data,
2490 @@ -611,8 +618,9 @@ UDP_Server(void *arg)
2491 --(*sp->exit_counter);
2492 PR_Notify(sp->exit_mon);
2493 PR_ExitMonitor(sp->exit_mon);
2494 - DPRINTF(("UDP_Server [0x%x] exiting\n", PR_GetCurrentThread()));
2495 + DPRINTF(("UDP_Server [%p] exiting\n", PR_GetCurrentThread()));
2497 +#endif /* defined(SYMBIAN) && !defined(__WINSCW__) */
2501 @@ -655,7 +663,7 @@ TCP_Client(void *arg)
2503 if (PR_Connect(sockfd, &netaddr,PR_INTERVAL_NO_TIMEOUT) < 0){
2504 fprintf(stderr, "PR_Connect failed: (%ld, %ld)\n",
2505 - PR_GetError(), PR_GetOSError());
2506 + (long)PR_GetError(), (long)PR_GetOSError());
2510 @@ -663,7 +671,7 @@ TCP_Client(void *arg)
2512 * fill in random data
2514 - memset(out_buf->data, ((PRInt32) (&netaddr)) + i + j, bytes);
2515 + memset(out_buf->data, ((intptr_t)(&netaddr)) + i + j, bytes);
2519 @@ -676,7 +684,7 @@ TCP_Client(void *arg)
2523 - DPRINTF(("TCP Client [0x%lx]: out_buf = 0x%lx out_buf[0] = 0x%lx\n",
2524 + DPRINTF(("TCP Client [%p]: out_buf = %p out_buf[0] = 0x%x\n",
2525 PR_GetCurrentThread(), out_buf, (*((int *) out_buf->data))));
2526 if (readn(sockfd, in_buf->data, bytes) < bytes) {
2527 fprintf(stderr,"prsocket_test: ERROR - TCP_Client:readn\n");
2528 @@ -716,13 +724,14 @@ TCP_Client(void *arg)
2529 --(*cp->exit_counter);
2530 PR_Notify(cp->exit_mon);
2531 PR_ExitMonitor(cp->exit_mon);
2532 - DPRINTF(("TCP_Client [0x%x] exiting\n", PR_GetCurrentThread()));
2533 + DPRINTF(("TCP_Client [%p] exiting\n", PR_GetCurrentThread()));
2536 +#if defined(SYMBIAN) && !defined(__WINSCW__)
2540 - * Create a socket and bind an address
2541 + * Create a socket and bind an address
2542 * Communicate with the server at the address specified in the argument.
2543 * Fill in a buffer, write data to server, read it back and check
2544 * for data corruption.
2545 @@ -780,7 +789,7 @@ UDP_Client(void *arg)
2549 - DPRINTF(("PR_Bind: UDP Client netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n",
2550 + DPRINTF(("PR_Bind: UDP Client netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n",
2551 netaddr.inet.ip, netaddr.inet.port));
2553 netaddr = cp->server_addr;
2554 @@ -797,9 +806,9 @@ UDP_Client(void *arg)
2556 * fill in random data
2558 - DPRINTF(("UDP_Client [0x%lx]: out_buf = 0x%lx bytes = 0x%lx\n",
2559 + DPRINTF(("UDP_Client [%p]: out_buf = %p bytes = %d\n",
2560 PR_GetCurrentThread(), out_buf->data, bytes));
2561 - memset(out_buf->data, ((PRInt32) (&netaddr)) + i, bytes);
2562 + memset(out_buf->data, ((intptr_t)(&netaddr)) + i, bytes);
2566 @@ -812,7 +821,7 @@ UDP_Client(void *arg)
2570 - DPRINTF(("UDP_Client [0x%lx]: out_buf = 0x%lx out_buf[0] = 0x%lx\n",
2571 + DPRINTF(("UDP_Client [%p]: out_buf = %p out_buf[0] = 0x%x\n",
2572 PR_GetCurrentThread(), out_buf, (*((int *) out_buf->data))));
2573 if (cp->udp_connect)
2574 rv = PR_Recv(sockfd, in_buf->data, bytes, 0,
2575 @@ -823,7 +832,7 @@ UDP_Client(void *arg)
2579 - DPRINTF(("UDP_Client [0x%lx]: in_buf = 0x%lx in_buf[0] = 0x%lx\n",
2580 + DPRINTF(("UDP_Client [%p]: in_buf = %p in_buf[0] = 0x%x\n",
2581 PR_GetCurrentThread(), in_buf, (*((int *) in_buf->data))));
2583 * verify the data read
2584 @@ -848,12 +857,13 @@ UDP_Client(void *arg)
2585 PR_Notify(cp->exit_mon);
2586 PR_ExitMonitor(cp->exit_mon);
2588 - DPRINTF(("UDP_Client [0x%x] exiting\n", PR_GetCurrentThread()));
2589 + DPRINTF(("UDP_Client [%p] exiting\n", PR_GetCurrentThread()));
2591 +#endif /* defined(SYMBIAN) && !defined(__WINSCW__) */
2594 * TCP_Socket_Client_Server_Test - concurrent server test
2597 * One server and several clients are started
2598 * Each client connects to the server and sends a chunk of data
2599 * For each connection, server starts another thread to read the data
2600 @@ -905,7 +915,7 @@ TCP_Socket_Client_Server_Test(void)
2601 sparamp->exit_counter = &thread_count;
2602 sparamp->datalen = datalen;
2603 t = PR_CreateThread(PR_USER_THREAD,
2604 - TCP_Server, (void *)sparamp,
2605 + TCP_Server, (void *)sparamp,
2608 PR_UNJOINABLE_THREAD,
2609 @@ -915,7 +925,7 @@ TCP_Socket_Client_Server_Test(void)
2613 - DPRINTF(("Created TCP server = 0x%lx\n", t));
2614 + DPRINTF(("Created TCP server = %p\n", t));
2618 @@ -949,7 +959,7 @@ TCP_Socket_Client_Server_Test(void)
2622 - DPRINTF(("Created TCP client = 0x%lx\n", t));
2623 + DPRINTF(("Created TCP client = %p\n", t));
2626 /* Wait for server and client threads to exit */
2627 @@ -959,17 +969,18 @@ TCP_Socket_Client_Server_Test(void)
2629 PR_ExitMonitor(mon2);
2630 printf("%30s","TCP_Socket_Client_Server_Test:");
2631 - printf("%2ld Server %2ld Clients %2ld connections_per_client\n",1l,
2632 + printf(" 1 Server %2d Clients %2d connections_per_client\n",
2633 num_tcp_clients, num_tcp_connections_per_client);
2634 - printf("%30s %2ld messages_per_connection %4ld bytes_per_message\n",":",
2635 + printf("%30s %2d messages_per_connection %4d bytes_per_message\n",":",
2636 num_tcp_mesgs_per_connection, tcp_mesg_size);
2641 +#if defined(SYMBIAN) && !defined(__WINSCW__)
2643 * UDP_Socket_Client_Server_Test - iterative server test
2646 * One server and several clients are started
2647 * Each client connects to the server and sends a chunk of data
2648 * For each connection, server starts another thread to read the data
2649 @@ -1023,7 +1034,7 @@ UDP_Socket_Client_Server_Test(void)
2650 sparamp->datalen = datalen;
2651 DPRINTF(("Creating UDP server"));
2652 t = PR_CreateThread(PR_USER_THREAD,
2653 - UDP_Server, (void *)sparamp,
2654 + UDP_Server, (void *)sparamp,
2657 PR_UNJOINABLE_THREAD,
2658 @@ -1084,12 +1095,13 @@ UDP_Socket_Client_Server_Test(void)
2660 PR_ExitMonitor(mon2);
2661 printf("%30s","UDP_Socket_Client_Server_Test: ");
2662 - printf("%2ld Server %2ld Clients\n",1l, num_udp_clients);
2663 - printf("%30s %2ld datagrams_per_client %4ld bytes_per_datagram\n",":",
2664 + printf(" 1 Server %2d Clients\n", num_udp_clients);
2665 + printf("%30s %2d datagrams_per_client %4d bytes_per_datagram\n",":",
2666 num_udp_datagrams_per_client, udp_datagram_size);
2670 +#endif /* defined(SYMBIAN) && !defined(__WINSCW__) */
2672 static PRFileDesc *small_file_fd, *large_file_fd;
2673 static void *small_file_addr, *small_file_header, *large_file_addr;
2674 @@ -1441,7 +1453,7 @@ TransmitFile_Client(void *arg)
2675 --(*cp->exit_counter);
2676 PR_Notify(cp->exit_mon);
2677 PR_ExitMonitor(cp->exit_mon);
2678 - DPRINTF(("TransmitFile_Client [0x%lx] exiting\n", PR_GetCurrentThread()));
2679 + DPRINTF(("TransmitFile_Client [%p] exiting\n", PR_GetCurrentThread()));
2683 @@ -1484,7 +1496,7 @@ Serve_TransmitFile_Client(void *arg)
2684 if (bytes != (SMALL_FILE_SIZE+ SMALL_FILE_HEADER_SIZE)) {
2686 "prsocet_test: PR_TransmitFile failed: (%ld, %ld)\n",
2687 - PR_GetError(), PR_GetOSError());
2688 + (long)PR_GetError(), (long)PR_GetOSError());
2691 bytes = PR_TransmitFile(sockfd, local_large_file_fd, NULL, 0,
2692 @@ -1492,7 +1504,7 @@ Serve_TransmitFile_Client(void *arg)
2693 if (bytes != LARGE_FILE_SIZE) {
2695 "prsocket_test: PR_TransmitFile failed: (%ld, %ld)\n",
2696 - PR_GetError(), PR_GetOSError());
2697 + (long)PR_GetError(), (long)PR_GetOSError());
2701 @@ -1520,7 +1532,7 @@ Serve_TransmitFile_Client(void *arg)
2704 "prsocket_test: PR_SendFile failed: (%ld, %ld)\n",
2705 - PR_GetError(), PR_GetOSError());
2706 + (long)PR_GetError(), (long)PR_GetOSError());
2710 @@ -1544,7 +1556,7 @@ Serve_TransmitFile_Client(void *arg)
2713 "prsocket_test: PR_SendFile failed: (%ld, %ld)\n",
2714 - PR_GetError(), PR_GetOSError());
2715 + (long)PR_GetError(), (long)PR_GetOSError());
2719 @@ -1566,7 +1578,7 @@ Serve_TransmitFile_Client(void *arg)
2722 "prsocket_test: PR_SendFile failed: (%ld, %ld)\n",
2723 - PR_GetError(), PR_GetOSError());
2724 + (long)PR_GetError(), (long)PR_GetOSError());
2728 @@ -1588,7 +1600,7 @@ Serve_TransmitFile_Client(void *arg)
2731 "prsocket_test: PR_SendFile failed: (%ld, %ld)\n",
2732 - PR_GetError(), PR_GetOSError());
2733 + (long)PR_GetError(), (long)PR_GetOSError());
2737 @@ -1610,7 +1622,7 @@ Serve_TransmitFile_Client(void *arg)
2740 "prsocket_test: PR_SendFile failed: (%ld, %ld)\n",
2741 - PR_GetError(), PR_GetOSError());
2742 + (long)PR_GetError(), (long)PR_GetOSError());
2746 @@ -1632,7 +1644,7 @@ Serve_TransmitFile_Client(void *arg)
2749 "prsocket_test: PR_SendFile failed: (%ld, %ld)\n",
2750 - PR_GetError(), PR_GetOSError());
2751 + (long)PR_GetError(), (long)PR_GetOSError());
2755 @@ -1654,7 +1666,7 @@ Serve_TransmitFile_Client(void *arg)
2758 "prsocket_test: PR_SendFile failed: (%ld, %ld)\n",
2759 - PR_GetError(), PR_GetOSError());
2760 + (long)PR_GetError(), (long)PR_GetOSError());
2764 @@ -1678,7 +1690,7 @@ Serve_TransmitFile_Client(void *arg)
2767 "prsocket_test: PR_SendFile failed: (%ld, %ld)\n",
2768 - PR_GetError(), PR_GetOSError());
2769 + (long)PR_GetError(), (long)PR_GetOSError());
2773 @@ -1752,7 +1764,7 @@ TransmitFile_Server(void *arg)
2777 - DPRINTF(("TCP_Server: PR_BIND netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n",
2778 + DPRINTF(("TCP_Server: PR_BIND netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n",
2779 netaddr.inet.ip, netaddr.inet.port));
2780 tcp_server_addr.inet.family = netaddr.inet.family;
2781 tcp_server_addr.inet.port = netaddr.inet.port;
2782 @@ -1807,7 +1819,7 @@ TransmitFile_Server(void *arg)
2783 scp->datalen = sp->datalen;
2785 t[i] = PR_CreateThread(PR_USER_THREAD,
2786 - Serve_TransmitFile_Client, (void *)scp,
2787 + Serve_TransmitFile_Client, (void *)scp,
2791 @@ -1818,7 +1830,7 @@ TransmitFile_Server(void *arg)
2795 - DPRINTF(("TransmitFile_Server: Created Serve_TransmitFile_Client = 0x%lx\n", t));
2796 + DPRINTF(("TransmitFile_Server: Created Serve_TransmitFile_Client = %p\n", t));
2800 @@ -1846,12 +1858,12 @@ exit:
2801 --(*sp->exit_counter);
2802 PR_Notify(sp->exit_mon);
2803 PR_ExitMonitor(sp->exit_mon);
2804 - DPRINTF(("TransmitFile_Server [0x%lx] exiting\n", PR_GetCurrentThread()));
2805 + DPRINTF(("TransmitFile_Server [%p] exiting\n", PR_GetCurrentThread()));
2809 - * Socket_Misc_Test - test miscellaneous functions
2811 + * Socket_Misc_Test - test miscellaneous functions
2815 Socket_Misc_Test(void)
2816 @@ -1986,7 +1998,7 @@ Socket_Misc_Test(void)
2818 "prsocket_test failed to write to file %s: (%ld, %ld)\n",
2820 - PR_GetError(), PR_GetOSError());
2821 + (long)PR_GetError(), (long)PR_GetOSError());
2825 @@ -2065,7 +2077,7 @@ Socket_Misc_Test(void)
2826 sparamp->exit_counter = &thread_count;
2827 sparamp->datalen = datalen;
2828 t = PR_CreateThread(PR_USER_THREAD,
2829 - TransmitFile_Server, (void *)sparamp,
2830 + TransmitFile_Server, (void *)sparamp,
2833 PR_UNJOINABLE_THREAD,
2834 @@ -2076,7 +2088,7 @@ Socket_Misc_Test(void)
2838 - DPRINTF(("Created TCP server = 0x%x\n", t));
2839 + DPRINTF(("Created TCP server = %p\n", t));
2843 @@ -2113,7 +2125,7 @@ Socket_Misc_Test(void)
2847 - DPRINTF(("Created TransmitFile client = 0x%lx\n", t));
2848 + DPRINTF(("Created TransmitFile client = %p\n", t));
2851 /* Wait for server and client threads to exit */
2852 @@ -2144,7 +2156,7 @@ done:
2854 if ((PR_RmDir(TEST_DIR)) == PR_FAILURE) {
2855 fprintf(stderr,"prsocket_test failed to rmdir %s: (%ld, %ld)\n",
2856 - TEST_DIR, PR_GetError(), PR_GetOSError());
2857 + TEST_DIR, (long)PR_GetError(), (long)PR_GetOSError());
2861 --- pr/tests/sprintf.c.orig 2015-10-16 13:22:19 UTC
2862 +++ pr/tests/sprintf.c
2863 @@ -127,7 +127,7 @@ static void test_l(char *pattern, char *
2864 (strncmp(s, sbuf, sizeof(sbuf)) != 0)) {
2866 "pattern='%s' l=%ld\nPR_smprintf='%s'\nPR_snprintf='%s'\n sprintf='%s'\n",
2867 - pattern, l, s, buf, sbuf);
2868 + pattern, (long)l, s, buf, sbuf);
2869 PR_smprintf_free(s);
2872 --- pr/tests/stack.c.orig 2015-10-16 13:22:19 UTC
2873 +++ pr/tests/stack.c
2874 @@ -54,7 +54,7 @@ PRFileDesc *errhandle;
2875 int main(int argc, char **argv)
2877 #if !(defined(SYMBIAN) && defined(__WINS__))
2878 - PRInt32 rv, cnt, sum;
2881 PRStack *list1, *list2;
2883 @@ -209,7 +209,7 @@ int main(int argc, char **argv)
2884 static void stackop(void *thread_arg)
2886 PRInt32 val, cnt, index, loops;
2887 - DataRecord *Items, *Item;
2888 + DataRecord *Items;
2889 PRStack *list1, *list2;
2891 stack_data *arg = (stack_data *) thread_arg;
2892 --- pr/tests/suspend.c.orig 2015-10-16 13:22:19 UTC
2893 +++ pr/tests/suspend.c
2894 @@ -30,14 +30,14 @@ void PR_CALLBACK
2895 Level_2_Thread(void *arg)
2897 PR_Sleep(PR_MillisecondsToInterval(4 * 1000));
2898 - printf("Level_2_Thread[0x%lx] exiting\n",PR_GetCurrentThread());
2899 + printf("Level_2_Thread[%p] exiting\n",PR_GetCurrentThread());
2904 Level_1_Thread(void *arg)
2906 - PRUint32 tmp = (PRUint32)arg;
2907 + PRUint32 tmp = (PRUint32)(uintptr_t)arg;
2908 PRThreadScope scope = (PRThreadScope) tmp;
2911 @@ -52,7 +52,7 @@ Level_1_Thread(void *arg)
2913 printf("Could not create thread!\n");
2915 - printf("Level_1_Thread[0x%lx] created %15s thread 0x%lx\n",
2916 + printf("Level_1_Thread[%p] created %15s thread %p\n",
2917 PR_GetCurrentThread(),
2918 (scope == PR_GLOBAL_THREAD) ?
2919 "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD",
2920 @@ -63,7 +63,7 @@ Level_1_Thread(void *arg)
2923 PR_ExitMonitor(mon);
2924 - printf("Thread[0x%lx] exiting\n",PR_GetCurrentThread());
2925 + printf("Thread[%p] exiting\n",PR_GetCurrentThread());
2928 static PRStatus PR_CALLBACK print_thread(PRThread *thread, int i, void *arg)
2929 @@ -72,14 +72,15 @@ static PRStatus PR_CALLBACK print_thread
2933 - "\nprint_thread[0x%lx]: %-20s - i = %ld\n",thread,
2934 + "\nprint_thread[%p]: %-20s - i = %ld\n",thread,
2935 (PR_GLOBAL_THREAD == PR_GetThreadScope(thread)) ?
2936 "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD", i);
2937 registers = PR_GetGCRegisters(thread, 0, (int *)&words);
2939 - printf("Registers R0 = 0x%x R1 = 0x%x R2 = 0x%x R3 = 0x%x\n",
2940 - registers[0],registers[1],registers[2],registers[3]);
2941 - printf("Stack Pointer = 0x%lx\n", PR_GetSP(thread));
2942 + printf("Regsters R0 = 0x%lx R1 = 0x%lx R2 = 0x%lx R3 = 0x%lx\n",
2943 + (unsigned long)registers[0], (unsigned long)registers[1],
2944 + (unsigned long)registers[2], (unsigned long)registers[3]);
2945 + printf("Stack Pointer = %p\n", PR_GetSP(thread));
2949 @@ -107,7 +108,7 @@ static void Level_0_Thread(PRThreadScope
2950 printf("Could not create thread!\n");
2953 - printf("Level_0_Thread[0x%lx] created %15s thread 0x%lx\n",
2954 + printf("Level_0_Thread[%p] created %15s thread %p\n",
2955 PR_GetCurrentThread(),
2956 (scope1 == PR_GLOBAL_THREAD) ?
2957 "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD",
2958 @@ -119,9 +120,10 @@ static void Level_0_Thread(PRThreadScope
2959 PR_EnumerateThreads(print_thread, NULL);
2960 registers = PR_GetGCRegisters(me, 1, (int *)&words);
2962 - printf("My Registers: R0 = 0x%x R1 = 0x%x R2 = 0x%x R3 = 0x%x\n",
2963 - registers[0],registers[1],registers[2],registers[3]);
2964 - printf("My Stack Pointer = 0x%lx\n", PR_GetSP(me));
2965 + printf("My Registers: R0 = 0x%lx R1 = 0x%lx R2 = 0x%lx R3 = 0x%lx\n",
2966 + (unsigned long)registers[0], (unsigned long)registers[1],
2967 + (unsigned long)registers[2], (unsigned long)registers[3]);
2968 + printf("My Stack Pointer = %p\n", PR_GetSP(me));
2971 /* Wait for all threads to exit */
2972 --- pr/tests/switch.c.orig 2015-10-16 13:22:19 UTC
2973 +++ pr/tests/switch.c
2974 @@ -80,7 +80,7 @@ PRIntn PR_CALLBACK Switch(PRIntn argc, c
2976 PRBool help = PR_FALSE;
2977 PRUintn concurrency = 1;
2978 - Shared *shared, *link;
2979 + Shared *shared = NULL, *link;
2980 PRIntervalTime timein, timeout;
2981 PRThreadScope thread_scope = PR_LOCAL_THREAD;
2982 PRUintn thread_count, inner_count, loop_count, average;
2983 --- pr/tests/testfile.c.orig 2015-10-16 13:22:19 UTC
2984 +++ pr/tests/testfile.c
2985 @@ -36,6 +36,9 @@ static int _debug_on = 0;
2989 +#if defined(XP_UNIX) || defined(XP_OS2_EMX)
2990 +# include <unistd.h> /* getopt(3) */
2993 #define DPRINTF(arg) if (_debug_on) printf arg
2995 @@ -93,7 +96,7 @@ static PRInt32 PR_CALLBACK DirTest(void
2996 PRInt32 dirtest_failed = 0;
2998 PRThread* create_new_thread(PRThreadType type,
2999 - void (*start)(void *arg),
3000 + void *(*start)(void *arg),
3002 PRThreadPriority priority,
3003 PRThreadScope scope,
3004 @@ -155,7 +158,7 @@ PRInt32 native_thread = 0;
3005 return((PRThread *) thandle);
3008 - return(PR_CreateThread(type,start,arg,priority,scope,state,stackSize));
3009 + return(PR_CreateThread(type,(void (*)(void*))start,arg,priority,scope,state,stackSize));
3012 return(PR_CreateThread(type,start,arg,priority,scope,state,stackSize));
3013 @@ -316,8 +319,8 @@ char tmpname[1024];
3015 "testfile PR_GetFileInfo returned incorrect status-change time: %s\n",
3017 - printf("ft = %lld, ft1 = %lld\n",file_info.creationTime,
3018 - file_info1.creationTime);
3019 + printf("ft = %lld, ft1 = %lld\n", (long long)file_info.creationTime,
3020 + (long long)file_info1.creationTime);
3024 @@ -342,8 +345,8 @@ char tmpname[1024];
3026 "testfile PR_GetFileInfo returned incorrect modify time: %s\n",
3028 - printf("ft = %lld, ft1 = %lld\n",file_info.modifyTime,
3029 - file_info1.modifyTime);
3030 + printf("ft = %lld, ft1 = %lld\n", (long long)file_info.modifyTime,
3031 + (long long)file_info1.modifyTime);
3035 @@ -469,7 +472,7 @@ File_Rdwr_Param *fparamp;
3036 memset(fparamp->buf, i, len);
3038 t = create_new_thread(PR_USER_THREAD,
3039 - File_Write, (void *)fparamp,
3040 + (void *(*)(void *))File_Write, (void *)fparamp,
3043 PR_UNJOINABLE_THREAD,
3044 @@ -504,7 +507,7 @@ File_Rdwr_Param *fparamp;
3047 t = create_new_thread(PR_USER_THREAD,
3048 - File_Read, (void *)fparamp,
3049 + (void *(*)(void *))File_Read, (void *)fparamp,
3052 PR_UNJOINABLE_THREAD,
3053 @@ -572,7 +575,7 @@ struct dirtest_arg thrarg;
3056 t = create_new_thread(PR_USER_THREAD,
3058 + (void *(*)(void *))DirTest, &thrarg,
3061 PR_UNJOINABLE_THREAD,
3062 @@ -895,8 +898,6 @@ int main(int argc, char **argv)
3064 #if defined(XP_UNIX) || defined(XP_OS2)
3066 - extern char *optarg;
3067 - extern int optind;
3069 #if defined(XP_UNIX) || defined(XP_OS2)
3070 while ((opt = getopt(argc, argv, "d")) != EOF) {
3071 --- pr/tests/threads.c.orig 2015-10-16 13:22:19 UTC
3072 +++ pr/tests/threads.c
3073 @@ -27,7 +27,7 @@ void
3075 DumbThread(void *arg)
3077 - PRInt32 tmp = (PRInt32)arg;
3078 + PRInt32 tmp = (PRInt32)(intptr_t)arg;
3079 PRThreadScope scope = (PRThreadScope)tmp;
3082 @@ -167,10 +167,10 @@ int main(int argc, char **argv)
3087 -** Tests lots of thread creations. \n\
3088 -** Create %ld native threads %ld times. \n\
3089 -** Create %ld user threads %ld times \n", iterations,count,iterations,count);
3090 + printf("** Tests lots of thread creations.\n"
3091 + "** Create %d native threads %d times.\n"
3092 + "** Create %d user threads %d times.\n", iterations, count,
3093 + iterations, count);
3096 for (index=0; index<iterations; index++) {
3097 --- pr/tests/thrpool_client.c.orig 2015-10-16 13:22:19 UTC
3098 +++ pr/tests/thrpool_client.c
3099 @@ -82,11 +82,11 @@ readn(PRFileDesc *sockfd, char *buf, int
3100 PRIntervalTime timeout = PR_INTERVAL_NO_TIMEOUT;
3102 for (rem=len; rem; offset += bytes, rem -= bytes) {
3103 - DPRINTF(("thread = 0x%lx: calling PR_Recv, bytes = %d\n",
3104 + DPRINTF(("thread = %p: calling PR_Recv, bytes = %d\n",
3105 PR_GetCurrentThread(), rem));
3106 bytes = PR_Recv(sockfd, buf + offset, rem, 0,
3108 - DPRINTF(("thread = 0x%lx: returning from PR_Recv, bytes = %d\n",
3109 + DPRINTF(("thread = %p: returning from PR_Recv, bytes = %d\n",
3110 PR_GetCurrentThread(), bytes));
3113 @@ -107,11 +107,11 @@ writen(PRFileDesc *sockfd, char *buf, in
3116 for (rem=len; rem; offset += bytes, rem -= bytes) {
3117 - DPRINTF(("thread = 0x%lx: calling PR_Send, bytes = %d\n",
3118 + DPRINTF(("thread = %p: calling PR_Send, bytes = %d\n",
3119 PR_GetCurrentThread(), rem));
3120 bytes = PR_Send(sockfd, buf + offset, rem, 0,
3121 PR_INTERVAL_NO_TIMEOUT);
3122 - DPRINTF(("thread = 0x%lx: returning from PR_Send, bytes = %d\n",
3123 + DPRINTF(("thread = %p: returning from PR_Send, bytes = %d\n",
3124 PR_GetCurrentThread(), bytes));
3127 @@ -164,7 +164,7 @@ TCP_Client(void *arg)
3129 DPRINTF(("TCP client connecting to server:%d\n", server_port));
3130 if (PR_Connect(sockfd, &netaddr,PR_INTERVAL_NO_TIMEOUT) < 0){
3131 - fprintf(stderr, "PR_Connect failed: (%ld, %ld)\n",
3132 + fprintf(stderr, "PR_Connect failed: (%d, %d)\n",
3133 PR_GetError(), PR_GetOSError());
3136 @@ -173,7 +173,7 @@ TCP_Client(void *arg)
3138 * fill in random data
3140 - memset(out_buf->data, ((PRInt32) (&netaddr)) + i + j, bytes);
3141 + memset(out_buf->data, ((intptr_t)(&netaddr)) + i + j, bytes);
3145 @@ -281,7 +281,7 @@ TCP_Socket_Client_Server_Test(void)
3146 PR_EnterMonitor(mon2);
3148 PR_ExitMonitor(mon2);
3149 - DPRINTF(("Created TCP client = 0x%lx\n", thr));
3150 + DPRINTF(("Created TCP client = %p\n", thr));
3152 /* Wait for client jobs to exit */
3153 PR_EnterMonitor(mon2);
3154 @@ -291,9 +291,9 @@ TCP_Socket_Client_Server_Test(void)
3156 PR_ExitMonitor(mon2);
3157 printf("%30s","TCP_Socket_Client_Server_Test:");
3158 - printf("%2ld Server %2ld Clients %2ld connections_per_client\n",1l,
3159 + printf(" 1 Server %2d Clients %2d connections_per_client\n",
3160 num_tcp_clients, num_tcp_connections_per_client);
3161 - printf("%30s %2ld messages_per_connection %4ld bytes_per_message\n",":",
3162 + printf("%30s %2d messages_per_connection %4d bytes_per_message\n",":",
3163 num_tcp_mesgs_per_connection, tcp_mesg_size);
3166 --- pr/tests/thrpool_server.c.orig 2015-10-16 13:22:19 UTC
3167 +++ pr/tests/thrpool_server.c
3168 @@ -329,7 +329,7 @@ TCP_Server(void *arg)
3172 - "TCP_Server: PR_BIND netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n",
3173 + "TCP_Server: PR_BIND netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n",
3174 netaddr.inet.ip, netaddr.inet.port));
3176 sp = PR_NEW(Server_Param);
3177 @@ -341,7 +341,7 @@ TCP_Server(void *arg)
3178 sp->iod.socket = sockfd;
3179 sp->iod.timeout = PR_SecondsToInterval(60);
3180 sp->datalen = tcp_mesg_size;
3181 - sp->exit_mon = sc_mon;
3182 + sp->exit_mon = NULL;
3183 sp->job_counterp = &job_counter;
3184 sp->conn_counter = 0;
3186 @@ -464,7 +464,7 @@ TCP_Server_Accept(void *arg)
3189 PR_ASSERT(NULL != jobp);
3190 - DPRINTF(("TCP_Server: Created Serve_Client = 0x%lx\n", jobp));
3191 + DPRINTF(("TCP_Server: Created Serve_Client = %p\n", jobp));
3194 * single-threaded update; no lock needed
3195 @@ -481,7 +481,7 @@ TCP_Server_Accept(void *arg)
3196 print_stats, sp, PR_FALSE);
3198 PR_ASSERT(NULL != jobp);
3199 - DPRINTF(("TCP_Server: Created print_stats timer job = 0x%lx\n", jobp));
3200 + DPRINTF(("TCP_Server: Created print_stats timer job = %p\n", jobp));
3203 PR_EnterMonitor(sp->exit_mon);
3204 @@ -498,9 +498,9 @@ exit:
3206 PR_DestroyMonitor(sp->exit_mon);
3207 printf("%30s","TCP_Socket_Client_Server_Test:");
3208 - printf("%2ld Server %2ld Clients %2ld connections_per_client\n",1l,
3209 + printf(" 1 Server %2d Clients %2d connections_per_client\n",
3210 num_tcp_clients, num_tcp_connections_per_client);
3211 - printf("%30s %2ld messages_per_connection %4ld bytes_per_message\n",":",
3212 + printf("%30s %2d messages_per_connection %4d bytes_per_message\n",":",
3213 num_tcp_mesgs_per_connection, tcp_mesg_size);
3215 DPRINTF(("%s: calling PR_ShutdownThreadPool\n", program_name));
3216 --- pr/tests/thruput.c.orig 2015-10-16 13:22:19 UTC
3217 +++ pr/tests/thruput.c
3218 @@ -66,7 +66,7 @@ static void PR_CALLBACK Clientel(void *a
3222 - PRInt32 bytes, sampled;
3223 + PRInt32 bytes, sampled = -1;
3224 PRIntervalTime now, interval;
3225 PRBool do_display = PR_FALSE;
3226 Shared *shared = (Shared*)arg;
3227 @@ -175,7 +175,7 @@ static void Client(const char *server_na
3229 static void PR_CALLBACK Servette(void *arg)
3231 - PRInt32 bytes, sampled;
3232 + PRInt32 bytes, sampled = -1;
3233 PRIntervalTime now, interval;
3234 PRBool do_display = PR_FALSE;
3235 PRFileDesc *client = (PRFileDesc*)arg;
3236 @@ -373,6 +373,7 @@ int main(int argc, char **argv)
3237 else Client(server_name);
3244 --- pr/tests/timemac.c.orig 2015-10-16 13:22:19 UTC
3245 +++ pr/tests/timemac.c
3246 @@ -24,7 +24,7 @@ static void printExplodedTime(const PREx
3249 /* Print day of the week, month, day, hour, minute, and second */
3250 - printf( "%s %s %ld %02ld:%02ld:%02ld ",
3251 + printf( "%s %s %d %02d:%02d:%02d ",
3252 dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday,
3253 et->tm_hour, et->tm_min, et->tm_sec);
3255 @@ -40,7 +40,7 @@ static void printExplodedTime(const PREx
3257 hourOffset = totalOffset / 3600;
3258 minOffset = (totalOffset % 3600) / 60;
3259 - printf("%s%02ld%02ld ", sign, hourOffset, minOffset);
3260 + printf("%s%02d%02d ", sign, hourOffset, minOffset);
3264 @@ -97,7 +97,7 @@ int main(int argc, char** argv)
3265 printf("Current local time is ");
3266 printExplodedTime(&et);
3268 - printf("GMT offset is %ld, DST offset is %ld\n",
3269 + printf("GMT offset is %d, DST offset is %d\n",
3270 et.tm_params.tp_gmt_offset, et.tm_params.tp_dst_offset);
3271 t2 = PR_ImplodeTime(&et);
3272 if (LL_NE(t1, t2)) {
3273 --- pr/tests/timetest.c.orig 2015-10-16 13:22:19 UTC
3274 +++ pr/tests/timetest.c
3275 @@ -36,7 +36,7 @@ static void PrintExplodedTime(const PREx
3278 /* Print day of the week, month, day, hour, minute, and second */
3279 - if (debug_mode) printf("%s %s %ld %02ld:%02ld:%02ld ",
3280 + if (debug_mode) printf("%s %s %d %02d:%02d:%02d ",
3281 dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday,
3282 et->tm_hour, et->tm_min, et->tm_sec);
3284 @@ -53,7 +53,7 @@ static void PrintExplodedTime(const PREx
3285 hourOffset = totalOffset / 3600;
3286 minOffset = (totalOffset % 3600) / 60;
3288 - printf("%s%02ld%02ld ", sign, hourOffset, minOffset);
3289 + printf("%s%02d%02d ", sign, hourOffset, minOffset);
3293 @@ -232,7 +232,7 @@ int main(int argc, char** argv)
3294 if (debug_mode) printf("Current local time is ");
3295 PrintExplodedTime(&et);
3296 if (debug_mode) printf("\n");
3297 - if (debug_mode) printf("GMT offset is %ld, DST offset is %ld\n",
3298 + if (debug_mode) printf("GMT offset is %d, DST offset is %d\n",
3299 et.tm_params.tp_gmt_offset, et.tm_params.tp_dst_offset);
3300 t2 = PR_ImplodeTime(&et);
3301 if (LL_NE(t1, t2)) {
3302 --- pr/tests/y2k.c.orig 2015-10-16 13:22:19 UTC
3304 @@ -43,7 +43,7 @@ static void PrintExplodedTime(const PREx
3307 /* Print day of the week, month, day, hour, minute, and second */
3308 - printf("%s %s %2ld %02ld:%02ld:%02ld ",
3309 + printf("%s %s %2d %02d:%02d:%02d ",
3310 dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday,
3311 et->tm_hour, et->tm_min, et->tm_sec);
3313 @@ -62,7 +62,7 @@ static void PrintExplodedTime(const PREx
3315 hourOffset = totalOffset / 3600;
3316 minOffset = (totalOffset % 3600) / 60;
3317 - printf("%s%02ld%02ld ", sign, hourOffset, minOffset);
3318 + printf("%s%02d%02d ", sign, hourOffset, minOffset);
3320 #ifdef PRINT_DETAILS
3321 printf("{%d, %d, %d, %d, %d, %d, %d, %d, %d, { %d, %d}}\n",et->tm_usec,
3322 --- pr/tests/y2ktmo.c.orig 2015-10-16 13:22:19 UTC
3323 +++ pr/tests/y2ktmo.c
3324 @@ -70,7 +70,7 @@ static struct _timeb start_time_tb;
3326 static void SleepThread(void *arg)
3328 - PRIntervalTime timeout = (PRIntervalTime) arg;
3329 + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg;
3330 PRIntervalTime elapsed;
3331 #if defined(XP_UNIX) || defined(WIN32)
3332 PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout);
3333 @@ -121,7 +121,7 @@ static void SleepThread(void *arg)
3335 static void AcceptThread(void *arg)
3337 - PRIntervalTime timeout = (PRIntervalTime) arg;
3338 + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg;
3339 PRIntervalTime elapsed;
3340 #if defined(XP_UNIX) || defined(WIN32)
3341 PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout);
3342 @@ -197,7 +197,7 @@ static void AcceptThread(void *arg)
3344 static void PollThread(void *arg)
3346 - PRIntervalTime timeout = (PRIntervalTime) arg;
3347 + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg;
3348 PRIntervalTime elapsed;
3349 #if defined(XP_UNIX) || defined(WIN32)
3350 PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout);
3351 @@ -276,7 +276,7 @@ static void PollThread(void *arg)
3353 static void WaitCondVarThread(void *arg)
3355 - PRIntervalTime timeout = (PRIntervalTime) arg;
3356 + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg;
3357 PRIntervalTime elapsed;
3358 #if defined(XP_UNIX) || defined(WIN32)
3359 PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout);
3360 @@ -340,7 +340,7 @@ static void WaitCondVarThread(void *arg)
3362 static void WaitMonitorThread(void *arg)
3364 - PRIntervalTime timeout = (PRIntervalTime) arg;
3365 + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg;
3366 PRIntervalTime elapsed;
3367 #if defined(XP_UNIX) || defined(WIN32)
3368 PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout);
3369 @@ -397,7 +397,7 @@ static void WaitMonitorThread(void *arg)
3371 static void WaitCMonitorThread(void *arg)
3373 - PRIntervalTime timeout = (PRIntervalTime) arg;
3374 + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg;
3375 PRIntervalTime elapsed;
3376 #if defined(XP_UNIX) || defined(WIN32)
3377 PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout);
3378 @@ -528,7 +528,7 @@ int main(int argc, char **argv)
3379 for (i = 0; i < num_thread_scopes; i++) {
3380 for (j = 0; j < num_thread_funcs; j++) {
3381 threads[idx] = PR_CreateThread(PR_USER_THREAD, threadFuncs[j],
3382 - (void*)PR_SecondsToInterval(secs), PR_PRIORITY_NORMAL,
3383 + (void*)(intptr_t)PR_SecondsToInterval(secs), PR_PRIORITY_NORMAL,
3384 threadScopes[i], PR_JOINABLE_THREAD, 0);
3385 if (threads[idx] == NULL) {
3386 fprintf(stderr, "PR_CreateThread failed\n");
3387 --- pr/tests/zerolen.c.orig 2015-10-16 13:22:19 UTC
3388 +++ pr/tests/zerolen.c
3389 @@ -45,7 +45,7 @@ static void ClientThread(void *arg)
3393 - PRUint16 port = (PRUint16) arg;
3394 + PRUint16 port = (PRUint16)(uintptr_t)arg;
3398 @@ -127,7 +127,7 @@ int main()
3399 * First test PR_Writev.
3401 clientThread = PR_CreateThread(PR_USER_THREAD,
3402 - ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)),
3403 + ClientThread, (void *)(uintptr_t)PR_ntohs(PR_NetAddrInetPort(&addr)),
3404 PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0);
3405 if (NULL == clientThread) {
3406 fprintf(stderr, "PR_CreateThread failed\n");
3407 @@ -171,7 +171,7 @@ int main()
3408 * Then test PR_Write.
3410 clientThread = PR_CreateThread(PR_USER_THREAD,
3411 - ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)),
3412 + ClientThread, (void *)(uintptr_t)PR_ntohs(PR_NetAddrInetPort(&addr)),
3413 PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0);
3414 if (NULL == clientThread) {
3415 fprintf(stderr, "PR_CreateThread failed\n");
3416 @@ -216,7 +216,7 @@ int main()
3417 * Finally test PR_Send.
3419 clientThread = PR_CreateThread(PR_USER_THREAD,
3420 - ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)),
3421 + ClientThread, (void *)(uintptr_t)PR_ntohs(PR_NetAddrInetPort(&addr)),
3422 PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0);
3423 if (NULL == clientThread) {
3424 fprintf(stderr, "PR_CreateThread failed\n");
3427 [FILE:2133:patches/patch-warnings]
3428 --- pr/include/prcountr.h.orig 2015-10-16 13:22:19 UTC
3429 +++ pr/include/prcountr.h
3430 @@ -394,7 +394,7 @@ NSPR_API(void)
3431 #define PR_GET_COUNTER(counter,handle)\
3432 (counter) = PR_GetCounter((handle))
3434 -#define PR_GET_COUNTER(counter,handle) 0
3435 +#define PR_GET_COUNTER(counter,handle)
3439 @@ -468,7 +468,7 @@ NSPR_API(void)
3440 #define PR_FIND_NEXT_COUNTER_QNAME(next,handle)\
3441 (next) = PR_FindNextCounterQname((handle))
3443 -#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) NULL
3444 +#define PR_FIND_NEXT_COUNTER_QNAME(next,handle)
3447 NSPR_API(PRCounterHandle)
3448 --- pr/src/misc/pralarm.c.orig 2015-10-16 13:22:19 UTC
3449 +++ pr/src/misc/pralarm.c
3450 @@ -101,7 +101,7 @@ static void PR_CALLBACK pr_alarmNotifier
3452 while (why != abort)
3454 - PRIntervalTime pause;
3455 + PRIntervalTime pause = 0;
3457 PR_Lock(alarm->lock);
3459 --- pr/src/misc/prdtoa.c.orig 2015-10-16 13:22:19 UTC
3460 +++ pr/src/misc/prdtoa.c
3461 @@ -2751,7 +2751,7 @@ dtoa
3462 to hold the suppressed trailing zeros.
3465 - int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1,
3466 + int bbits, b2, b5, be, dig, i, ieps, ilim = -1, ilim0, ilim1 = -1,
3467 j, j1, k, k0, k_check, leftright, m2, m5, s2, s5,
3468 spec_case, try_quick;
3470 --- pr/src/pthreads/ptio.c.orig 2015-10-16 13:22:19 UTC
3471 +++ pr/src/pthreads/ptio.c
3472 @@ -4934,6 +4934,7 @@ PR_IMPLEMENT(PRInt32) PR_Select(
3474 if (timeout == PR_INTERVAL_NO_TIMEOUT) {
3476 + start = 0; /* Not needed, but shuts down a warning */
3478 tv.tv_sec = (PRInt32)PR_IntervalToSeconds(timeout);
3479 tv.tv_usec = (PRInt32)PR_IntervalToMicroseconds(
3480 --- pr/src/pthreads/ptsynch.c.orig 2015-10-16 13:22:19 UTC
3481 +++ pr/src/pthreads/ptsynch.c
3482 @@ -30,7 +30,7 @@ static pthread_t pt_zero_tid; /* a null
3483 #endif /* defined(_PR_DCETHREADS) */
3484 #endif /* defined(DEBUG) */
3486 -#if defined(FREEBSD)
3487 +#if defined(FREEBSD) && (defined(DEBUG) || defined(FORCE_PR_ASSERT))
3489 * On older versions of FreeBSD, pthread_mutex_trylock returns EDEADLK.
3490 * Newer versions return EBUSY. We still need to support both.
3493 [FILE:1620:dragonfly/patch-nsprpub_configure]
3494 --- configure.intermediate 2015-11-29 10:31:49 UTC
3496 @@ -6661,6 +6661,27 @@ tools are selected during the Xcode/Deve
3501 + if test -z "$USE_NSPR_THREADS"; then
3504 + $as_echo "#define XP_UNIX 1" >>confdefs.h
3506 + $as_echo "#define HAVE_BSD_FLOCK 1" >>confdefs.h
3508 + $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h
3510 + CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall"
3514 + MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@'
3516 + DSO_LDOPTS='-shared -Wl,-soname -Wl,$(notdir $@)'
3517 + MDCPUCFG_H=_dragonfly.cfg
3518 + PR_MD_CSRCS=freebsd.c
3522 if test -z "$USE_NSPR_THREADS"; then
3524 @@ -8284,7 +8305,7 @@ $as_echo_n "checking whether ${CC-cc} ac
3525 if test -z "`egrep -i '(unrecognize|unknown)' conftest.out | grep pthread`" && test -z "`egrep -i '(error|incorrect)' conftest.out`" ; then
3526 ac_cv_have_dash_pthread=yes
3527 case "$target_os" in
3529 + freebsd*|dragonfly*)
3530 # Freebsd doesn't use -pthread for compiles, it uses them for linking
3533 @@ -8322,7 +8343,7 @@ $as_echo "$ac_cv_have_dash_pthreads" >&6
3538 + *-freebsd*|*-dragonfly*)
3539 $as_echo "#define _REENTRANT 1" >>confdefs.h
3541 $as_echo "#define _THREAD_SAFE 1" >>confdefs.h
3542 @@ -8410,7 +8431,7 @@ case "$target" in
3547 +*-freebsd*|*dragonfly*)
3548 if test -n "$USE_NSPR_THREADS"; then
3549 $as_echo "#define _PR_LOCAL_THREADS_ONLY 1" >>confdefs.h
3553 [FILE:6239:dragonfly/patch-nsprpub_pr_include_md___dragonfly.cfg]
3554 --- pr/include/md/_dragonfly.cfg.orig 2013-06-06 16:24:16.620788000 +0000
3555 +++ pr/include/md/_dragonfly.cfg
3557 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3558 +/* This Source Code Form is subject to the terms of the Mozilla Public
3559 + * License, v. 2.0. If a copy of the MPL was not distributed with this
3560 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
3562 +#ifndef nspr_cpucfg___
3563 +#define nspr_cpucfg___
3569 +#define PR_AF_INET6 28 /* same as AF_INET6 */
3571 +#ifndef HAVE_LONG_LONG
3572 +#define HAVE_LONG_LONG
3575 +#if defined(__i386__)
3577 +#define IS_LITTLE_ENDIAN 1
3578 +#undef IS_BIG_ENDIAN
3579 +#undef HAVE_ALIGNED_DOUBLES
3580 +#undef HAVE_ALIGNED_LONGLONGS
3582 +#define PR_BYTES_PER_BYTE 1
3583 +#define PR_BYTES_PER_SHORT 2
3584 +#define PR_BYTES_PER_INT 4
3585 +#define PR_BYTES_PER_INT64 8
3586 +#define PR_BYTES_PER_LONG 4
3587 +#define PR_BYTES_PER_FLOAT 4
3588 +#define PR_BYTES_PER_DOUBLE 8
3589 +#define PR_BYTES_PER_WORD 4
3590 +#define PR_BYTES_PER_DWORD 8
3591 +#define PR_BYTES_PER_WORD_LOG2 2
3592 +#define PR_BYTES_PER_DWORD_LOG2 3
3594 +#define PR_BITS_PER_BYTE 8
3595 +#define PR_BITS_PER_SHORT 16
3596 +#define PR_BITS_PER_INT 32
3597 +#define PR_BITS_PER_INT64 64
3598 +#define PR_BITS_PER_LONG 32
3599 +#define PR_BITS_PER_FLOAT 32
3600 +#define PR_BITS_PER_DOUBLE 64
3601 +#define PR_BITS_PER_WORD 32
3603 +#define PR_BITS_PER_BYTE_LOG2 3
3604 +#define PR_BITS_PER_SHORT_LOG2 4
3605 +#define PR_BITS_PER_INT_LOG2 5
3606 +#define PR_BITS_PER_INT64_LOG2 6
3607 +#define PR_BITS_PER_LONG_LOG2 5
3608 +#define PR_BITS_PER_FLOAT_LOG2 5
3609 +#define PR_BITS_PER_DOUBLE_LOG2 6
3610 +#define PR_BITS_PER_WORD_LOG2 5
3612 +#define PR_ALIGN_OF_SHORT 2
3613 +#define PR_ALIGN_OF_INT 4
3614 +#define PR_ALIGN_OF_LONG 4
3615 +#define PR_ALIGN_OF_INT64 4
3616 +#define PR_ALIGN_OF_FLOAT 4
3617 +#define PR_ALIGN_OF_DOUBLE 4
3618 +#define PR_ALIGN_OF_POINTER 4
3620 +#elif defined(__alpha__)
3622 +#define IS_LITTLE_ENDIAN 1
3623 +#undef IS_BIG_ENDIAN
3624 +#define HAVE_ALIGNED_DOUBLES
3625 +#define HAVE_ALIGNED_LONGLONGS
3628 +#define PR_BYTES_PER_BYTE 1
3629 +#define PR_BYTES_PER_SHORT 2
3630 +#define PR_BYTES_PER_INT 4
3631 +#define PR_BYTES_PER_INT64 8
3632 +#define PR_BYTES_PER_LONG 8
3633 +#define PR_BYTES_PER_FLOAT 4
3634 +#define PR_BYTES_PER_DOUBLE 8
3635 +#define PR_BYTES_PER_WORD 8
3636 +#define PR_BYTES_PER_DWORD 8
3637 +#define PR_BYTES_PER_WORD_LOG2 3
3638 +#define PR_BYTES_PER_DWORD_LOG2 3
3640 +#define PR_BITS_PER_BYTE 8
3641 +#define PR_BITS_PER_SHORT 16
3642 +#define PR_BITS_PER_INT 32
3643 +#define PR_BITS_PER_INT64 64
3644 +#define PR_BITS_PER_LONG 64
3645 +#define PR_BITS_PER_FLOAT 32
3646 +#define PR_BITS_PER_DOUBLE 64
3647 +#define PR_BITS_PER_WORD 64
3649 +#define PR_BITS_PER_BYTE_LOG2 3
3650 +#define PR_BITS_PER_SHORT_LOG2 4
3651 +#define PR_BITS_PER_INT_LOG2 5
3652 +#define PR_BITS_PER_INT64_LOG2 6
3653 +#define PR_BITS_PER_LONG_LOG2 6
3654 +#define PR_BITS_PER_FLOAT_LOG2 5
3655 +#define PR_BITS_PER_DOUBLE_LOG2 6
3656 +#define PR_BITS_PER_WORD_LOG2 6
3658 +#define PR_ALIGN_OF_SHORT 2
3659 +#define PR_ALIGN_OF_INT 4
3660 +#define PR_ALIGN_OF_LONG 8
3661 +#define PR_ALIGN_OF_INT64 8
3662 +#define PR_ALIGN_OF_FLOAT 4
3663 +#define PR_ALIGN_OF_DOUBLE 8
3664 +#define PR_ALIGN_OF_POINTER 8
3666 +#elif defined(__amd64__)
3668 +#define IS_LITTLE_ENDIAN 1
3669 +#undef IS_BIG_ENDIAN
3670 +#define HAVE_ALIGNED_DOUBLES
3671 +#define HAVE_ALIGNED_LONGLONGS
3674 +#define PR_BYTES_PER_BYTE 1
3675 +#define PR_BYTES_PER_SHORT 2
3676 +#define PR_BYTES_PER_INT 4
3677 +#define PR_BYTES_PER_INT64 8
3678 +#define PR_BYTES_PER_LONG 8
3679 +#define PR_BYTES_PER_FLOAT 4
3680 +#define PR_BYTES_PER_DOUBLE 8
3681 +#define PR_BYTES_PER_WORD 8
3682 +#define PR_BYTES_PER_DWORD 8
3683 +#define PR_BYTES_PER_WORD_LOG2 3
3684 +#define PR_BYTES_PER_DWORD_LOG2 3
3686 +#define PR_BITS_PER_BYTE 8
3687 +#define PR_BITS_PER_SHORT 16
3688 +#define PR_BITS_PER_INT 32
3689 +#define PR_BITS_PER_INT64 64
3690 +#define PR_BITS_PER_LONG 64
3691 +#define PR_BITS_PER_FLOAT 32
3692 +#define PR_BITS_PER_DOUBLE 64
3693 +#define PR_BITS_PER_WORD 64
3695 +#define PR_BITS_PER_BYTE_LOG2 3
3696 +#define PR_BITS_PER_SHORT_LOG2 4
3697 +#define PR_BITS_PER_INT_LOG2 5
3698 +#define PR_BITS_PER_INT64_LOG2 6
3699 +#define PR_BITS_PER_LONG_LOG2 6
3700 +#define PR_BITS_PER_FLOAT_LOG2 5
3701 +#define PR_BITS_PER_DOUBLE_LOG2 6
3702 +#define PR_BITS_PER_WORD_LOG2 6
3704 +#define PR_ALIGN_OF_SHORT 2
3705 +#define PR_ALIGN_OF_INT 4
3706 +#define PR_ALIGN_OF_LONG 8
3707 +#define PR_ALIGN_OF_INT64 8
3708 +#define PR_ALIGN_OF_FLOAT 4
3709 +#define PR_ALIGN_OF_DOUBLE 8
3710 +#define PR_ALIGN_OF_POINTER 8
3711 +#define PR_ALIGN_OF_WORD 8
3715 +#error "Unknown CPU architecture"
3719 +#ifndef NO_NSPR_10_SUPPORT
3721 +#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
3722 +#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
3723 +#define BYTES_PER_INT PR_BYTES_PER_INT
3724 +#define BYTES_PER_INT64 PR_BYTES_PER_INT64
3725 +#define BYTES_PER_LONG PR_BYTES_PER_LONG
3726 +#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
3727 +#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
3728 +#define BYTES_PER_WORD PR_BYTES_PER_WORD
3729 +#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
3731 +#define BITS_PER_BYTE PR_BITS_PER_BYTE
3732 +#define BITS_PER_SHORT PR_BITS_PER_SHORT
3733 +#define BITS_PER_INT PR_BITS_PER_INT
3734 +#define BITS_PER_INT64 PR_BITS_PER_INT64
3735 +#define BITS_PER_LONG PR_BITS_PER_LONG
3736 +#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
3737 +#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
3738 +#define BITS_PER_WORD PR_BITS_PER_WORD
3740 +#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
3741 +#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
3742 +#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
3743 +#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
3744 +#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
3745 +#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
3746 +#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
3747 +#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
3749 +#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
3750 +#define ALIGN_OF_INT PR_ALIGN_OF_INT
3751 +#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
3752 +#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
3753 +#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
3754 +#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
3755 +#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
3756 +#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
3758 +#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
3759 +#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
3760 +#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
3762 +#endif /* NO_NSPR_10_SUPPORT */
3764 +#endif /* nspr_cpucfg___ */
3767 [FILE:6235:dragonfly/patch-nsprpub_pr_include_md___dragonfly.h]
3768 --- pr/include/md/_dragonfly.h.orig 2013-06-06 18:49:02.829118000 +0000
3769 +++ pr/include/md/_dragonfly.h
3771 +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
3772 +/* This Source Code Form is subject to the terms of the Mozilla Public
3773 + * License, v. 2.0. If a copy of the MPL was not distributed with this
3774 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
3776 +#ifndef nspr_dragonfly_defs_h___
3777 +#define nspr_dragonfly_defs_h___
3779 +#include "prthread.h"
3782 +#if __FreeBSD__ >= 2
3783 +#include <osreldate.h> /* for __FreeBSD_version */
3785 +#include <sys/syscall.h>
3788 +#define PR_LINKER_ARCH "dragonfly"
3789 +#define _PR_SI_SYSNAME "DRAGONFLY"
3790 +#if defined(__i386__)
3791 +#define _PR_SI_ARCHITECTURE "x86"
3792 +#elif defined(__amd64__)
3793 +#define _PR_SI_ARCHITECTURE "amd64"
3795 +#error "Unknown CPU architecture"
3798 +#define PR_DLL_SUFFIX ".so"
3800 +#define _PR_VMBASE 0x30000000
3801 +#define _PR_STACK_VMBASE 0x50000000
3802 +#define _MD_DEFAULT_STACK_SIZE 65536L
3803 +#define _MD_MMAP_FLAGS MAP_PRIVATE
3805 +#undef HAVE_STACK_GROWING_UP
3808 +#define _PR_HAVE_SOCKADDR_LEN
3809 +#define _PR_STAT_HAS_ST_ATIMESPEC
3810 +#define _PR_HAVE_LARGE_OFF_T
3812 +#define _PR_HAVE_GETPROTO_R
3813 +#define _PR_HAVE_5_ARG_GETPROTO_R
3814 +#define _PR_HAVE_GETHOST_R
3815 +#define _PR_HAVE_GETHOST_R_INT
3817 +#define _PR_POLL_AVAILABLE
3819 +#define _PR_HAVE_SYSV_SEMAPHORES
3820 +#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
3823 +#define _PR_HAVE_INET_NTOP
3824 +#define _PR_HAVE_GETHOSTBYNAME2
3825 +#define _PR_HAVE_GETADDRINFO
3826 +#define _PR_INET6_PROBE
3827 +#define _PR_IPV6_V6ONLY_PROBE
3831 +#ifndef _PR_PTHREADS
3832 +#include <setjmp.h>
3834 +#define PR_CONTEXT_TYPE sigjmp_buf
3836 +#define CONTEXT(_th) ((_th)->md.context)
3838 +#define _MD_GET_SP(_th) (_th)->md.context[0]._sjb[2]
3839 +#define PR_NUM_GCREGS _JBLEN
3842 +** Initialize a thread context to run "_main()" when started
3844 +#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
3846 + *status = PR_TRUE; \
3847 + if (sigsetjmp(CONTEXT(_thread), 1)) { \
3850 + _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 64); \
3853 +#define _MD_SWITCH_CONTEXT(_thread) \
3854 + if (!sigsetjmp(CONTEXT(_thread), 1)) { \
3855 + (_thread)->md.errcode = errno; \
3860 +** Restore a thread context, saved by _MD_SWITCH_CONTEXT
3862 +#define _MD_RESTORE_CONTEXT(_thread) \
3864 + errno = (_thread)->md.errcode; \
3865 + _MD_SET_CURRENT_THREAD(_thread); \
3866 + siglongjmp(CONTEXT(_thread), 1); \
3869 +/* Machine-dependent (MD) data structures */
3872 + PR_CONTEXT_TYPE context;
3877 +struct _MDThreadStack {
3885 +struct _MDSemaphore {
3893 +struct _MDSegment {
3898 + * md-specific cpu structure field
3900 +#define _PR_MD_MAX_OSFD FD_SETSIZE
3902 +struct _MDCPU_Unix {
3904 + PRUint32 ioq_timeout;
3905 + PRInt32 ioq_max_osfd;
3906 + PRInt32 ioq_osfd_cnt;
3907 +#ifndef _PR_USE_POLL
3908 + fd_set fd_read_set, fd_write_set, fd_exception_set;
3909 + PRInt16 fd_read_cnt[_PR_MD_MAX_OSFD],fd_write_cnt[_PR_MD_MAX_OSFD],
3910 + fd_exception_cnt[_PR_MD_MAX_OSFD];
3912 + struct pollfd *ioq_pollfds;
3913 + int ioq_pollfds_size;
3914 +#endif /* _PR_USE_POLL */
3917 +#define _PR_IOQ(_cpu) ((_cpu)->md.md_unix.ioQ)
3918 +#define _PR_ADD_TO_IOQ(_pq, _cpu) PR_APPEND_LINK(&_pq.links, &_PR_IOQ(_cpu))
3919 +#define _PR_FD_READ_SET(_cpu) ((_cpu)->md.md_unix.fd_read_set)
3920 +#define _PR_FD_READ_CNT(_cpu) ((_cpu)->md.md_unix.fd_read_cnt)
3921 +#define _PR_FD_WRITE_SET(_cpu) ((_cpu)->md.md_unix.fd_write_set)
3922 +#define _PR_FD_WRITE_CNT(_cpu) ((_cpu)->md.md_unix.fd_write_cnt)
3923 +#define _PR_FD_EXCEPTION_SET(_cpu) ((_cpu)->md.md_unix.fd_exception_set)
3924 +#define _PR_FD_EXCEPTION_CNT(_cpu) ((_cpu)->md.md_unix.fd_exception_cnt)
3925 +#define _PR_IOQ_TIMEOUT(_cpu) ((_cpu)->md.md_unix.ioq_timeout)
3926 +#define _PR_IOQ_MAX_OSFD(_cpu) ((_cpu)->md.md_unix.ioq_max_osfd)
3927 +#define _PR_IOQ_OSFD_CNT(_cpu) ((_cpu)->md.md_unix.ioq_osfd_cnt)
3928 +#define _PR_IOQ_POLLFDS(_cpu) ((_cpu)->md.md_unix.ioq_pollfds)
3929 +#define _PR_IOQ_POLLFDS_SIZE(_cpu) ((_cpu)->md.md_unix.ioq_pollfds_size)
3931 +#define _PR_IOQ_MIN_POLLFDS_SIZE(_cpu) 32
3934 + struct _MDCPU_Unix md_unix;
3937 +#define _MD_INIT_LOCKS()
3938 +#define _MD_NEW_LOCK(lock) PR_SUCCESS
3939 +#define _MD_FREE_LOCK(lock)
3940 +#define _MD_LOCK(lock)
3941 +#define _MD_UNLOCK(lock)
3942 +#define _MD_INIT_IO()
3943 +#define _MD_IOQ_LOCK()
3944 +#define _MD_IOQ_UNLOCK()
3946 +extern PRStatus _MD_InitializeThread(PRThread *thread);
3948 +#define _MD_INIT_RUNNING_CPU(cpu) _MD_unix_init_running_cpu(cpu)
3949 +#define _MD_INIT_THREAD _MD_InitializeThread
3950 +#define _MD_EXIT_THREAD(thread)
3951 +#define _MD_SUSPEND_THREAD(thread) _MD_suspend_thread
3952 +#define _MD_RESUME_THREAD(thread) _MD_resume_thread
3953 +#define _MD_CLEAN_THREAD(_thread)
3955 +extern PRStatus _MD_CREATE_THREAD(
3957 + void (*start) (void *),
3958 + PRThreadPriority priority,
3959 + PRThreadScope scope,
3960 + PRThreadState state,
3961 + PRUint32 stackSize);
3962 +extern void _MD_SET_PRIORITY(struct _MDThread *thread, PRUintn newPri);
3963 +extern PRStatus _MD_WAIT(PRThread *, PRIntervalTime timeout);
3964 +extern PRStatus _MD_WAKEUP_WAITER(PRThread *);
3965 +extern void _MD_YIELD(void);
3967 +#endif /* ! _PR_PTHREADS */
3969 +extern void _MD_EarlyInit(void);
3971 +#define _MD_EARLY_INIT _MD_EarlyInit
3972 +#define _MD_FINAL_INIT _PR_UnixInit
3973 +#define _MD_INTERVAL_USE_GTOD
3976 + * We wrapped the select() call. _MD_SELECT refers to the built-in,
3977 + * unwrapped version.
3979 +#define _MD_SELECT(nfds,r,w,e,tv) syscall(SYS_select,nfds,r,w,e,tv)
3981 +#if defined(_PR_POLL_AVAILABLE)
3983 +#define _MD_POLL(fds,nfds,timeout) syscall(SYS_poll,fds,nfds,timeout)
3986 +/* freebsd has INADDR_LOOPBACK defined, but in /usr/include/rpc/types.h, and I didn't
3987 + want to be including that.. */
3988 +#ifndef INADDR_LOOPBACK
3989 +#define INADDR_LOOPBACK (u_long)0x7F000001
3993 +#include <sys/uio.h>
3995 +#endif /* nspr_freebsd_defs_h___ */
3998 [FILE:895:dragonfly/patch-nsprpub_pr_include_md__freebsd.h]
3999 --- pr/include/md/_freebsd.h.intermediate 2014-06-20 12:34:59.566379000 +0000
4000 +++ pr/include/md/_freebsd.h
4002 #define _PR_HAVE_GETHOST_R
4003 #define _PR_HAVE_GETHOST_R_INT
4005 -#if __FreeBSD_version >= 400008
4006 +#if defined(__DragonFly__) || __FreeBSD_version >= 400008
4008 * libc_r before this version of FreeBSD doesn't have poll().
4009 * Although libc has poll(), it is not thread-safe so we can't
4011 #define _PR_POLL_AVAILABLE
4014 -#if __FreeBSD_version >= 300000
4015 +#if defined(__DragonFly__) || __FreeBSD_version >= 300000
4016 #define _PR_POLL_AVAILABLE
4017 #define _PR_USE_POLL
4020 #define _PR_HAVE_SYSV_SEMAPHORES
4021 #define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
4023 -#if __FreeBSD_version >= 400014
4024 +#if defined(__DragonFly__) || __FreeBSD_version >= 400014
4026 #define _PR_HAVE_INET_NTOP
4027 #define _PR_HAVE_GETHOSTBYNAME2
4030 [FILE:1399:dragonfly/patch-nsprpub_pr_include_md__pth.h]
4031 --- pr/include/md/_pth.h.orig 2014-06-05 21:42:08.000000000 +0000
4032 +++ pr/include/md/_pth.h
4034 #define _PT_PTHREAD_COPY_THR_HANDLE(st, dt) (dt) = (st)
4035 #elif defined(IRIX) || defined(OSF1) || defined(AIX) || defined(SOLARIS) \
4036 || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
4037 - || defined(HPUX) || defined(FREEBSD) \
4038 + || defined(HPUX) || defined(FREEBSD) || defined(__DragonFly__) \
4039 || defined(NETBSD) || defined(OPENBSD) || defined(BSDI) \
4040 || defined(NTO) || defined(DARWIN) \
4041 || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN)
4043 #endif /* defined(_PR_DCETHREADS) */
4045 #elif defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
4046 - || defined(FREEBSD) || defined(SYMBIAN)
4047 + || defined(FREEBSD) || defined(SYMBIAN) || defined(__DragonFly__)
4048 #define PT_PRIO_MIN sched_get_priority_min(SCHED_OTHER)
4049 #define PT_PRIO_MAX sched_get_priority_max(SCHED_OTHER)
4051 @@ -260,6 +260,7 @@ extern int (*_PT_aix_yield_fcn)();
4052 #elif defined(HPUX) || defined(SOLARIS) \
4053 || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
4054 || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
4055 + || defined(__DragonFly__) \
4056 || defined(BSDI) || defined(NTO) || defined(DARWIN) \
4057 || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN)
4058 #define _PT_PTHREAD_YIELD() sched_yield()
4061 [FILE:291:dragonfly/patch-nsprpub_pr_include_md_prosdep.h]
4062 --- pr/include/md/prosdep.h.orig 2014-06-05 21:42:08.000000000 +0000
4063 +++ pr/include/md/prosdep.h
4064 @@ -43,6 +43,9 @@ PR_BEGIN_EXTERN_C
4065 #elif defined(OPENBSD)
4066 #include "md/_openbsd.h"
4068 +#elif defined(__DragonFly__)
4069 +#include "md/_dragonfly.h"
4072 #include "md/_bsdi.h"
4076 [FILE:494:dragonfly/patch-nsprpub_pr_src_md_unix_uxrng.c]
4077 --- pr/src/md/unix/uxrng.c.orig 2014-06-05 21:42:08.000000000 +0000
4078 +++ pr/src/md/unix/uxrng.c
4079 @@ -86,7 +86,7 @@ GetHighResClock(void *buf, size_t maxbyt
4081 #elif (defined(LINUX) || defined(FREEBSD) || defined(__FreeBSD_kernel__) \
4082 || defined(NETBSD) || defined(__NetBSD_kernel__) || defined(OPENBSD) \
4083 - || defined(SYMBIAN) || defined(__GNU__))
4084 + || defined(SYMBIAN) || defined(__GNU__)) || defined(__DragonFly__)
4085 #include <sys/types.h>
4086 #include <sys/stat.h>
4090 [FILE:723:dragonfly/patch-nsprpub_pr_src_misc_prnetdb.c]
4091 --- pr/src/misc/prnetdb.c.orig 2014-06-20 12:34:59.566379000 +0000
4092 +++ pr/src/misc/prnetdb.c
4093 @@ -78,6 +78,11 @@ PRLock *_pr_dnsLock = NULL;
4094 #define _PR_HAVE_GETPROTO_R_INT
4097 +#if defined(DRAGONFLY)
4098 +#define _PR_HAVE_GETPROTO_R
4099 +#define _PR_HAVE_5_ARG_GETPROTO_R
4102 /* BeOS has glibc but not the glibc-style getprotobyxxx_r functions. */
4103 #if (defined(__GLIBC__) && __GLIBC__ >= 2 && !defined(XP_BEOS))
4104 #define _PR_HAVE_GETPROTO_R
4105 @@ -295,7 +300,7 @@ _pr_QueryNetIfs(void)
4108 #elif (defined(DARWIN) && defined(HAVE_GETIFADDRS)) || defined(FREEBSD) \
4109 - || defined(NETBSD) || defined(OPENBSD)
4110 + || defined(NETBSD) || defined(OPENBSD) || defined(DRAGONFLY)
4113 * Use the BSD getifaddrs function.
4116 [FILE:1005:dragonfly/patch-nsprpub_pr_src_pthreads_ptio.c]
4117 --- pr/src/pthreads/ptio.c.orig 2014-06-20 12:34:59.616376000 +0000
4118 +++ pr/src/pthreads/ptio.c
4119 @@ -180,7 +180,8 @@ static PRBool _pr_ipv6_v6only_on_by_defa
4120 || defined(LINUX) || defined(__GNU__) || defined(__GLIBC__) \
4121 || defined(FREEBSD) || defined(NETBSD) || defined(OPENBSD) \
4122 || defined(BSDI) || defined(NTO) || defined(DARWIN) \
4123 - || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN)
4124 + || defined(UNIXWARE) || defined(RISCOS) || defined(SYMBIAN) \
4125 + || defined(__DragonFly__)
4126 #define _PRSelectFdSetArg_t fd_set *
4128 #error "Cannot determine architecture"
4129 @@ -3256,7 +3257,7 @@ static PRIOMethods _pr_socketpollfd_meth
4130 || defined(AIX) || defined(FREEBSD) || defined(NETBSD) \
4131 || defined(OPENBSD) || defined(BSDI) || defined(NTO) \
4132 || defined(DARWIN) || defined(UNIXWARE) || defined(RISCOS) \
4133 - || defined(SYMBIAN)
4134 + || defined(SYMBIAN) || defined(__DragonFly__)
4135 #define _PR_FCNTL_FLAGS O_NONBLOCK
4137 #error "Can't determine architecture"
4140 [FILE:533:dragonfly/patch-nsprpub_pr_src_pthreads_ptsynch.c]
4141 --- pr/src/pthreads/ptsynch.c.orig 2014-06-20 12:34:59.616376000 +0000
4142 +++ pr/src/pthreads/ptsynch.c
4143 @@ -919,7 +919,7 @@ PR_IMPLEMENT(PRStatus) PR_DeleteSemaphor
4145 #if (defined(__GNU_LIBRARY__) && !defined(_SEM_SEMUN_UNDEFINED)) \
4146 || defined(FREEBSD) || defined(OPENBSD) || defined(BSDI) \
4147 - || defined(DARWIN) || defined(SYMBIAN)
4148 + || defined(DARWIN) || defined(SYMBIAN) || defined(__DragonFly__)
4149 /* union semun is defined by including <sys/sem.h> */
4151 /* according to X/OPEN we have to define it ourselves */
4154 [FILE:700:dragonfly/patch-pr_tests_Makefile.in]
4155 --- pr/tests/Makefile.in.intermediate 2016-01-08 16:56:54.000000000 +0200
4156 +++ pr/tests/Makefile.in
4157 @@ -342,6 +342,12 @@ ifeq ($(OS_ARCH), UNIXWARE)
4158 export LD_RUN_PATH = $(ABSOLUTE_LIB_DIR)
4161 +ifeq ($(OS_ARCH),DragonFly)
4162 +ifeq ($(USE_PTHREADS),1)
4167 ifeq ($(OS_ARCH),FreeBSD)
4168 ifeq ($(USE_PTHREADS),1)
4170 @@ -370,7 +376,7 @@ LIBPTHREAD = -lpthread
4171 ifeq ($(OS_ARCH),AIX)
4172 LIBPTHREAD = -lpthreads
4174 -ifeq (,$(filter-out FreeBSD OpenBSD BSD_OS QNX Darwin OpenUNIX,$(OS_ARCH)))
4175 +ifeq (,$(filter-out DragonFly FreeBSD OpenBSD BSD_OS QNX Darwin OpenUNIX,$(OS_ARCH)))
4178 ifeq ($(OS_ARCH)$(basename $(OS_RELEASE)),HP-UXB.10)