Index: head/Mk/bsd.gecko.mk =================================================================== --- head/Mk/bsd.gecko.mk (revision 402127) +++ head/Mk/bsd.gecko.mk (revision 402128) @@ -1,627 +1,627 @@ #-*- tab-width: 4; -*- # ex:ts=4 # # Date created: 12 Nov 2005 # Whom: Michael Johnson # # $FreeBSD$ # # 4 column tabs prevent hair loss and tooth decay! # bsd.gecko.mk abstracts the selection of gecko-based backends. It allows users # and porters to support any available gecko backend without needing to build # many conditional tests. ${USE_GECKO} is the list of backends that your port # can handle, and ${GECKO} is set by bsd.gecko.mk to be the chosen backend. # Users set ${WITH_GECKO} to the list of gecko backends they want on their # system. .if defined(USE_GECKO) .if !defined(_POSTMKINCLUDED) && !defined(Gecko_Pre_Include) Gecko_Pre_Include= bsd.gecko.mk # This file contains some reusable components for mozilla ports. It's of # use primarily to apps from the mozilla project itself (such as Firefox, # Thunderbird, etc.), and probably won't be of use for gecko-based ports # like epiphany, galeon, etc. # # You need to make sure to add USE_GECKO=gecko to for your port can uses # one of these options below. # # Ports can use the following: # # USE_MOZILLA By default, it enables every system dependency # listed in '_ALL_DEPENDS'. If your port doesn't # need one of those then you can use '-' like # 'USE_MOZILLA= -png -vpx' to subtract the # dependencies. Experimental deps use '+' like # 'USE_MOZILLA= +speex +theora'. # # MOZILLA_PLIST_DIRS List of directories to descend into when installing # and creating the plist # # MOZ_PIS_SCRIPTS List of scripts residing in ${FILESDIR} to be # filtered through MOZCONFIG_SED and installed along # with our Pluggable Init Scripts (PIS) # # MOZ_SED_ARGS sed(1) commands through which MOZ_PIS_SCRIPTS are # filtered. There is a default set defined here, so # you probably want to add to MOZ_SED_ARGS rather # than clobber it # # MOZ_OPTIONS configure arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # CONFIGURE_ARGS+=${MOZ_OPTIONS} # # MOZ_MK_OPTIONS The make(1) arguments (added to .mozconfig). If # NOMOZCONFIG is defined, you probably want to set # MAKE_ARGS+=${MOZ_MK_OPTIONS} # # MOZ_EXPORT Environment variables for the build process (added # to .mozconfig). If NOMOZCONFIG is defined, you # probably want to set MAKE_ENV+=${MOZ_EXPORT} # # MOZ_CHROME A variable for the --enable-chrome-format= in # CONFIGURE_ARGS. The default is omni. # # MOZ_TOOLKIT A variable for the --enable-default-toolkit= in # CONFIGURE_ARGS. The default is cairo-gtk2. # # MOZ_EXTENSIONS A list of extensions to build # # MOZ_PROTOCOLS A list of protocols to build (http, ftp, etc.) # # PORT_MOZCONFIG Defaults to ${FILESDIR}/mozconfig.in, but can be # set to a generic mozconfig included with the port # # NOMOZCONFIG Don't drop a customized .mozconfig into the build # directory. Options will have to be specified in # CONFIGURE_ARGS instead # MAINTAINER?= gecko@FreeBSD.org MOZILLA?= ${PORTNAME} MOZILLA_VER?= ${PORTVERSION} MOZILLA_BIN?= ${PORTNAME}-bin MOZILLA_EXEC_NAME?=${MOZILLA} MOZ_RPATH?= ${MOZILLA} USES+= cpe compiler:c++11-lang gmake iconv perl5 pkgconfig \ python:2.7,build desktop-file-utils CPE_VENDOR?=mozilla USE_PERL5= build USE_XORG= xext xrender xt .if ${MOZILLA} != "libxul" BUNDLE_LIBS= yes .endif MOZILLA_SUFX?= none MOZSRC?= ${WRKSRC} WRKSRC?= ${WRKDIR}/mozilla PLISTF?= ${WRKDIR}/plist_files MOZ_OBJDIR?= ${WRKSRC}/obj-${CONFIGURE_TARGET} MOZ_PIS_DIR?= lib/${MOZILLA}/init.d PORT_MOZCONFIG?= ${FILESDIR}/mozconfig.in MOZCONFIG?= ${WRKSRC}/.mozconfig # XXX Not ?= because fmake uses MAKEFILE internally MAKEFILE= ${WRKSRC}/client.mk MOZILLA_PLIST_DIRS?= bin lib share/pixmaps share/applications PKGINSTALL?= ${WRKDIR}/pkg-install PKGDEINSTALL?= ${WRKDIR}/pkg-deinstall PKGINSTALL_INC?= ${.CURDIR}/../../www/firefox/files/pkg-install.in PKGDEINSTALL_INC?= ${.CURDIR}/../../www/firefox/files/pkg-deinstall.in MOZ_PKGCONFIG_FILES?= ${MOZILLA}-gtkmozembed ${MOZILLA}-js \ ${MOZILLA}-xpcom ${MOZILLA}-plugin ALL_TARGET?= build CONFIGURE_TARGET:=${ARCH:C/amd64/x86_64/}-portbld-${OPSYS:tl}${OSREL} MOZ_EXPORT+= ${CONFIGURE_ENV} \ PERL="${PERL}" MOZ_OPTIONS+= ${CONFIGURE_TARGET} --prefix="${PREFIX}" MOZ_MK_OPTIONS+=MOZ_OBJDIR="${MOZ_OBJDIR}" CPPFLAGS+= -isystem${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib -Wl,-rpath,${PREFIX}/lib/${MOZILLA} .if ${OPSYS} != DragonFly # XXX xpcshell crash during install # use jemalloc 3.0.0 API for stats/tuning MOZ_EXPORT+= MOZ_JEMALLOC3=1 .if ${OPSYS} == FreeBSD && ${OSVERSION} >= 1100079 . if ${MOZILLA_VER:R:R} < 43 # system jemalloc 4.0.0 vs. bundled jemalloc 3.6.0-204-gb4acf73 EXTRA_PATCHES+= ${FILESDIR}/extra-patch-bug1125514 . endif .elif ${OPSYS} != FreeBSD || ${OSVERSION} < 1000012 || ${MOZILLA_VER:R:R} >= 37 MOZ_OPTIONS+= --enable-jemalloc .endif .endif # !DragonFly # Standard depends _ALL_DEPENDS= cairo event ffi graphite harfbuzz hunspell icu jpeg nspr nss opus png pixman soundtouch sqlite vpx .if ${PORT_OPTIONS:MINTEGER_SAMPLES} MOZ_EXPORT+= MOZ_INTEGER_SAMPLES=1 _ALL_DEPENDS+= tremor .else _ALL_DEPENDS+= vorbis .endif .if ! ${PORT_OPTIONS:MBUNDLED_CAIRO} cairo_LIB_DEPENDS= libcairo.so:${PORTSDIR}/graphics/cairo cairo_MOZ_OPTIONS= --enable-system-cairo .endif event_LIB_DEPENDS= libevent.so:${PORTSDIR}/devel/libevent2 event_MOZ_OPTIONS= --with-system-libevent ffi_LIB_DEPENDS= libffi.so:${PORTSDIR}/devel/libffi ffi_MOZ_OPTIONS= --enable-system-ffi .if exists(${FILESDIR}/patch-bug847568) graphite_LIB_DEPENDS= libgraphite2.so:${PORTSDIR}/graphics/graphite2 graphite_MOZ_OPTIONS= --with-system-graphite2 harfbuzz_LIB_DEPENDS= libharfbuzz.so:${PORTSDIR}/print/harfbuzz harfbuzz_MOZ_OPTIONS= --with-system-harfbuzz .endif hunspell_LIB_DEPENDS= libhunspell-1.3.so:${PORTSDIR}/textproc/hunspell hunspell_MOZ_OPTIONS= --enable-system-hunspell icu_LIB_DEPENDS= libicui18n.so:${PORTSDIR}/devel/icu icu_MOZ_OPTIONS= --with-system-icu --with-intl-api -jpeg_BUILD_DEPENDS=yasm:${PORTSDIR}/devel/yasm # XXX JCS_EXTENSIONS API is currently disabled by r371283 # XXX Remove files/patch-ijg-libjpeg once -turbo is default jpeg_USES= jpeg jpeg_MOZ_OPTIONS= --with-system-jpeg=${LOCALBASE} nspr_LIB_DEPENDS= libnspr4.so:${PORTSDIR}/devel/nspr nspr_MOZ_OPTIONS= --with-system-nspr nss_LIB_DEPENDS= libnss3.so:${PORTSDIR}/security/nss nss_MOZ_OPTIONS= --with-system-nss .if exists(${FILESDIR}/patch-z-bug517422) opus_LIB_DEPENDS= libopus.so:${PORTSDIR}/audio/opus opus_MOZ_OPTIONS= --with-system-opus .endif pixman_LIB_DEPENDS= libpixman-1.so:${PORTSDIR}/x11/pixman pixman_MOZ_OPTIONS= --enable-system-pixman png_LIB_DEPENDS= libpng.so:${PORTSDIR}/graphics/png png_MOZ_OPTIONS= --with-system-png=${LOCALBASE} .if exists(${FILESDIR}/patch-z-bug517422) soundtouch_LIB_DEPENDS= libSoundTouch.so:${PORTSDIR}/audio/soundtouch soundtouch_MOZ_OPTIONS= --with-system-soundtouch # XXX disabled: bug 913854 not yet upstreamed speex_LIB_DEPENDS= libspeexdsp.so:${PORTSDIR}/audio/speex speex_MOZ_OPTIONS= --with-system-speex .endif sqlite_LIB_DEPENDS= libsqlite3.so:${PORTSDIR}/databases/sqlite3 sqlite_MOZ_OPTIONS= --enable-system-sqlite .if exists(${FILESDIR}/patch-z-bug517422) # XXX disabled: update to 1.2.x or review backported fixes theora_LIB_DEPENDS= libtheora.so:${PORTSDIR}/multimedia/libtheora theora_MOZ_OPTIONS= --with-system-theora tremor_LIB_DEPENDS= libvorbisidec.so:${PORTSDIR}/audio/libtremor tremor_MOZ_OPTIONS= --with-system-tremor --with-system-ogg vorbis_LIB_DEPENDS= libvorbis.so:${PORTSDIR}/audio/libvorbis vorbis_MOZ_OPTIONS= --with-system-vorbis --with-system-ogg .endif -vpx_BUILD_DEPENDS= yasm:${PORTSDIR}/devel/yasm vpx_LIB_DEPENDS= libvpx.so:${PORTSDIR}/multimedia/libvpx vpx_MOZ_OPTIONS= --with-system-libvpx .for use in ${USE_MOZILLA} ${use:S/-/_WITHOUT_/}= ${TRUE} .endfor .for dep in ${_ALL_DEPENDS} ${USE_MOZILLA:M+*:S/+//} .if !defined(_WITHOUT_${dep}) BUILD_DEPENDS+= ${${dep}_BUILD_DEPENDS} LIB_DEPENDS+= ${${dep}_LIB_DEPENDS} RUN_DEPENDS+= ${${dep}_RUN_DEPENDS} USES+= ${${dep}_USES} MOZ_OPTIONS+= ${${dep}_MOZ_OPTIONS} .else BUILD_DEPENDS+= ${-${dep}_BUILD_DEPENDS} .endif .endfor # Standard options MOZ_CHROME?= omni MOZ_TOOLKIT?= cairo-gtk2 MOZ_OPTIONS+= \ --enable-chrome-format=${MOZ_CHROME} \ --enable-default-toolkit=${MOZ_TOOLKIT} \ --with-pthreads # Configure options for install .if !defined(MOZ_EXTENSIONS) MOZ_OPTIONS+= --enable-extensions=default .else MOZ_OPTIONS+= --enable-extensions=${MOZ_EXTENSIONS} .endif .if !defined(MOZ_PROTOCOLS) MOZ_OPTIONS+= --enable-necko-protocols=default .else MOZ_OPTIONS+= --enable-necko-protocols=${MOZ_PROTOCOLS} .endif # others MOZ_OPTIONS+= --with-system-zlib \ --with-system-bz2 \ --enable-unified-compilation \ --disable-debug-symbols \ --disable-glibtest \ --disable-gtktest \ --disable-freetypetest \ --disable-installer \ --disable-updater \ --disable-pedantic # API keys from www/chromium # http://www.chromium.org/developers/how-tos/api-keys # Note: these are for FreeBSD use ONLY. For your own distribution, # please get your own set of keys. MOZ_EXPORT+= MOZ_GOOGLE_API_KEY=AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8 \ MOZ_GOOGLE_OAUTH_API_CLIENTID=996322985003.apps.googleusercontent.com \ MOZ_GOOGLE_OAUTH_API_KEY=IR1za9-1VK0zZ0f_O8MVFicn .if ${PORT_OPTIONS:MGTK3} MOZ_TOOLKIT= cairo-gtk3 .endif .if ${MOZ_TOOLKIT:Mcairo-qt} # don't use - transparent backgrounds (bug 521582), USE_MOZILLA+= -cairo # ports/169343 USE_DISPLAY=yes # install USE_GNOME+= pango USE_QT5+= qmake_build buildtools_build gui network quick printsupport MOZ_EXPORT+= HOST_QMAKE="${QMAKE}" HOST_MOC="${MOC}" HOST_RCC="${RCC}" .elif ${MOZ_TOOLKIT:Mcairo-gtk3} USE_GNOME+= gtk30 . if ${MOZILLA_VER:R:R} >= 32 USE_GNOME+= gtk20 # bug 624422 . endif .else # gtk2, cairo-gtk2 USE_GNOME+= gtk20 .endif .if ${PORT_OPTIONS:MOPTIMIZED_CFLAGS} CFLAGS+= -O3 MOZ_EXPORT+= MOZ_OPTIMIZE_FLAGS="${CFLAGS:M-O*}" MOZ_OPTIONS+= --enable-optimize .else MOZ_OPTIONS+= --disable-optimize .endif .if ${PORT_OPTIONS:MCANBERRA} RUN_DEPENDS+= libcanberra>0:${PORTSDIR}/audio/libcanberra .endif .if ${PORT_OPTIONS:MDBUS} BUILD_DEPENDS+= libnotify>0:${PORTSDIR}/devel/libnotify LIB_DEPENDS+= libdbus-glib-1.so:${PORTSDIR}/devel/dbus-glib \ libstartup-notification-1.so:${PORTSDIR}/x11/startup-notification MOZ_OPTIONS+= --enable-startup-notification .else MOZ_OPTIONS+= --disable-dbus --disable-libnotify .endif .if ${PORT_OPTIONS:MGSTREAMER} USE_GSTREAMER1?=good libav MOZ_OPTIONS+= --enable-gstreamer=1.0 .else MOZ_OPTIONS+= --disable-gstreamer .endif .if ${PORT_OPTIONS:MGCONF} BUILD_DEPENDS+= ${gconf2_DETECT}:${gconf2_LIB_DEPENDS:C/.*://} USE_GNOME+= gconf2:build MOZ_OPTIONS+= --enable-gconf .else MOZ_OPTIONS+= --disable-gconf .endif .if ${PORT_OPTIONS:MGIO} && ! ${MOZ_TOOLKIT:Mcairo-qt} MOZ_OPTIONS+= --enable-gio .else MOZ_OPTIONS+= --disable-gio .endif .if ${PORT_OPTIONS:MGNOMEUI} BUILD_DEPENDS+= ${libgnomeui_DETECT}:${libgnomeui_LIB_DEPENDS:C/.*://} USE_GNOME+= libgnomeui:build MOZ_OPTIONS+= --enable-gnomeui .else MOZ_OPTIONS+= --disable-gnomeui .endif .if ${PORT_OPTIONS:MLIBPROXY} LIB_DEPENDS+= libproxy.so:${PORTSDIR}/net/libproxy MOZ_OPTIONS+= --enable-libproxy .else MOZ_OPTIONS+= --disable-libproxy .endif .if ${PORT_OPTIONS:MPGO} USES:= compiler:gcc-c++11-lib ${USES:Ncompiler*c++11*} USE_DISPLAY=yes ALL_TARGET= profiledbuild MOZ_EXPORT+=MOZ_OPTIMIZE_FLAGS="-Os" MOZ_PGO_OPTIMIZE_FLAGS="${CFLAGS:M-O*}" .endif .if ${PORT_OPTIONS:MALSA} LIB_DEPENDS+= libasound.so:${PORTSDIR}/audio/alsa-lib RUN_DEPENDS+= ${LOCALBASE}/lib/alsa-lib/libasound_module_pcm_oss.so:${PORTSDIR}/audio/alsa-plugins MOZ_OPTIONS+= --enable-alsa .endif .if ${PORT_OPTIONS:MPULSEAUDIO} . if ${PORT_OPTIONS:MALSA} BUILD_DEPENDS+= pulseaudio>0:${PORTSDIR}/audio/pulseaudio . else # pull pulse package if we cannot fallback to another backend LIB_DEPENDS+= libpulse.so:${PORTSDIR}/audio/pulseaudio . endif MOZ_OPTIONS+= --enable-pulseaudio .else MOZ_OPTIONS+= --disable-pulseaudio .endif .if ${PORT_OPTIONS:MDEBUG} MOZ_OPTIONS+= --enable-debug --disable-release STRIP= # ports/184285 .else MOZ_OPTIONS+= --disable-debug --enable-release .endif .if ${PORT_OPTIONS:MDTRACE} MOZ_OPTIONS+= --enable-dtrace . if ${OPSYS} == FreeBSD && ${OSVERSION} < 1100061 LIBS+= -lelf . endif STRIP= .else MOZ_OPTIONS+= --disable-dtrace .endif .if ${MOZILLA_VER:R:R} < 40 . if ${PORT_OPTIONS:MLOGGING} || ${PORT_OPTIONS:MDEBUG} MOZ_OPTIONS+= --enable-logging . else MOZ_OPTIONS+= --disable-logging . endif .endif .if ${PORT_OPTIONS:MPROFILE} MOZ_OPTIONS+= --enable-profiling STRIP= .else MOZ_OPTIONS+= --disable-profiling .endif .if ${PORT_OPTIONS:MTEST} USE_XORG+= xscrnsaver MOZ_OPTIONS+= --enable-tests .else MOZ_OPTIONS+= --disable-tests .endif .if !defined(STRIP) || ${STRIP} == "" MOZ_OPTIONS+= --disable-strip --disable-install-strip .else MOZ_OPTIONS+= --enable-strip --enable-install-strip .endif # _MAKE_JOBS is only available after bsd.port.post.mk, thus cannot be # used in .mozconfig. And client.mk automatically uses -jN where N # is what multiprocessing.cpu_count() returns. .if defined(DISABLE_MAKE_JOBS) || defined(MAKE_JOBS_UNSAFE) MAKE_JOBS_NUMBER= 1 .endif .if defined(MAKE_JOBS_NUMBER) MOZ_MAKE_FLAGS+=-j${MAKE_JOBS_NUMBER} .endif .if defined(MOZ_MAKE_FLAGS) MOZ_MK_OPTIONS+=MOZ_MAKE_FLAGS="${MOZ_MAKE_FLAGS}" .endif MOZ_SED_ARGS+= -e's|@CPPFLAGS@|${CPPFLAGS}|g' \ -e 's|@CFLAGS@|${CFLAGS}|g' \ -e 's|@LDFLAGS@|${LDFLAGS}|g' \ -e 's|@LIBS@|${LIBS}|g' \ -e 's|@LOCALBASE@|${LOCALBASE}|g' \ -e 's|@PERL@|${PERL5}|g' \ -e 's|@MOZDIR@|${PREFIX}/lib/${MOZILLA}|g' \ -e 's|%%PREFIX%%|${PREFIX}|g' \ -e 's|%%CFLAGS%%|${CFLAGS}|g' \ -e 's|%%LDFLAGS%%|${LDFLAGS}|g' \ -e 's|%%LIBS%%|${LIBS}|g' \ -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ -e 's|%%PERL%%|${PERL5}|g' \ -e 's|%%MOZILLA%%|${MOZILLA}|g' \ -e 's|%%MOZILLA_BIN%%|${MOZILLA_BIN}|g' \ -e 's|%%MOZDIR%%|${PREFIX}/lib/${MOZILLA}|g' MOZCONFIG_SED?= ${SED} ${MOZ_SED_ARGS} .if ${ARCH} == amd64 . if ${USE_MOZILLA:M-nss} USE_BINUTILS= # intel-gcm.s CFLAGS+= -B${LOCALBASE}/bin LDFLAGS+= -B${LOCALBASE}/bin . if ${OPSYS} == FreeBSD && ${OSVERSION} < 1000041 && \ exists(/usr/lib/libcxxrt.so) && ${CXXFLAGS:M-stdlib=libc++} LIBS+= -lcxxrt . endif . endif .elif ${ARCH:Mpowerpc*} USES:= compiler:gcc-c++11-lib ${USES:Ncompiler*c++11*} . if ${ARCH} == "powerpc64" MOZ_EXPORT+= UNAME_m="${ARCH}" CFLAGS+= -mminimal-toc . endif .elif ${ARCH} == "sparc64" # Work around miscompilation/mislinkage of the sCanonicalVTable hacks. MOZ_OPTIONS+= --disable-v1-string-abi .endif .else # bsd.port.post.mk pre-extract: gecko-pre-extract gecko-pre-extract: .if ${PORT_OPTIONS:MPGO} @${ECHO} "*****************************************************************" @${ECHO} "**************************** attention **************************" @${ECHO} "*****************************************************************" @${ECHO} "To build ${MOZILLA} with PGO support you need a running X server and" @${ECHO} " build this port with an user who could access the X server! " @${ECHO} "" @${ECHO} "During the build a ${MOZILLA} instance will start and run some test." @${ECHO} " Do not interrupt or close ${MOZILLA} during this tests! " @${ECHO} "*****************************************************************" @sleep 10 .endif post-patch: gecko-post-patch gecko-moz-pis-patch gecko-post-patch: .if exists(${PKGINSTALL_INC}) @${MOZCONFIG_SED} < ${PKGINSTALL_INC} > ${PKGINSTALL} .endif .if exists(${PKGDEINSTALL_INC}) @${MOZCONFIG_SED} < ${PKGDEINSTALL_INC} > ${PKGDEINSTALL} .endif @${RM} -f ${MOZCONFIG} .if !defined(NOMOZCONFIG) @if [ -e ${PORT_MOZCONFIG} ] ; then \ ${MOZCONFIG_SED} < ${PORT_MOZCONFIG} >> ${MOZCONFIG} ; \ fi .for arg in ${MOZ_OPTIONS} @${ECHO_CMD} ac_add_options ${arg:Q} >> ${MOZCONFIG} .endfor .for arg in ${MOZ_MK_OPTIONS} @${ECHO_CMD} mk_add_options ${arg:Q} >> ${MOZCONFIG} .endfor .for var in ${MOZ_EXPORT} @${ECHO_CMD} export ${var:Q} >> ${MOZCONFIG} .endfor .endif # .if !defined(NOMOZCONFIG) .if exists(${MOZSRC}/build/unix/mozilla-config.in) @${REINPLACE_CMD} -e 's/%{idldir}/%idldir%/g ; \ s|"%FULL_NSPR_CFLAGS%"|`nspr-config --cflags`|g ; \ s|"%FULL_NSPR_LIBS%"|`nspr-config --libs`|g' \ ${MOZSRC}/build/unix/mozilla-config.in .endif .if ${USE_MOZILLA:M-nspr} @${ECHO_MSG} "===> Applying NSPR patches" @for i in ${.CURDIR}/../../devel/nspr/files/patch-*; do \ - ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/nsprpub/build < $$i; \ + ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/nsprpub < $$i; \ done .endif .if ${USE_MOZILLA:M-nss} @${ECHO_MSG} "===> Applying NSS patches" @for i in ${.CURDIR}/../../security/nss/files/patch-*; do \ ${PATCH} ${PATCH_ARGS} -d ${MOZSRC}/security/nss < $$i; \ done .endif @for f in \ ${WRKSRC}/directory/c-sdk/config/FreeBSD.mk \ ${WRKSRC}/directory/c-sdk/configure \ ${MOZSRC}/security/coreconf/FreeBSD.mk \ ${MOZSRC}/js/src/Makefile.in \ ${MOZSRC}/js/src/configure \ ${MOZSRC}/configure \ ${WRKSRC}/configure; do \ if [ -f $$f ] ; then \ ${REINPLACE_CMD} -Ee 's|-lc_r|-pthread|g ; \ s|-l?pthread|-pthread|g ; \ s|echo aout|echo elf|g ; \ s|/usr/X11R6|${LOCALBASE}|g' \ $$f; \ fi; \ done @if [ -f ${WRKSRC}/config/baseconfig.mk ] ; then \ ${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${WRKSRC}/config/baseconfig.mk; \ fi @${REINPLACE_CMD} -e 's|%%MOZILLA%%|${MOZILLA}|g' \ ${MOZSRC}/config/baseconfig.mk @${REINPLACE_CMD} -e 's|%%PREFIX%%|${PREFIX}|g ; \ s|%%LOCALBASE%%|${LOCALBASE}|g' \ ${MOZSRC}/build/unix/run-mozilla.sh @${REINPLACE_CMD} -e 's|/usr/local/netscape|${LOCALBASE}|g ; \ s|/usr/local/lib/netscape|${LOCALBASE}/lib|g' \ ${MOZSRC}/xpcom/io/SpecialSystemDirectory.cpp @${REINPLACE_CMD} -e 's|/etc|${PREFIX}&|g' \ ${MOZSRC}/xpcom/build/nsXPCOMPrivate.h @${REINPLACE_CMD} -e 's|/usr/local|${LOCALBASE}|g' \ -e 's|mozilla/plugins|browser_plugins|g' \ -e 's|share/mozilla/extensions|lib/xpi|g' \ ${MOZSRC}/xpcom/io/nsAppFileLocationProvider.cpp \ ${MOZSRC}/toolkit/xre/nsXREDirProvider.cpp @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ ${MOZSRC}/extensions/spellcheck/hunspell/src/mozHunspell.cpp # handles mozilla pis scripts. gecko-moz-pis-patch: .for moz in ${MOZ_PIS_SCRIPTS} @${MOZCONFIG_SED} < ${FILESDIR}/${moz} > ${WRKDIR}/${moz} .endfor do-configure: gecko-do-configure gecko-do-configure: @(if ! ${CONFIGURE_ENV} ${DO_MAKE_BUILD} configure; then \ ${ECHO_MSG} "===> Script \"${CONFIGURE_SCRIPT}\" failed unexpectedly."; \ (${ECHO_CMD} ${CONFIGURE_FAIL_MESSAGE}) | ${FMT} 75 79 ; \ ${FALSE}; \ fi) pre-install: gecko-moz-pis-pre-install post-install-script: gecko-create-plist gecko-create-plist: port-post-install .if !target(port-post-install) port-post-install: @${DO_NADA} .endif gecko-create-plist: # Create the plist ${RM} -f ${PLISTF} .for dir in ${MOZILLA_PLIST_DIRS} @cd ${STAGEDIR}${PREFIX}/${dir} && ${FIND} -H -s * ! -type d | \ ${SED} -e 's|^|${dir}/|' >> ${PLISTF} .endfor ${CAT} ${PLISTF} | ${SORT} >> ${TMPPLIST} gecko-moz-pis-pre-install: .if defined(MOZ_PIS_SCRIPTS) ${MKDIR} ${STAGEDIR}${PREFIX}/${MOZ_PIS_DIR} .for moz in ${MOZ_PIS_SCRIPTS} ${INSTALL_SCRIPT} ${WRKDIR}/${moz} ${STAGEDIR}${PREFIX}/${MOZ_PIS_DIR} .endfor .endif .endif .endif # HERE THERE BE TACOS -- adamw Index: head/devel/nspr/Makefile =================================================================== --- head/devel/nspr/Makefile (revision 402127) +++ head/devel/nspr/Makefile (revision 402128) @@ -1,80 +1,51 @@ # Created by: Maxim Sobolev # $FreeBSD$ PORTNAME= nspr DISTVERSION= 4.10.10 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= MOZILLA/${PORTNAME}/releases/v${PORTVERSION}/src MAINTAINER= gecko@FreeBSD.org COMMENT= Platform-neutral API for system level and libc like functions -WRKSRC= ${WRKDIR}/${DISTNAME}/nspr/build - -USES= cpe gmake +USES= cpe gmake pathfix CPE_VENDOR= mozilla CPE_PRODUCT= netscape_portable_runtime -USE_LDCONFIG= yes +WRKSRC_SUBDIR= nspr GNU_CONFIGURE= yes -CONFIGURE_SCRIPT=../configure -CONFIGURE_ARGS= --srcdir=${WRKSRC:H} +USE_LDCONFIG= yes -MAKE_ENV= DIST=${WRKSRC}/dist +OPTIONS_DEFINE= DEBUG TEST -LIBRARIES= libnspr4.so.1 libplc4.so.1 libplds4.so.1 - -OPTIONS_DEFINE= DEBUG - DEBUG_CONFIGURE_ENABLE=debug -do-install: - ${MKDIR} ${STAGEDIR}${PREFIX}/include/nspr - ${TAR} -C ${WRKSRC}/dist/include --dereference -cf - . | \ - ${TAR} -C ${STAGEDIR}${PREFIX}/include -xof - - ${FIND} ${STAGEDIR}${PREFIX}/include/nspr -type d | \ - ${XARGS} ${CHMOD} 0755 - ${FIND} ${STAGEDIR}${PREFIX}/include/nspr -type f | \ - ${XARGS} ${CHMOD} ${SHAREMODE} - ${TAR} -C ${WRKSRC}/dist/lib --dereference -cf - . | \ - ${TAR} -C ${STAGEDIR}${PREFIX}/lib -xof - - ${INSTALL_SCRIPT} ${WRKSRC}/config/nspr-config ${STAGEDIR}${PREFIX}/bin - ${MKDIR} ${STAGEDIR}${PREFIX}/libdata/pkgconfig - ${INSTALL_DATA} ${WRKSRC}/config/nspr.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig -.for lib in ${LIBRARIES} -.if defined(STRIP) && ${STRIP} != "" - ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/${lib} -.endif - ${CHMOD} ${LIBMODE} ${STAGEDIR}${PREFIX}/lib/${lib} - ${LN} -sf ${lib} ${STAGEDIR}${PREFIX}/lib/${lib:R} -.endfor +post-patch: +# Do not install tools to build itself + @${REINPLACE_CMD} -e '/RELEASE_BINS/d' \ + ${WRKSRC}/pr/src/misc/Makefile.in -prtests: - ${DO_MAKE_BUILD} -C ${WRKSRC}/pr/tests - ${LN} -sf libmy.so.1 ${WRKSRC}/pr/tests/dll/libmy.so - cd ${WRKSRC}/pr/tests && ../../../pr/tests/runtests.sh +post-build-TEST-on: + @${DO_MAKE_BUILD} -C ${BUILD_WRKSRC}/lib/tests + @${DO_MAKE_BUILD} -C ${BUILD_WRKSRC}/pr/tests + @${LN} -fs libmy.so.1 ${BUILD_WRKSRC}/pr/tests/dll/libmy.so -libtests: - ${DO_MAKE_BUILD} -C ${WRKSRC}/lib/tests - ${WRKSRC}/lib/tests/string - ${WRKSRC}/lib/tests/base64t +post-install: + @for file in ${STAGEDIR}${PREFIX}/lib/*.so*; do \ + ${STRIP_CMD} $$file; \ + ${CHMOD} ${LIBMODE} $$file; \ + ${LN} -fs $${file##*/} $${file%.*}; \ + done + +do-test-TEST-on: + ${TEST_WRKSRC}/lib/tests/string + ${TEST_WRKSRC}/lib/tests/base64t + cd ${TEST_WRKSRC}/pr/tests && ${WRKSRC}/pr/tests/runtests.sh # The test below is commented out, because arena requires # command-line arguments. If you can provide reasonable values # for it, please contact ${MAINTAINER}. Thank you. - # ${WRKSRC}/lib/tests/arena + # ${TEST_WRKSRC}/lib/tests/arena # - -test: libtests prtests - -#regression-test: test - -#.if defined(PACKAGE_BUILDING) -#post-build: test -#.else -post-build: - # - # Please, consider running ``make test'' to find any - # possible build problems. - # -#.endif .include Index: head/devel/nspr/files/patch-..::configure =================================================================== --- head/devel/nspr/files/patch-..::configure (revision 402127) +++ head/devel/nspr/files/patch-..::configure (nonexistent) @@ -1,29 +0,0 @@ ---- ../configure.orig 2012-02-14 20:06:00.000000000 +0100 -+++ ../configure 2012-02-17 17:14:27.862323726 +0100 -@@ -4035,11 +4035,8 @@ EOF - EOF - - CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall" -- MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` -- if test "$MOZ_OBJFORMAT" = "elf"; then -- DLL_SUFFIX=so -- else -- DLL_SUFFIX=so.1.0 -+ if test -z "$MOZILLA_CLIENT"; then -+ DLL_SUFFIX=so.1 - fi - MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' - DSO_CFLAGS=-fPIC -@@ -6271,11 +6271,9 @@ - #define _THREAD_SAFE 1 - EOF - - if test "$ac_cv_have_dash_pthread" = "yes"; then - _PTHREAD_LDFLAGS="-pthread" -- else -- _PTHREAD_LDFLAGS="-lc_r" - fi - ;; - *-netbsd*) - if test "$ac_cv_have_dash_pthread" = "yes"; then - Property changes on: head/devel/nspr/files/patch-..::configure ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/nspr/files/patch-..::config::autoconf.mk.in =================================================================== --- head/devel/nspr/files/patch-..::config::autoconf.mk.in (revision 402127) +++ head/devel/nspr/files/patch-..::config::autoconf.mk.in (nonexistent) @@ -1,11 +0,0 @@ ---- ../config/autoconf.mk.in.orig Wed Oct 17 02:31:02 2001 -+++ ../config/autoconf.mk.in Thu Aug 8 19:22:44 2002 -@@ -17,7 +17,7 @@ - dist_includedir = @dist_includedir@ - dist_libdir = @dist_libdir@ - --DIST = $(dist_prefix) -+DIST ?= $(dist_prefix) - - RELEASE_OBJDIR_NAME = @RELEASE_OBJDIR_NAME@ - OBJDIR_NAME = @OBJDIR_NAME@ Property changes on: head/devel/nspr/files/patch-..::config::autoconf.mk.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/nspr/files/patch-config-nsprc.pc.in =================================================================== --- head/devel/nspr/files/patch-config-nsprc.pc.in (revision 402127) +++ head/devel/nspr/files/patch-config-nsprc.pc.in (nonexistent) @@ -1,10 +0,0 @@ ---- ../config/nspr.pc.in.orig 2012-05-19 00:26:17.000000000 +0200 -+++ ../config/nspr.pc.in 2012-06-05 16:19:31.000000000 +0200 -@@ -6,5 +6,5 @@ - Name: NSPR - Description: The Netscape Portable Runtime - Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@ --Libs: -L@libdir@ -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ --Cflags: -I@includedir@ -+Libs: -L${libdir} -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ @OS_LIBS@ -+Cflags: -I${includedir} Property changes on: head/devel/nspr/files/patch-config-nsprc.pc.in ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/devel/nspr/files/patch-bug301986 =================================================================== --- head/devel/nspr/files/patch-bug301986 (revision 402127) +++ head/devel/nspr/files/patch-bug301986 (revision 402128) @@ -1,35 +1,41 @@ pthread_t can well be a 64-bit value -- on FreeBSD/amd64, for example. Better to just keep calling it pthread_t isntead of casting to anything. -mi ---- ../pr/include/private/pprthred.h Sun Apr 25 11:00:56 2004 -+++ ../pr/include/private/pprthred.h Tue Jul 12 00:52:42 2005 -@@ -44,4 +44,5 @@ +--- pr/include/private/pprthred.h.orig 2015-10-16 13:22:19 UTC ++++ pr/include/private/pprthred.h +@@ -11,6 +11,7 @@ + ** developers only. */ #include "nspr.h" +#include #if defined(XP_OS2) -@@ -92,5 +92,5 @@ + #define INCL_DOS +@@ -59,7 +60,7 @@ NSPR_API(void) PR_DetachThread(void); + ** Get the id of the named thread. Each thread is assigned a unique id ** when it is created or attached. */ -NSPR_API(PRUint32) PR_GetThreadID(PRThread *thread); +NSPR_API(pthread_t) PR_GetThreadID(PRThread *thread); /* ---- ../pr/src/pthreads/ptthread.c Wed May 25 22:27:51 2005 -+++ ../pr/src/pthreads/ptthread.c Tue Jul 12 00:49:50 2005 -@@ -979,10 +979,10 @@ + ** Set the procedure that is called when a thread is dumped. The procedure +--- pr/src/pthreads/ptthread.c.orig 2015-10-16 13:22:19 UTC ++++ pr/src/pthreads/ptthread.c +@@ -1155,12 +1155,12 @@ PR_IMPLEMENT(void) PR_ProcessExit(PRIntn + _exit(status); } -PR_IMPLEMENT(PRUint32) PR_GetThreadID(PRThread *thred) +PR_IMPLEMENT(pthread_t) PR_GetThreadID(PRThread *thred) { #if defined(_PR_DCETHREADS) return (PRUint32)&thred->id; /* this is really a sham! */ #else - return (PRUint32)thred->id; /* and I don't know what they will do with it */ + return thred->id; /* and I don't know what they will do with it */ #endif } + Index: head/devel/nspr/files/patch-bug782109 =================================================================== --- head/devel/nspr/files/patch-bug782109 (revision 402127) +++ head/devel/nspr/files/patch-bug782109 (revision 402128) @@ -1,31 +1,31 @@ ---- ../pr/include/md/_freebsd.h~ -+++ ../pr/include/md/_freebsd.h -@@ -47,6 +47,14 @@ +--- pr/include/md/_freebsd.h.orig 2015-10-16 13:22:19 UTC ++++ pr/include/md/_freebsd.h +@@ -57,6 +57,14 @@ #define _PR_HAVE_LARGE_OFF_T #if defined(_PR_PTHREADS) +#if __FreeBSD_version >= 602000 +#define _PR_HAVE_GETPROTO_R +#define _PR_HAVE_5_ARG_GETPROTO_R +#endif +#if __FreeBSD_version >= 700016 +#define _PR_HAVE_GETHOST_R +#define _PR_HAVE_GETHOST_R_INT +#endif #if __FreeBSD_version >= 400008 /* * libc_r before this version of FreeBSD doesn't have poll(). ---- ../pr/src/misc/prnetdb.c -+++ ../pr/src/misc/prnetdb.c +--- pr/src/misc/prnetdb.c.orig 2015-10-16 13:22:19 UTC ++++ pr/src/misc/prnetdb.c @@ -78,11 +78,6 @@ PRLock *_pr_dnsLock = NULL; #define _PR_HAVE_GETPROTO_R_INT #endif -#if __FreeBSD_version >= 602000 -#define _PR_HAVE_GETPROTO_R -#define _PR_HAVE_5_ARG_GETPROTO_R -#endif - /* BeOS has glibc but not the glibc-style getprotobyxxx_r functions. */ #if (defined(__GLIBC__) && __GLIBC__ >= 2 && !defined(XP_BEOS)) #define _PR_HAVE_GETPROTO_R Index: head/devel/nspr/files/patch-bug782111 =================================================================== --- head/devel/nspr/files/patch-bug782111 (revision 402127) +++ head/devel/nspr/files/patch-bug782111 (revision 402128) @@ -1,35 +1,35 @@ ---- ../pr/src/pthreads/ptthread.c -+++ ../pr/src/pthreads/ptthread.c +--- pr/src/pthreads/ptthread.c.orig 2015-11-20 22:19:14 UTC ++++ pr/src/pthreads/ptthread.c @@ -21,6 +21,10 @@ #include #include +#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY) +#include +#endif + #ifdef SYMBIAN /* In Open C sched_get_priority_min/max do not work properly, so we undefine * _POSIX_THREAD_PRIORITY_SCHEDULING here. -@@ -1619,7 +1623,7 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const char *name) +@@ -1733,7 +1737,7 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThre { PRThread *thread; size_t nameLen; - int result; + int result = 0; if (!name) { PR_SetError(PR_INVALID_ARGUMENT_ERROR, 0); -@@ -1637,8 +1641,10 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThreadName(const char *name) +@@ -1751,8 +1755,10 @@ PR_IMPLEMENT(PRStatus) PR_SetCurrentThre return PR_FAILURE; memcpy(thread->name, name, nameLen + 1); -#if defined(OPENBSD) || defined(FREEBSD) - result = pthread_set_name_np(thread->id, name); +#if defined(OPENBSD) || defined(FREEBSD) || defined(DRAGONFLY) + pthread_set_name_np(thread->id, name); +#elif defined(NETBSD) + pthread_setname_np(thread->id, "%s", name); #else /* not BSD */ /* * On OSX, pthread_setname_np is only available in 10.6 or later, so test Index: head/devel/nspr/files/patch-config_nspr.pc.in =================================================================== --- head/devel/nspr/files/patch-config_nspr.pc.in (nonexistent) +++ head/devel/nspr/files/patch-config_nspr.pc.in (revision 402128) @@ -0,0 +1,10 @@ +--- config/nspr.pc.in.orig 2015-10-16 13:22:19 UTC ++++ config/nspr.pc.in +@@ -6,5 +6,5 @@ includedir=@includedir@ + Name: NSPR + Description: The Netscape Portable Runtime + Version: @MOD_MAJOR_VERSION@.@MOD_MINOR_VERSION@.@MOD_PATCH_VERSION@ +-Libs: -L@libdir@ -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ +-Cflags: -I@includedir@ ++Libs: -L${libdir} -lplds@MOD_MAJOR_VERSION@ -lplc@MOD_MAJOR_VERSION@ -lnspr@MOD_MAJOR_VERSION@ @OS_LIBS@ ++Cflags: -I${includedir} Property changes on: head/devel/nspr/files/patch-config_nspr.pc.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/nspr/files/patch-configure =================================================================== --- head/devel/nspr/files/patch-configure (nonexistent) +++ head/devel/nspr/files/patch-configure (revision 402128) @@ -0,0 +1,25 @@ +--- configure.orig 2015-10-16 13:22:19 UTC ++++ configure +@@ -6674,11 +6674,8 @@ tools are selected during the Xcode/Deve + $as_echo "#define HAVE_SOCKLEN_T 1" >>confdefs.h + + CFLAGS="$CFLAGS $(DSO_CFLAGS) -ansi -Wall" +- MOZ_OBJFORMAT=`test -x /usr/bin/objformat && /usr/bin/objformat || echo elf` +- if test "$MOZ_OBJFORMAT" = "elf"; then +- DLL_SUFFIX=so +- else +- DLL_SUFFIX=so.1.0 ++ if test -z "$MOZILLA_CLIENT"; then ++ DLL_SUFFIX=so.1 + fi + MKSHLIB='$(CC) $(DSO_LDOPTS) -o $@' + DSO_CFLAGS=-fPIC +@@ -8332,8 +8329,6 @@ $as_echo "$ac_cv_have_dash_pthreads" >&6 + + if test "$ac_cv_have_dash_pthread" = "yes"; then + _PTHREAD_LDFLAGS="-pthread" +- else +- _PTHREAD_LDFLAGS="-lc_r" + fi + ;; + *-netbsd*) Property changes on: head/devel/nspr/files/patch-configure ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/devel/nspr/files/patch-libtests =================================================================== --- head/devel/nspr/files/patch-libtests (revision 402127) +++ head/devel/nspr/files/patch-libtests (revision 402128) @@ -1,611 +1,699 @@ ---- ../lib/tests/string.c Sun Apr 25 11:00:46 2004 -+++ ../lib/tests/string.c Mon Jul 25 20:14:12 2005 -@@ -160,5 +160,5 @@ +--- lib/tests/arena.c.orig 2015-10-16 13:22:19 UTC ++++ lib/tests/arena.c +@@ -36,6 +36,7 @@ void DumpAll( void ) + return; + } + ++#if 0 + /* + ** Test Arena allocation. + */ +@@ -96,6 +97,7 @@ static void ArenaGrow( void ) + + return; + } /* end ArenaGrow() */ ++#endif + + + /* +--- lib/tests/base64t.c.orig 2015-10-16 13:22:19 UTC ++++ lib/tests/base64t.c +@@ -1987,7 +1987,6 @@ PRBool test_008(void) + for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) + { + PRUint32 plen = PL_strlen(array[i].plaintext); +- PRUint32 clen = ((plen + 2)/3)*4; + + char *rv = PL_Base64Encode(array[i].plaintext, plen, (char *)0); + +@@ -2747,9 +2746,6 @@ PRBool test_024(void) + + for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) + { +- PRUint32 plen = PL_strlen(array[i].plaintext); +- PRUint32 clen = ((plen + 2)/3)*4; +- + char *rv = PL_Base64Encode(array[i].plaintext, 0, (char *)0); + + if( (char *)0 == rv ) +@@ -2883,8 +2879,6 @@ PRBool test_027(void) + + for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) + { +- PRUint32 clen = PL_strlen(array[i].cyphertext); +- + char *rv = PL_Base64Decode(array[i].cyphertext, 0, (char *)0); + + if( (char *)0 == rv ) +--- lib/tests/string.c.orig 2015-10-16 13:22:19 UTC ++++ lib/tests/string.c +@@ -127,7 +127,7 @@ PRBool test_003(void) + rv = PL_strcpy(array[i].dest, array[i].str); if( array[i].rv != rv ) { - printf("FAIL %d: (0x%x, %s)->0x%x\n", i, array[i].dest, + printf("FAIL %d: (%p, %s)->%p\n", i, array[i].dest, array[i].str ? array[i].str : "(null)", rv); return PR_FALSE; -@@ -270,6 +270,6 @@ + } +@@ -237,8 +237,8 @@ PRBool test_004(void) + rv = PL_strncpy(array[i].dest, array[i].str, array[i].len); if( array[i].rv != rv ) { - printf("FAIL %d: (0x%x, %s, %lu)->0x%x\n", i, array[i].dest, - array[i].str ? array[i].str : "(null)", array[i].len, rv); + printf("FAIL %d: (%p, %s, %u)->%p\n", i, array[i].dest, + array[i].str ? array[i].str : "(null)", (unsigned)array[i].len, rv); return PR_FALSE; } -@@ -396,6 +396,6 @@ + +@@ -363,8 +363,8 @@ PRBool test_005(void) + rv = PL_strncpyz(array[i].dest, array[i].str, array[i].len); if( array[i].rv != rv ) { - printf("FAIL %d: (0x%x, %s, %lu)->0x%x\n", i, array[i].dest, - array[i].str ? array[i].str : "(null)", array[i].len, rv); + printf("FAIL %d: (%p, %s, %u)->%p\n", i, array[i].dest, + array[i].str ? array[i].str : "(null)", (unsigned)array[i].len, rv); return PR_FALSE; } -@@ -448,5 +448,5 @@ + +@@ -415,7 +415,7 @@ PRBool test_006(void) + if( (char *)0 == rv ) { - printf("FAIL %d: 0x%x -> 0\n", i, array[i]); + printf("FAIL %d: %p -> 0\n", i, array[i]); return PR_FALSE; } -@@ -532,6 +532,6 @@ + +@@ -499,8 +499,8 @@ PRBool test_007(void) + if( (char *)0 == rv ) { - printf("FAIL %d: %s,%lu -> 0\n", i, - array[i].str ? array[i].str : "(null)", array[i].len); + printf("FAIL %d: %s,%u -> 0\n", i, + array[i].str ? array[i].str : "(null)", (unsigned)array[i].len); return PR_FALSE; } -@@ -717,8 +717,8 @@ + +@@ -684,10 +684,10 @@ PRBool test_009(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s+%s/%lu -> %.32s, not zero\n", i, + printf("FAIL %d: %s+%s/%u -> %.32s, not zero\n", i, array[i].first ? array[i].first : "(null)", array[i].second ? array[i].second : "(null)", - array[i].length, rv); + (unsigned)array[i].length, rv); return PR_FALSE; } -@@ -728,8 +728,8 @@ + } +@@ -695,10 +695,10 @@ PRBool test_009(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s+%s/%lu -> null, not %s\n", i, + printf("FAIL %d: %s+%s/%u -> null, not %s\n", i, array[i].first ? array[i].first : "(null)", array[i].second ? array[i].second : "(null)", - array[i].length, array[i].result); + (unsigned)array[i].length, array[i].result); return PR_FALSE; } -@@ -743,8 +743,8 @@ + else +@@ -710,10 +710,10 @@ PRBool test_009(void) + { if( *a != *b ) { - printf("FAIL %d: %s+%s/%lu -> %.32s, not %s\n", i, + printf("FAIL %d: %s+%s/%u -> %.32s, not %s\n", i, array[i].first ? array[i].first : "(null)", array[i].second ? array[i].second : "(null)", - array[i].length, rv, array[i].result); + (unsigned)array[i].length, rv, array[i].result); return PR_FALSE; } -@@ -758,8 +758,8 @@ + +@@ -725,10 +725,10 @@ PRBool test_009(void) + { if( (char)0 != *b ) { - printf("FAIL %d: %s+%s/%lu -> not nulled\n", i, + printf("FAIL %d: %s+%s/%u -> not nulled\n", i, array[i].first ? array[i].first : "(null)", array[i].second ? array[i].second : "(null)", - array[i].length); + (unsigned)array[i].length); return PR_FALSE; } -@@ -769,8 +769,8 @@ + } +@@ -736,10 +736,10 @@ PRBool test_009(void) + { if( (char)0 == *b ) { - printf("FAIL %d: %s+%s/%lu -> overrun\n", i, + printf("FAIL %d: %s+%s/%u -> overrun\n", i, array[i].first ? array[i].first : "(null)", array[i].second ? array[i].second : "(null)", - array[i].length); + (unsigned)array[i].length); return PR_FALSE; } -@@ -847,8 +847,8 @@ + } +@@ -814,10 +814,10 @@ PRBool test_010(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s+%s/%lu -> %.32s, not zero\n", i, + printf("FAIL %d: %s+%s/%u -> %.32s, not zero\n", i, array[i].first ? array[i].first : "(null)", array[i].second ? array[i].second : "(null)", - array[i].length, rv); + (unsigned)array[i].length, rv); return PR_FALSE; } -@@ -858,8 +858,8 @@ + } +@@ -825,10 +825,10 @@ PRBool test_010(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s+%s/%lu -> null, not %s\n", i, + printf("FAIL %d: %s+%s/%u -> null, not %s\n", i, array[i].first ? array[i].first : "(null)", array[i].second ? array[i].second : "(null)", - array[i].length, array[i].result); + (unsigned)array[i].length, array[i].result); return PR_FALSE; } -@@ -873,8 +873,8 @@ + else +@@ -840,10 +840,10 @@ PRBool test_010(void) + { if( *a != *b ) { - printf("FAIL %d: %s+%s/%lu -> %.32s, not %s\n", i, + printf("FAIL %d: %s+%s/%u -> %.32s, not %s\n", i, array[i].first ? array[i].first : "(null)", array[i].second ? array[i].second : "(null)", - array[i].length, rv, array[i].result); + (unsigned)array[i].length, rv, array[i].result); return PR_FALSE; } -@@ -1105,8 +1105,8 @@ + +@@ -1072,10 +1072,10 @@ PRBool test_012(void) + break; } - printf("FAIL %d: %s-%s/%ld -> %d, not %d\n", i, + printf("FAIL %d: %s-%s/%d -> %d, not %d\n", i, array[i].one ? array[i].one : "(null)", array[i].two ? array[i].two : "(null)", - array[i].max, rv, array[i].sign); + (int)array[i].max, rv, array[i].sign); return PR_FALSE; } -@@ -1327,8 +1327,8 @@ + +@@ -1294,10 +1294,10 @@ PRBool test_014(void) + break; } - printf("FAIL %d: %s-%s/%ld -> %d, not %d\n", i, + printf("FAIL %d: %s-%s/%d -> %d, not %d\n", i, array[i].one ? array[i].one : "(null)", array[i].two ? array[i].two : "(null)", - array[i].max, rv, array[i].sign); + (int)array[i].max, rv, array[i].sign); return PR_FALSE; } -@@ -1400,6 +1400,6 @@ + +@@ -1367,15 +1367,15 @@ PRBool test_015(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%c -> null, not +%lu\n", i, array[i].str, - array[i].chr, array[i].off); + printf("FAIL %d: %s,%c -> null, not +%u\n", i, array[i].str, + array[i].chr, (unsigned)array[i].off); return PR_FALSE; } -@@ -1407,6 +1407,6 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%c -> 0x%x, not 0x%x+%lu\n", i, array[i].str, - array[i].chr, rv, array[i].str, array[i].off); + printf("FAIL %d: %s,%c -> %p, not %p+%u\n", i, array[i].str, + array[i].chr, rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -1480,6 +1480,6 @@ + } +@@ -1447,15 +1447,15 @@ PRBool test_016(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%c -> null, not +%lu\n", i, array[i].str, - array[i].chr, array[i].off); + printf("FAIL %d: %s,%c -> null, not +%u\n", i, array[i].str, + array[i].chr, (unsigned)array[i].off); return PR_FALSE; } -@@ -1487,6 +1487,6 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%c -> 0x%x, not 0x%x+%lu\n", i, array[i].str, - array[i].chr, rv, array[i].str, array[i].off); + printf("FAIL %d: %s,%c -> %p, not %p+%u\n", i, array[i].str, + array[i].chr, rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -1555,6 +1555,6 @@ + } +@@ -1522,8 +1522,8 @@ PRBool test_017(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s,%c/%lu -> %.32s, not zero\n", i, array[i].str, - array[i].chr, array[i].max, rv); + printf("FAIL %d: %s,%c/%u -> %.32s, not zero\n", i, array[i].str, + array[i].chr, (unsigned)array[i].max, rv); return PR_FALSE; } -@@ -1564,6 +1564,6 @@ + } +@@ -1531,15 +1531,15 @@ PRBool test_017(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%c/%lu -> null, not +%lu\n", i, array[i].str, - array[i].chr, array[i].max, array[i].off); + printf("FAIL %d: %s,%c/%u -> null, not +%u\n", i, array[i].str, + array[i].chr, (unsigned)array[i].max, (unsigned)array[i].off); return PR_FALSE; } -@@ -1571,6 +1571,6 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%c/%lu -> 0x%x, not 0x%x+%lu\n", i, array[i].str, - array[i].chr, array[i].max, rv, array[i].str, array[i].off); + printf("FAIL %d: %s,%c/%u -> %p, not %p+%u\n", i, array[i].str, + array[i].chr, (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -1639,6 +1639,6 @@ + } +@@ -1606,8 +1606,8 @@ PRBool test_018(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s,%c/%lu -> %.32s, not zero\n", i, array[i].str, - array[i].chr, array[i].max, rv); + printf("FAIL %d: %s,%c/%u -> %.32s, not zero\n", i, array[i].str, + array[i].chr, (unsigned)array[i].max, rv); return PR_FALSE; } -@@ -1648,13 +1648,13 @@ + } +@@ -1615,15 +1615,15 @@ PRBool test_018(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%c/%lu -> null, not +%lu\n", i, array[i].str, - array[i].chr, array[i].max, array[i].off); + printf("FAIL %d: %s,%c/%u -> null, not +%u\n", i, array[i].str, + array[i].chr, (unsigned)array[i].max, (unsigned)array[i].off); return PR_FALSE; } - if( &array[i].str[ array[i].off ] != rv ) + if( &array[i].str[ array[i].off ] != rv) { - printf("FAIL %d: %s,%c/%lu -> 0x%x, not 0x%x+%lu\n", i, array[i].str, - array[i].chr, array[i].max, rv, array[i].str, array[i].off); + printf("FAIL %d: %s,%c/%u -> %p, not %p+%u\n", i, array[i].str, + array[i].chr, (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -1735,8 +1735,8 @@ + } +@@ -1702,19 +1702,19 @@ PRBool test_019(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s -> null, not +%lu\n", i, + printf("FAIL %d: %s,%s -> null, not +%u\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - array[i].off); + (unsigned)array[i].off); return PR_FALSE; } -@@ -1744,8 +1744,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - rv, array[i].str, array[i].off); + rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -1826,8 +1826,8 @@ + } +@@ -1793,19 +1793,19 @@ PRBool test_020(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s -> null, not +%lu\n", i, + printf("FAIL %d: %s,%s -> null, not +%u\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - array[i].off); + (unsigned)array[i].off); return PR_FALSE; } -@@ -1835,8 +1835,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - rv, array[i].str, array[i].off); + rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -1912,8 +1912,8 @@ + } +@@ -1879,10 +1879,10 @@ PRBool test_021(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i, + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - array[i].max, rv); + (unsigned)array[i].max, rv); return PR_FALSE; } -@@ -1923,8 +1923,8 @@ + } +@@ -1890,19 +1890,19 @@ PRBool test_021(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s/%lu -> null, not +%lu\n", i, + printf("FAIL %d: %s,%s/%u -> null, not +%u\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - array[i].max, array[i].off); + (unsigned)array[i].max, array[i].off); return PR_FALSE; } -@@ -1932,8 +1932,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - array[i].max, rv, array[i].str, array[i].off); + (unsigned)array[i].max, rv, array[i].str, array[i].off); return PR_FALSE; } -@@ -2018,8 +2018,8 @@ + } +@@ -1985,10 +1985,10 @@ PRBool test_022(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i, + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - array[i].max, rv); + (unsigned)array[i].max, rv); return PR_FALSE; } -@@ -2029,8 +2029,8 @@ + } +@@ -1996,19 +1996,19 @@ PRBool test_022(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s/%lu -> null, not +%lu\n", i, + printf("FAIL %d: %s,%s/%u -> null, not +%u\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - array[i].max, array[i].off); + (unsigned)array[i].max, array[i].off); return PR_FALSE; } -@@ -2038,8 +2038,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].chrs ? array[i].chrs : "(null)", - array[i].max, rv, array[i].str, array[i].off); + (unsigned)array[i].max, rv, array[i].str, array[i].off); return PR_FALSE; } -@@ -2137,8 +2137,8 @@ + } +@@ -2104,19 +2104,19 @@ PRBool test_023(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s -> null, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> null, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].str, array[i].off); + array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2146,8 +2146,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - rv, array[i].str, array[i].off); + rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2245,8 +2245,8 @@ + } +@@ -2212,19 +2212,19 @@ PRBool test_024(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s -> null, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> null, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].str, array[i].off); + array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2254,8 +2254,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - rv, array[i].str, array[i].off); + rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2364,8 +2364,8 @@ + } +@@ -2331,10 +2331,10 @@ PRBool test_025(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i, + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, rv); + (unsigned)array[i].max, rv); return PR_FALSE; } -@@ -2375,8 +2375,8 @@ + } +@@ -2342,19 +2342,19 @@ PRBool test_025(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s/%lu -> null, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> null, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, array[i].str, array[i].off); + (unsigned)array[i].max, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2384,8 +2384,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, rv, array[i].str, array[i].off); + (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2496,8 +2496,8 @@ + } +@@ -2463,10 +2463,10 @@ PRBool test_026(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i, + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, rv); + (unsigned)array[i].max, rv); return PR_FALSE; } -@@ -2507,8 +2507,8 @@ + } +@@ -2474,19 +2474,19 @@ PRBool test_026(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s/%lu -> null, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> null, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, array[i].str, array[i].off); + (unsigned)array[i].max, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2516,8 +2516,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, rv, array[i].str, array[i].off); + (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2615,8 +2615,8 @@ + } +@@ -2582,19 +2582,19 @@ PRBool test_027(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s -> null, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> null, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].str, array[i].off); + array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2624,8 +2624,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - rv, array[i].str, array[i].off); + rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2723,8 +2723,8 @@ + } +@@ -2690,19 +2690,19 @@ PRBool test_028(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s -> null, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> null, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].str, array[i].off); + array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2732,8 +2732,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - rv, array[i].str, array[i].off); + rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2842,8 +2842,8 @@ + } +@@ -2809,10 +2809,10 @@ PRBool test_029(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i, + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, rv); + (unsigned)array[i].max, rv); return PR_FALSE; } -@@ -2853,8 +2853,8 @@ + } +@@ -2820,19 +2820,19 @@ PRBool test_029(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s/%lu -> null, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> null, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, array[i].str, array[i].off); + (unsigned)array[i].max, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2862,8 +2862,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, rv, array[i].str, array[i].off); + (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2974,8 +2974,8 @@ + } +@@ -2941,10 +2941,10 @@ PRBool test_030(void) + { if( (char *)0 != rv ) { - printf("FAIL %d: %s,%s/%lu -> %.32s, not null\n", i, + printf("FAIL %d: %s,%s/%u -> %.32s, not null\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, rv); + (unsigned)array[i].max, rv); return PR_FALSE; } -@@ -2985,8 +2985,8 @@ + } +@@ -2952,19 +2952,19 @@ PRBool test_030(void) + { if( (char *)0 == rv ) { - printf("FAIL %d: %s,%s/%lu -> null, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> null, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, array[i].str, array[i].off); + (unsigned)array[i].max, array[i].str, (unsigned)array[i].off); return PR_FALSE; } -@@ -2994,8 +2994,8 @@ + if( &array[i].str[ array[i].off ] != rv ) { - printf("FAIL %d: %s,%s/%lu -> 0x%x, not 0x%x+%lu\n", i, + printf("FAIL %d: %s,%s/%u -> %p, not %p+%u\n", i, array[i].str ? array[i].str : "(null)", array[i].sub ? array[i].sub : "(null)", - array[i].max, rv, array[i].str, array[i].off); + (unsigned)array[i].max, rv, array[i].str, (unsigned)array[i].off); return PR_FALSE; } ---- ../lib/tests/arena.c Sun Apr 25 11:00:46 2004 -+++ ../lib/tests/arena.c Mon Jul 25 19:52:15 2005 -@@ -69,4 +69,5 @@ - } - -+#if 0 - /* - ** Test Arena allocation. -@@ -129,4 +130,5 @@ - return; - } /* end ArenaGrow() */ -+#endif - - ---- ../lib/tests/base64t.c Sun Apr 25 11:00:46 2004 -+++ ../lib/tests/base64t.c Mon Jul 25 20:16:54 2005 -@@ -2020,5 +2020,4 @@ - { - PRUint32 plen = PL_strlen(array[i].plaintext); -- PRUint32 clen = ((plen + 2)/3)*4; - - char *rv = PL_Base64Encode(array[i].plaintext, plen, (char *)0); -@@ -2780,7 +2779,4 @@ - for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) - { -- PRUint32 plen = PL_strlen(array[i].plaintext); -- PRUint32 clen = ((plen + 2)/3)*4; -- - char *rv = PL_Base64Encode(array[i].plaintext, 0, (char *)0); - -@@ -2916,6 +2912,4 @@ - for( i = 0; i < sizeof(array)/sizeof(array[0]); i++ ) - { -- PRUint32 clen = PL_strlen(array[i].cyphertext); -- - char *rv = PL_Base64Decode(array[i].cyphertext, 0, (char *)0); - + } Index: head/devel/nspr/files/patch-tests =================================================================== --- head/devel/nspr/files/patch-tests (revision 402127) +++ head/devel/nspr/files/patch-tests (revision 402128) @@ -1,2058 +1,2482 @@ ---- ../pr/tests/cleanup.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/cleanup.c Tue Jul 12 01:19:53 2005 -@@ -48,5 +48,5 @@ +--- lib/tests/Makefile.in.orig 2015-10-16 13:22:19 UTC ++++ lib/tests/Makefile.in +@@ -167,7 +167,7 @@ else + ifeq ($(OS_ARCH),OS2) + $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) + else +- $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(EXTRA_LIBS) -o $@ ++ $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) -o $@ + endif + endif + endif +--- pr/tests/Makefile.in.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/Makefile.in +@@ -489,17 +489,18 @@ endif + ALWAYS: + + runtests:: $(PROGS) ALWAYS +- @$(ECHO) "\nNSPR Test Results - $(OBJDIR)\n" +- @$(ECHO) "BEGIN\t\t\t`date`" +- @$(ECHO) "NSPR_TEST_LOGFILE\t$(LOGFILE)\n" +- @$(ECHO) "Test\t\t\tResult\n" ++ @$(ECHO) "NSPR Test Results - $(OBJDIR)" ++ @$(ECHO) "BEGIN `date`" ++ @$(ECHO) "Test Result" + @cd $(OBJDIR); for i in $(PROGRAMS); do \ +- $(ECHO) "$$i\c"; \ +- ./$$i >> $(LOGFILE) 2>&1 ; \ ++ printf "$$i"; \ ++ ./$$i > $$i.output 2>&1; \ + if [ 0 = $$? ] ; then \ +- $(ECHO) "\t\t\tPassed"; \ +- else \ +- $(ECHO) "\t\t\tFAILED"; \ +- fi; \ ++ $(ECHO) " Passed"; \ ++ rm $$i.output; \ ++ else \ ++ $(ECHO) " FAILED"; \ ++ cat $$i.output; \ ++ fi; \ + done +- @$(ECHO) "\nEND\t\t`date`\n" ++ @$(ECHO) "END `date`" +--- pr/tests/cleanup.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/cleanup.c +@@ -15,7 +15,7 @@ + static void PR_CALLBACK Thread(void *sleep) { - PR_Sleep(PR_SecondsToInterval((PRUint32)sleep)); + PR_Sleep(PR_SecondsToInterval((intptr_t)sleep)); printf("Thread exiting\n"); } -@@ -72,5 +72,6 @@ + +@@ -39,7 +39,8 @@ int main(int argc, char **argv) + PRThreadScope type = PR_LOCAL_THREAD; PRFileDesc *err = PR_GetSpecialFD(PR_StandardError); PLOptState *opt = PL_CreateOptState(argc, argv, "Ghs:S:t:cC:"); - PRIntn concurrency = 1, child_sleep = 10, main_sleep = 5, threads = 1; + PRIntn concurrency = 1, main_sleep = 5, threads = 1; + intptr_t child_sleep = 10; PR_STDIO_INIT(); -@@ -113,5 +114,5 @@ + while (PL_OPT_EOL != (os = PL_GetNextOpt(opt))) +@@ -80,7 +81,7 @@ int main(int argc, char **argv) + (PR_LOCAL_THREAD == type) ? "LOCAL" : "GLOBAL"); PR_fprintf(err, "\tConcurrency: %d\n", concurrency); PR_fprintf(err, "\tNumber of threads: %d\n", threads); - PR_fprintf(err, "\tThread sleep: %d\n", child_sleep); + PR_fprintf(err, "\tThread sleep: %d\n", (int)child_sleep); PR_fprintf(err, "\tMain sleep: %d\n", main_sleep); PR_fprintf(err, "\tCleanup will %sbe called\n\n", (cleanup) ? "" : "NOT "); ---- ../pr/tests/cvar.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/cvar.c Tue Jul 12 01:22:52 2005 -@@ -174,5 +174,5 @@ + +--- pr/tests/cltsrv.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/cltsrv.c +@@ -887,7 +887,7 @@ int main(int argc, char** argv) { + PRUintn index; + PRBool boolean; +- CSClient_t *client; ++ CSClient_t *client = NULL; + PRStatus rv, joinStatus; + CSServer_t *server = NULL; + +--- pr/tests/cvar.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/cvar.c +@@ -135,14 +135,14 @@ static int alive; + static void PR_CALLBACK CXReader(void *arg) + { CircBuf *cbp = (CircBuf *)arg; - PRInt32 i, n; + intptr_t i, n; void *data; -@@ -180,6 +180,6 @@ + n = count / 2; for (i = 0; i < n; i++) { data = GetCBData(cbp); - if ((int)data != i) - if (debug_mode) printf("data mismatch at for i = %d usec\n", i); + if ((intptr_t)data != i) + if (debug_mode) printf("data mismatch at for i = %ld usec\n", (long)i); } -@@ -193,5 +193,5 @@ + PR_EnterMonitor(mon); +@@ -154,7 +154,7 @@ static void PR_CALLBACK CXReader(void *a + static void PR_CALLBACK CXWriter(void *arg) { CircBuf *cbp = (CircBuf *)arg; - PRInt32 i, n; + intptr_t i, n; n = count / 2; ---- ../pr/tests/foreign.c Mon Mar 7 20:22:57 2005 -+++ ../pr/tests/foreign.c Tue Jul 12 01:25:31 2005 -@@ -269,5 +269,5 @@ + for (i = 0; i < n; i++) +--- pr/tests/cvar2.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/cvar2.c +@@ -95,7 +95,7 @@ PrivateCondVarThread(void *_info) + for (index=0; indexloops; index++) { + PR_Lock(info->lock); + if (*info->tcount == 0) { +- DPRINTF(("PrivateCondVarThread: thread 0x%lx waiting on cvar = 0x%lx\n", ++ DPRINTF(("PrivateCondVarThread: thread %p waiting on cvar = %p\n", + PR_GetCurrentThread(), info->cvar)); + PR_WaitCondVar(info->cvar, info->timeout); + } +@@ -108,8 +108,8 @@ PrivateCondVarThread(void *_info) + PR_Lock(info->exitlock); + (*info->exitcount)++; + PR_NotifyCondVar(info->exitcvar); +-DPRINTF(("PrivateCondVarThread: thread 0x%lx notified exitcvar = 0x%lx cnt = %ld\n", +- PR_GetCurrentThread(), info->exitcvar,(*info->exitcount))); ++DPRINTF(("PrivateCondVarThread: thread %p notified exitcvar = %p cnt = %d\n", ++ PR_GetCurrentThread(), info->exitcvar,(int)(*info->exitcount))); + PR_Unlock(info->exitlock); + } + #if 0 +@@ -157,7 +157,7 @@ CreateTestThread(threadinfo *info, + void + CondVarTestSUU(void *_arg) + { +- PRInt32 arg = (PRInt32)_arg; ++ PRInt32 arg = (PRInt32)(intptr_t)_arg; + PRInt32 index, loops; + threadinfo *list; + PRLock *sharedlock; +@@ -189,7 +189,7 @@ CondVarTestSUU(void *_arg) + PR_TRUE, + PR_LOCAL_THREAD); + index++; +- DPRINTF(("CondVarTestSUU: created thread 0x%lx\n",list[index].thread)); ++ DPRINTF(("CondVarTestSUU: created thread %p\n",list[index].thread)); + } + + for (loops = 0; loops < count; loops++) { +@@ -199,7 +199,7 @@ CondVarTestSUU(void *_arg) + (*list[index].tcount)++; + PR_NotifyCondVar(list[index].cvar); + PR_Unlock(list[index].lock); +- DPRINTF(("PrivateCondVarThread: thread 0x%lx notified cvar = 0x%lx\n", ++ DPRINTF(("PrivateCondVarThread: thread %p notified cvar = %p\n", + PR_GetCurrentThread(), list[index].cvar)); + } + +@@ -227,7 +227,7 @@ CondVarTestSUU(void *_arg) + void + CondVarTestSUK(void *_arg) + { +- PRInt32 arg = (PRInt32)_arg; ++ PRInt32 arg = (PRInt32)(intptr_t)_arg; + PRInt32 index, loops; + threadinfo *list; + PRLock *sharedlock; +@@ -301,7 +301,7 @@ CondVarTestSUK(void *_arg) + void + CondVarTestPUU(void *_arg) + { +- PRInt32 arg = (PRInt32)_arg; ++ PRInt32 arg = (PRInt32)(intptr_t)_arg; + PRInt32 index, loops; + threadinfo *list; + PRLock *sharedlock; +@@ -336,7 +336,7 @@ CondVarTestPUU(void *_arg) + PR_FALSE, + PR_LOCAL_THREAD); + +- DPRINTF(("CondVarTestPUU: created thread 0x%lx\n",list[index].thread)); ++ DPRINTF(("CondVarTestPUU: created thread %p\n",list[index].thread)); + index++; + tcount++; + } +@@ -354,8 +354,8 @@ CondVarTestPUU(void *_arg) + PR_Lock(exitlock); + /* Wait for threads to finish */ + while(exitcount < arg) { +-DPRINTF(("CondVarTestPUU: thread 0x%lx waiting on exitcvar = 0x%lx cnt = %ld\n", +- PR_GetCurrentThread(), exitcvar, exitcount)); ++DPRINTF(("CondVarTestPUU: thread %p waiting on exitcvar = %p cnt = %d\n", ++ PR_GetCurrentThread(), exitcvar, (int)exitcount)); + PR_WaitCondVar(exitcvar, PR_SecondsToInterval(60)); + } + PR_ASSERT(exitcount >= arg); +@@ -365,7 +365,7 @@ DPRINTF(("CondVarTestPUU: thread 0x%lx w + + /* Join all the threads */ + for(index=0; index<(arg); index++) { +- DPRINTF(("CondVarTestPUU: joining thread 0x%lx\n",list[index].thread)); ++ DPRINTF(("CondVarTestPUU: joining thread %p\n",list[index].thread)); + PR_JoinThread(list[index].thread); + if (list[index].internal) { + PR_Lock(list[index].lock); +@@ -387,7 +387,7 @@ DPRINTF(("CondVarTestPUU: thread 0x%lx w + void + CondVarTestPUK(void *_arg) + { +- PRInt32 arg = (PRInt32)_arg; ++ PRInt32 arg = (PRInt32)(intptr_t)_arg; + PRInt32 index, loops; + threadinfo *list; + PRLock *sharedlock; +@@ -468,7 +468,7 @@ CondVarTestPUK(void *_arg) + void + CondVarTest(void *_arg) + { +- PRInt32 arg = (PRInt32)_arg; ++ PRInt32 arg = (PRInt32)(intptr_t)_arg; + PRInt32 index, loops; + threadinfo *list; + PRLock *sharedlock; +@@ -601,7 +601,7 @@ CondVarTest(void *_arg) + void + CondVarTimeoutTest(void *_arg) + { +- PRInt32 arg = (PRInt32)_arg; ++ PRInt32 arg = (PRInt32)(intptr_t)_arg; + PRInt32 index, loops; + threadinfo *list; + PRLock *sharedlock; +@@ -712,7 +712,7 @@ CondVarTimeoutTest(void *_arg) + void + CondVarMixedTest(void *_arg) + { +- PRInt32 arg = (PRInt32)_arg; ++ PRInt32 arg = (PRInt32)(intptr_t)_arg; + PRInt32 index, loops; + threadinfo *list; + PRLock *sharedlock; +@@ -802,7 +802,7 @@ CondVarMixedTest(void *_arg) + for(index=0; index<(arg*4); index+=3) { + + PR_Lock(list[index].lock); +- *list[index].tcount++; ++ list[index].tcount++; + PR_NotifyCondVar(list[index].cvar); + PR_Unlock(list[index].lock); + +@@ -873,7 +873,7 @@ static void Measure(void (*func)(void *) + double d; + + start = PR_IntervalNow(); +- (*func)((void *)arg); ++ (*func)((void *)(intptr_t)arg); + stop = PR_IntervalNow(); + + d = (double)PR_IntervalToMicroseconds(stop - start); +@@ -932,7 +932,7 @@ default_threads, default_threads*2, defa + PR_SetConcurrency(2); + + for (threads = default_threads; threads < default_threads*5; threads+=default_threads) { +- printf("\n%ld Thread tests\n", threads); ++ printf("\n%d Thread tests\n", (int)threads); + Measure(CondVarTestSUU, threads, "Condvar simple test shared UU"); + Measure(CondVarTestSUK, threads, "Condvar simple test shared UK"); + Measure(CondVarTestPUU, threads, "Condvar simple test priv UU"); +--- pr/tests/foreign.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/foreign.c +@@ -202,7 +202,7 @@ static void OneShot(void *arg) + PRFileDesc *fd; PRDir *dir; PRFileDesc *pair[2]; - PRIntn test = (PRIntn)arg; + intptr_t test = (intptr_t)arg; for (test = 0; test < 12; ++test) { -@@ -364,5 +364,5 @@ + +@@ -302,7 +302,7 @@ static void OneShot(void *arg) + int main(int argc, char **argv) { PRStatus rv; - PRInt32 thread_cnt = DEFAULT_THREAD_COUNT; + intptr_t thread_cnt = DEFAULT_THREAD_COUNT; PLOptStatus os; PLOptState *opt = PL_CreateOptState(argc, argv, "dt:"); ---- ../pr/tests/forktest.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/forktest.c Tue Jul 12 01:28:15 2005 -@@ -80,5 +80,5 @@ + +--- pr/tests/forktest.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/forktest.c +@@ -47,7 +47,7 @@ ClientThreadFunc(void *arg) + { PRNetAddr addr; PRFileDesc *sock = NULL; - PRInt32 tmp = (PRInt32)arg; + intptr_t tmp = (intptr_t)arg; /* -@@ -176,5 +176,5 @@ + * Make sure the PR_Accept call will block +@@ -143,7 +143,7 @@ DoIO(void) + goto finish; } clientThread = PR_CreateThread( PR_USER_THREAD, ClientThreadFunc, - (void *) PR_ntohs(addr.inet.port), PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, + (void *)(intptr_t)PR_ntohs(addr.inet.port), PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, PR_JOINABLE_THREAD, 0); if (clientThread == NULL) { -@@ -185,2 +185,5 @@ + fprintf(stderr, "Cannot create client thread: (%d, %d)\n", +@@ -151,6 +151,9 @@ DoIO(void) + failed_already = 1; + goto finish; } + printf("Wait one second before accept\n"); + fflush(stdout); + PR_Sleep(PR_SecondsToInterval(1)); printf("Accepting connection at port %hu\n", PR_ntohs(addr.inet.port)); ---- ../pr/tests/mbcs.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/mbcs.c Tue Jul 12 01:34:26 2005 -@@ -87,5 +87,5 @@ - ** Traverse directory - */ --static void TraverseDirectory( unsigned char *dir ) -+static void TraverseDirectory(const char *dir) - { - PRDir *cwd; -@@ -93,5 +93,4 @@ - PRFileInfo info; - PRStatus rc; -- PRInt32 err; - PRFileDesc *fd; - char nextDir[256]; -@@ -114,14 +114,14 @@ - } - if ( PR_FILE_FILE == info.type ) { -- printf("File: %s \tsize: %ld\n", dirEntry->name, info.size ); -+ printf("File: %s \tsize: %ld\n", dirEntry->name, (long)info.size ); - fd = PR_Open( file, PR_RDONLY, 0 ); - if ( NULL == fd ) { - printf("PR_Open() failed. Error: %ld, OSError: %ld\n", -- PR_GetError(), PR_GetOSError()); -+ (long)PR_GetError(), (long)PR_GetOSError()); - } - rc = PR_Close( fd ); - if ( PR_FAILURE == rc ) { - printf("PR_Close() failed. Error: %ld, OSError: %ld\n", -- PR_GetError(), PR_GetOSError()); -+ (long)PR_GetError(), (long)PR_GetOSError()); - } - } else if ( PR_FILE_DIRECTORY == info.type ) { ---- ../pr/tests/nonblock.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/nonblock.c Tue Jul 12 01:37:52 2005 -@@ -84,5 +84,5 @@ - clientThreadFunc(void *arg) - { -- PRUintn port = (PRUintn)arg; -+ intptr_t port = (intptr_t)arg; - PRFileDesc *sock; - PRNetAddr addr; -@@ -196,5 +196,5 @@ - - clientThread = PR_CreateThread(PR_USER_THREAD, -- clientThreadFunc, (void *) listenPort, -+ clientThreadFunc, (void *) (intptr_t)listenPort, - PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, - PR_UNJOINABLE_THREAD, 0); -@@ -240,5 +240,5 @@ - PL_PrintError("First Receive:\n"); - fprintf(stderr, "First PR_Recv: retVal: %ld, Error: %ld\n", -- retVal, PR_GetError()); -+ (long)retVal, (long)PR_GetError()); - exit(1); - } -@@ -250,5 +250,5 @@ - PL_PrintError("Second Receive:\n"); - fprintf(stderr, "Second PR_Recv: retVal: %ld, Error: %ld\n", -- retVal, PR_GetError()); -+ (long)retVal, (long)PR_GetError()); - exit(1); - } ---- ../pr/tests/peek.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/peek.c Tue Jul 12 01:41:44 2005 -@@ -168,5 +168,5 @@ - PRFileDesc *sock; - PRSocketOptionData opt; -- PRUint16 port = (PRUint16) arg; -+ PRUint16 port = (intptr_t) arg; - PRNetAddr addr; - char buf[BUFFER_SIZE]; -@@ -332,5 +332,5 @@ - } - client = PR_CreateThread( -- PR_USER_THREAD, ClientNB, (void *) port, -+ PR_USER_THREAD, ClientNB, (void *)(intptr_t) port, - PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0); - if (NULL == client) { ---- ../pr/tests/pipepong.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/pipepong.c Tue Jul 12 01:43:52 2005 -@@ -69,5 +69,5 @@ - fprintf(stderr, "pong process: received \"%s\"\n", buf); - if (nBytes != 5) { -- fprintf(stderr, "pong process: expected 5 bytes but got %d bytes\n", -+ fprintf(stderr, "pong process: expected 5 bytes but got %zd bytes\n", - nBytes); - exit(1); ---- ../pr/tests/poll_nm.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/poll_nm.c Tue Jul 12 01:45:57 2005 -@@ -97,5 +97,5 @@ - clientThreadFunc(void *arg) - { -- PRUintn port = (PRUintn) arg; -+ PRUintn port = (intptr_t) arg; - PRFileDesc *sock; - PRNetAddr addr; -@@ -251,5 +251,5 @@ - - clientThread = PR_CreateThread(PR_USER_THREAD, -- clientThreadFunc, (void *) listenPort1, -+ clientThreadFunc, (void *)(intptr_t)listenPort1, - PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, - PR_UNJOINABLE_THREAD, 0); -@@ -261,5 +261,5 @@ - - clientThread = PR_CreateThread(PR_USER_THREAD, -- clientThreadFunc, (void *) listenPort2, -+ clientThreadFunc, (void *)(intptr_t)listenPort2, - PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, - PR_UNJOINABLE_THREAD, 0); ---- ../lib/tests/Makefile.in Sun Nov 7 21:52:55 2004 -+++ ../lib/tests/Makefile.in Tue Jul 12 01:49:15 2005 -@@ -247,5 +247,5 @@ - $(LINK) $(EXEFLAGS) $(LDOPTS) $< $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) - else -- $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(EXTRA_LIBS) -o $@ -+ $(CC) $(XCFLAGS) $< $(LDOPTS) $(LIBPLC) $(LIBPLDS) $(LIBPR) $(OS_LIBS) $(EXTRA_LIBS) -o $@ - endif - endif ---- ../pr/tests/getai.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/getai.c Tue Jul 12 02:20:40 2005 -@@ -46,6 +46,11 @@ + fflush(stdout); + sock = PR_Accept(listenSock, &addr, PR_SecondsToInterval(5)); +--- pr/tests/getai.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/getai.c +@@ -13,8 +13,13 @@ int main(int argc, char **argv) + PRAddrInfo *ai; void *iter; PRNetAddr addr; + const char *host; - ai = PR_GetAddrInfoByName(argv[1], PR_AF_UNSPEC, PR_AI_ADDRCONFIG); + if (argc > 1) + host = argv[1]; + else + host = "www.FreeBSD.org"; + ai = PR_GetAddrInfoByName(host, PR_AF_UNSPEC, PR_AI_ADDRCONFIG); if (ai == NULL) { fprintf(stderr, "PR_GetAddrInfoByName failed: (%d, %d)\n", ---- ../pr/tests/Makefile.in Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/Makefile.in Tue Jul 12 02:25:18 2005 -@@ -556,16 +557,17 @@ + PR_GetError(), PR_GetOSError()); +--- pr/tests/instrumt.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/instrumt.c +@@ -36,6 +36,7 @@ + */ - runtests:: $(PROGS) ALWAYS -- @$(ECHO) "\nNSPR Test Results - $(OBJDIR)\n" -- @$(ECHO) "BEGIN\t\t\t`date`" -- @$(ECHO) "NSPR_TEST_LOGFILE\t$(LOGFILE)\n" -- @$(ECHO) "Test\t\t\tResult\n" -+ @$(ECHO) "NSPR Test Results - $(OBJDIR)" -+ @$(ECHO) "BEGIN `date`" -+ @$(ECHO) "Test Result" - @cd $(OBJDIR); for i in $(PROGRAMS); do \ -- $(ECHO) "$$i\c"; \ -- ./$$i >> $(LOGFILE) 2>&1 ; \ -+ printf "$$i"; \ -+ ./$$i > $$i.output 2>&1; \ - if [ 0 = $$? ] ; then \ -- $(ECHO) "\t\t\tPassed"; \ -- else \ -- $(ECHO) "\t\t\tFAILED"; \ -- fi; \ -+ $(ECHO) " Passed"; \ -+ rm $$i.output; \ -+ else \ -+ $(ECHO) " FAILED"; \ -+ cat $$i.output; \ -+ fi; \ - done -- @$(ECHO) "\nEND\t\t`date`\n" -+ @$(ECHO) "END `date`" ---- ../pr/tests/instrumt.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/instrumt.c Mon Jul 25 20:45:54 2005 -@@ -69,4 +69,5 @@ - #include +#define DEBUG #include #include -@@ -83,5 +84,4 @@ + #include +@@ -50,7 +51,6 @@ + #define COUNT_LIMIT (10 * ( 1024)) #define SMALL_TRACE_BUFSIZE ( 60 * 1024 ) - typedef enum { -@@ -111,8 +111,8 @@ + CountLoop = 1, +@@ -78,10 +78,10 @@ static void Help(void) + static void ListCounters(void) { +#if defined(DEBUG) || defined(FORCE_NSPR_COUNTERS) PR_DEFINE_COUNTER( qh ); PR_DEFINE_COUNTER( rh ); const char *qn, *rn, *dn; - const char **qname = &qn, **rname = &rn, **desc = &dn; PRUint32 tCtr; -@@ -125,6 +125,6 @@ + PR_INIT_COUNTER_HANDLE( qh, NULL ); +@@ -92,7 +92,7 @@ static void ListCounters(void) + PR_FIND_NEXT_COUNTER_RNAME(rh, rh, qh ); while ( rh != NULL ) { - PR_GET_COUNTER_NAME_FROM_HANDLE( rh, qname, rname, desc ); + PR_GET_COUNTER_NAME_FROM_HANDLE( rh, &qn, &rn, &dn ); PR_GET_COUNTER(tCtr, rh); PR_LOG( lm, msgLevel, ( "QName: %s RName: %s Desc: %s Value: %ld\n", -@@ -134,13 +134,13 @@ +@@ -101,15 +101,15 @@ static void ListCounters(void) + } PR_FIND_NEXT_COUNTER_QNAME(qh, qh); } - return; +#endif } /* end ListCounters() */ static void ListTraces(void) { +#if defined(DEBUG) || defined(FORCE_NSPR_TRACE) PR_DEFINE_TRACE( qh ); PR_DEFINE_TRACE( rh ); const char *qn, *rn, *dn; - const char **qname = &qn, **rname = &rn, **desc = &dn; PR_INIT_TRACE_HANDLE( qh, NULL ); -@@ -152,5 +152,5 @@ + PR_FIND_NEXT_TRACE_QNAME(qh, qh ); +@@ -119,7 +119,7 @@ static void ListTraces(void) + PR_FIND_NEXT_TRACE_RNAME(rh, rh, qh ); while ( rh != NULL ) { - PR_GET_TRACE_NAME_FROM_HANDLE( rh, qname, rname, desc ); + PR_GET_TRACE_NAME_FROM_HANDLE( rh, &qn, &rn, &dn ); PR_LOG( lm, msgLevel, ( "QName: %s RName: %s Desc: %s", -@@ -160,5 +160,5 @@ + qn, rn, dn )); +@@ -127,7 +127,7 @@ static void ListTraces(void) + } PR_FIND_NEXT_TRACE_QNAME(qh, qh); } - return; +#endif } /* end ListCounters() */ -@@ -359,5 +359,5 @@ + +@@ -326,7 +326,7 @@ static void PR_CALLBACK SampleTrace( voi + */ static void TraceTest( void ) { - PRInt32 i; + PRIntn i = 0; PRInt32 size; PR_DEFINE_TRACE( th ); ---- ../pr/tests/layer.c Fri Apr 29 18:46:05 2005 -+++ ../pr/tests/layer.c Mon Jul 25 20:53:03 2005 -@@ -78,5 +78,8 @@ + PRThread *t1, *t2; +--- pr/tests/io_timeout.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/io_timeout.c +@@ -22,11 +22,13 @@ + /* Used to get the command line option */ + #include "plgetopt.h" + ++#include + #include ++#include + #include "nspr.h" + + #define NUM_THREADS 1 +-#define BASE_PORT 8000 ++#define BASE_PORT 38011 + #define DEFAULT_ACCEPT_TIMEOUT 2 + + typedef struct threadInfo { +@@ -38,7 +40,7 @@ typedef struct threadInfo { + } threadInfo; + + PRIntn failed_already = 0; +-PRIntn debug_mode = 0; ++PRIntn debug_mode = 1; + + #define LOCAL_SCOPE_STRING "LOCAL scope" + #define GLOBAL_SCOPE_STRING "GLOBAL scope" +@@ -54,7 +56,7 @@ thread_main(void *_info) + PRFileDesc *clientSock; + PRStatus rv; + PRThreadScope tscope; +- char *scope_str; ++ const char *scope_str; + + + if (debug_mode) +@@ -73,6 +75,7 @@ thread_main(void *_info) + break; + default: + PR_NOT_REACHED("Invalid thread scope"); ++ scope_str = NULL; + break; + } + printf("thread id %d, scope %s\n", info->id, scope_str); +@@ -91,7 +94,12 @@ thread_main(void *_info) + rv = PR_Bind(listenSock, &listenAddr); + if (rv == PR_FAILURE) { + if (debug_mode) +- printf("unable to bind\n"); ++ printf("unable to bind to %d: %s\n", ++ BASE_PORT + info->id, strerror(PR_GetOSError())); ++ if (PR_GetOSError() == EADDRINUSE) { ++ printf("can not proceed with this test\n"); ++ exit(0); ++ } + failed_already=1; + goto dead; + } +@@ -113,8 +121,9 @@ thread_main(void *_info) + if (clientSock == NULL) { + if (PR_GetError() == PR_IO_TIMEOUT_ERROR) { + if (debug_mode) { +- printf("PR_Accept() timeout worked!\n"); +- printf("TEST PASSED! PR_Accept() returned error %d\n", ++ printf("PR_Accept() timeout worked!\n" ++ "TEST PASSED! PR_Accept() returned error " ++ "PR_IO_TIMEOUT_ERROR (%ld)\n", + PR_IO_TIMEOUT_ERROR); + } + } else { +--- pr/tests/layer.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/layer.c +@@ -45,7 +45,10 @@ static PRUint16 default_port = 12273; + static PRFileDesc *PushLayer(PRFileDesc *stack) { PRFileDesc *layer = PR_CreateIOLayerStub(identity, &myMethods); - PRStatus rv = PR_PushIOLayer(stack, PR_GetLayersIdentity(stack), layer); +#if defined(DEBUG) || defined(FORCE_PR_ASSERT) + PRStatus rv = /* we only need rv for PR_ASSERT() */ +#endif + PR_PushIOLayer(stack, PR_GetLayersIdentity(stack), layer); if (verbosity > quiet) PR_fprintf(logFile, "Pushed layer(0x%x) onto stack(0x%x)\n", layer, stack); ---- ../pr/tests/lazyinit.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/lazyinit.c Mon Jul 25 20:54:18 2005 -@@ -76,5 +76,4 @@ + PR_ASSERT(PR_SUCCESS == rv); +--- pr/tests/lazyinit.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/lazyinit.c +@@ -43,7 +43,6 @@ int main(int argc, char **argv) + char *path = NULL; PRDir *dir = NULL; PRLock *ml = NULL; - PRCondVar *cv = NULL; PRThread *thread = NULL; PRIntervalTime interval = 0; ---- ../pr/tests/lltest.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/lltest.c Mon Jul 25 20:57:30 2005 -@@ -578,4 +578,5 @@ + PRFileDesc *file, *udp, *tcp, *pair[2]; +--- pr/tests/lltest.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/lltest.c +@@ -545,6 +545,7 @@ TestConversion( void ) + return; } +#if 0 static void ShiftCompileOnly() { -@@ -594,4 +595,5 @@ + /* +@@ -561,6 +562,7 @@ static void ShiftCompileOnly() + LL_ISHL(ia, 49, 32); } /* ShiftCompileOnly */ +#endif -@@ -668,5 +670,4 @@ + /* +@@ -635,7 +637,6 @@ TestArithmetic( void ) + PRInt64 largeValPlusOne = LL_INIT( 0x00000002, 0x00000000 ); PRInt64 largeValTimesTwo = LL_INIT( 0x00000003, 0xfffffffe ); PRInt64 largeMultCand = LL_INIT( 0x00000000, 0x7fffffff ); - PRInt64 largeMinusMultCand = LL_INIT( 0xffffffff, 0x10000001 ); PRInt64 largeMultCandx64K = LL_INIT( 0x00007fff, 0xffff0000 ); PRInt64 largeNumSHL5 = LL_INIT( 0x0000001f, 0xffffffe0 ); ---- ../pr/tests/nbconn.c Fri Apr 29 18:46:05 2005 -+++ ../pr/tests/nbconn.c Mon Jul 25 21:00:51 2005 -@@ -93,6 +93,5 @@ + PRInt64 result, result2; +--- pr/tests/mbcs.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/mbcs.c +@@ -54,13 +54,12 @@ char *dirName = NULL; /* directory nam + /* + ** Traverse directory + */ +-static void TraverseDirectory( unsigned char *dir ) ++static void TraverseDirectory(const char *dir) + { + PRDir *cwd; + PRDirEntry *dirEntry; + PRFileInfo info; + PRStatus rc; +- PRInt32 err; + PRFileDesc *fd; + char nextDir[256]; + char file[256]; +@@ -81,16 +80,16 @@ static void TraverseDirectory( unsigned + exit(1); + } + if ( PR_FILE_FILE == info.type ) { +- printf("File: %s \tsize: %ld\n", dirEntry->name, info.size ); ++ printf("File: %s \tsize: %ld\n", dirEntry->name, (long)info.size ); + fd = PR_Open( file, PR_RDONLY, 0 ); + if ( NULL == fd ) { + printf("PR_Open() failed. Error: %ld, OSError: %ld\n", +- PR_GetError(), PR_GetOSError()); ++ (long)PR_GetError(), (long)PR_GetOSError()); + } + rc = PR_Close( fd ); + if ( PR_FAILURE == rc ) { + printf("PR_Close() failed. Error: %ld, OSError: %ld\n", +- PR_GetError(), PR_GetOSError()); ++ (long)PR_GetError(), (long)PR_GetOSError()); + } + } else if ( PR_FILE_DIRECTORY == info.type ) { + sprintf( nextDir, "%s/%s", dir, dirEntry->name ); +--- pr/tests/nbconn.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/nbconn.c +@@ -54,8 +54,7 @@ int main(int argc, char **argv) + PRStatus rv; PRSocketOptionData optData; const char *hostname = NULL; - PRIntn default_case, n, bytes_read, bytes_sent; - PRInt32 failed_already = 0; + PRIntn default_case, n; - #ifdef XP_MAC - int index; -@@ -226,5 +225,5 @@ + + /* + * -d debug mode +@@ -164,7 +163,7 @@ int main(int argc, char **argv) + exit(1); } printf( "PR_GetConnectStatus: connect failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); } PR_Close(sock); -@@ -300,5 +299,5 @@ + printf( "PASS\n"); +@@ -235,7 +234,7 @@ connection_success_test() + PRThread *thr = NULL; Server_Param sp; char send_buf[DATA_BUF_SIZE], recv_buf[DATA_BUF_SIZE]; - PRIntn default_case, n, bytes_read, bytes_sent; + PRIntn n, bytes_read, bytes_sent; PRIntn failed_already = 0; -@@ -376,5 +375,5 @@ + /* +@@ -311,7 +310,7 @@ connection_success_test() + failed_already=1; goto def_exit; } - DPRINTF(("Created TCP_Server thread [0x%x]\n",thr)); + DPRINTF(("Created TCP_Server thread [%p]\n", thr)); pd.fd = conn_fd; pd.in_flags = PR_POLL_WRITE | PR_POLL_EXCEPT; -@@ -459,5 +458,5 @@ + n = PR_Poll(&pd, 1, PR_INTERVAL_NO_TIMEOUT); +@@ -390,7 +389,7 @@ connection_success_test() + DPRINTF(("Data integrity verified\n")); } else { fprintf(stderr,"PR_GetConnectStatus: connect failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already = 1; goto def_exit; -@@ -569,5 +568,4 @@ } +@@ -496,7 +495,6 @@ connection_failure_test() + goto def_exit; + } if (PR_GetConnectStatus(&pd) == PR_SUCCESS) { - PRInt32 rv; fprintf(stderr,"PR_GetConnectStatus succeeded, expected to fail\n"); failed_already = 1; ---- ../pr/tests/nblayer.c 2009-02-23 00:00:44.000000000 -0500 -+++ ../pr/tests/nblayer.c 2009-11-04 16:22:00.000000000 -0500 -@@ -332,5 +332,5 @@ + goto def_exit; +--- pr/tests/nblayer.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/nblayer.c +@@ -299,7 +299,7 @@ static PRStatus PR_CALLBACK MyClose(PRFi + static PRInt16 PR_CALLBACK MyPoll( PRFileDesc *fd, PRInt16 in_flags, PRInt16 *out_flags) { - PRInt16 my_flags, new_flags; + PRInt16 my_flags = -1, new_flags; PRFilePrivate *mine = (PRFilePrivate*)fd->secret; if (0 != (PR_POLL_READ & in_flags)) -@@ -375,5 +375,5 @@ + { +@@ -342,7 +342,7 @@ static PRFileDesc * PR_CALLBACK MyAccept + PRFileDesc *fd, PRNetAddr *addr, PRIntervalTime timeout) { PRStatus rv; - PRFileDesc *newfd, *layer = fd; + PRFileDesc *newfd; PRFileDesc *newstack; PRFilePrivate *newsecret; -@@ -461,4 +461,6 @@ + +@@ -428,6 +428,8 @@ static PRInt32 PR_CALLBACK MyRecv( + mine->rcvinprogress = 0; return mine->rcvreq; /* << -- that's it! */ default: + PR_ASSERT(!"How did I get this mine->rcvstate?"); + rv = -1; break; } -@@ -517,4 +517,6 @@ + } while (-1 != rv); +@@ -484,6 +486,8 @@ static PRInt32 PR_CALLBACK MySend( + mine->xmtinprogress = 0; return mine->xmtreq; /* <<-- That's the one! */ default: + PR_ASSERT(!"How did I get this mine->xmtstate?"); + rv = -1; break; } ---- ../pr/tests/obsints.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/obsints.c Mon Jul 25 21:04:56 2005 -@@ -58,4 +58,7 @@ + } while (-1 != rv); +--- pr/tests/nonblock.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/nonblock.c +@@ -39,7 +39,7 @@ + static void PR_CALLBACK + clientThreadFunc(void *arg) + { +- PRUintn port = (PRUintn)arg; ++ intptr_t port = (intptr_t)arg; + PRFileDesc *sock; + PRNetAddr addr; + char buf[CHUNK_SIZE]; +@@ -147,7 +147,7 @@ static PRIntn PR_CALLBACK RealMain( PRIn + printf("%s", buf); + clientThread = PR_CreateThread(PR_USER_THREAD, +- clientThreadFunc, (void *) listenPort, ++ clientThreadFunc, (void *) (intptr_t)listenPort, + PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, + PR_UNJOINABLE_THREAD, 0); + if (clientThread == NULL) { +@@ -191,7 +191,7 @@ static PRIntn PR_CALLBACK RealMain( PRIn + if (retVal != -1 || PR_GetError() != PR_WOULD_BLOCK_ERROR) { + PL_PrintError("First Receive:\n"); + fprintf(stderr, "First PR_Recv: retVal: %ld, Error: %ld\n", +- retVal, PR_GetError()); ++ (long)retVal, (long)PR_GetError()); + exit(1); + } + printf("read: EWOULDBLOCK, good\n"); +@@ -201,7 +201,7 @@ static PRIntn PR_CALLBACK RealMain( PRIn + if (retVal != CHUNK_SIZE) { + PL_PrintError("Second Receive:\n"); + fprintf(stderr, "Second PR_Recv: retVal: %ld, Error: %ld\n", +- retVal, PR_GetError()); ++ (long)retVal, (long)PR_GetError()); + exit(1); + } + printf("read: %d bytes, good\n", retVal); +--- pr/tests/obsints.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/obsints.c +@@ -25,6 +25,9 @@ int main(int argc, char **argv) + #else /* NO_NSPR_10_SUPPORT */ + #include "prtypes.h" /* which includes protypes.h */ +#if !defined(__GNUC__) +# define __unused +#endif - int main() -@@ -65,15 +68,15 @@ + int main(int argc, char **argv) + { +@@ -32,17 +35,17 @@ int main(int argc, char **argv) + * Compilation fails if any of these integer types are not * defined by protypes.h. */ - intn in; - uintn uin; - uint ui; - int8 i8; - uint8 ui8; - int16 i16; - uint16 ui16; - int32 i32; - uint32 ui32; - int64 i64; - uint64 ui64; + intn in __unused; + uintn uin __unused; + uint ui __unused; + int8 i8 __unused; + uint8 ui8 __unused; + int16 i16 __unused; + uint16 ui16 __unused; + int32 i32 __unused; + uint32 ui32 __unused; + int64 i64 __unused; + uint64 ui64 __unused; printf("PASS\n"); ---- ../pr/tests/perf.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/perf.c Mon Jul 25 21:05:55 2005 -@@ -181,5 +181,5 @@ + return 0; +--- pr/tests/parsetm.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/parsetm.c +@@ -31,8 +31,8 @@ static void PrintExplodedTime(const PREx + + /* Print day of the week, month, day, hour, minute, and second */ + if (debug_mode) printf("%s %s %ld %02ld:%02ld:%02ld ", +- dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday, +- et->tm_hour, et->tm_min, et->tm_sec); ++ dayOfWeek[et->tm_wday], month[et->tm_month], (long)et->tm_mday, ++ (long)et->tm_hour, (long)et->tm_min, (long)et->tm_sec); + + /* Print time zone */ + totalOffset = et->tm_params.tp_gmt_offset + et->tm_params.tp_dst_offset; +@@ -47,7 +47,7 @@ static void PrintExplodedTime(const PREx + hourOffset = totalOffset / 3600; + minOffset = (totalOffset % 3600) / 60; + if (debug_mode) +- printf("%s%02ld%02ld ", sign, hourOffset, minOffset); ++ printf("%s%02ld%02ld ", sign, (long)hourOffset, (long)minOffset); + } + + /* Print year */ +--- pr/tests/peek.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/peek.c +@@ -135,7 +135,7 @@ static void ClientNB(void *arg) + { + PRFileDesc *sock; + PRSocketOptionData opt; +- PRUint16 port = (PRUint16) arg; ++ PRUint16 port = (intptr_t) arg; + PRNetAddr addr; + char buf[BUFFER_SIZE]; + PRPollDesc pd; +@@ -299,7 +299,7 @@ RunTest(PRThreadScope scope, PRFileDesc + exit(1); + } + client = PR_CreateThread( +- PR_USER_THREAD, ClientNB, (void *) port, ++ PR_USER_THREAD, ClientNB, (void *)(intptr_t) port, + PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0); + if (NULL == client) { + fprintf(stderr, "PR_CreateThread failed\n"); +--- pr/tests/perf.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/perf.c +@@ -141,7 +141,7 @@ static void PR_CALLBACK CXReader(void *a + n = count / 2; for (i = 0; i < n; i++) { while (cxq == 0) { - DPRINTF(("CXReader: thread = 0x%lx waiting\n", + DPRINTF(("CXReader: thread = %p waiting\n", PR_GetCurrentThread())); PR_Wait(mon, PR_INTERVAL_NO_TIMEOUT); -@@ -194,5 +194,5 @@ + } +@@ -154,7 +154,7 @@ static void PR_CALLBACK CXReader(void *a + --alive; PR_Notify(mon2); PR_ExitMonitor(mon2); - DPRINTF(("CXReader: thread = 0x%lx exiting\n", PR_GetCurrentThread())); + DPRINTF(("CXReader: thread = %p exiting\n", PR_GetCurrentThread())); } -@@ -205,5 +205,5 @@ + static void PR_CALLBACK CXWriter(void *arg) +@@ -165,7 +165,7 @@ static void PR_CALLBACK CXWriter(void *a + n = count / 2; for (i = 0; i < n; i++) { while (cxq == 1) { - DPRINTF(("CXWriter: thread = 0x%lx waiting\n", + DPRINTF(("CXWriter: thread = %p waiting\n", PR_GetCurrentThread())); PR_Wait(mon, PR_INTERVAL_NO_TIMEOUT); -@@ -218,5 +218,5 @@ + } +@@ -178,7 +178,7 @@ static void PR_CALLBACK CXWriter(void *a + --alive; PR_Notify(mon2); PR_ExitMonitor(mon2); - DPRINTF(("CXWriter: thread = 0x%lx exiting\n", PR_GetCurrentThread())); + DPRINTF(("CXWriter: thread = %p exiting\n", PR_GetCurrentThread())); } -@@ -238,5 +238,5 @@ + static void ContextSwitch(PRThreadScope scope1, PRThreadScope scope2) +@@ -198,7 +198,7 @@ static void ContextSwitch(PRThreadScope + if (NULL == t1) { fprintf(stderr, "ContextSwitch: cannot create thread\n"); } else { - DPRINTF(("ContextSwitch: created %s thread = 0x%lx\n", + DPRINTF(("ContextSwitch: created %s thread = %p\n", (scope1 == PR_GLOBAL_THREAD ? "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD"), -@@ -252,5 +252,5 @@ + t1)); +@@ -212,7 +212,7 @@ static void ContextSwitch(PRThreadScope + if (NULL == t2) { fprintf(stderr, "ContextSwitch: cannot create thread\n"); } else { - DPRINTF(("ContextSwitch: created %s thread = 0x%lx\n", + DPRINTF(("ContextSwitch: created %s thread = %p\n", (scope2 == PR_GLOBAL_THREAD ? "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD"), -@@ -294,8 +294,8 @@ + t2)); +@@ -254,10 +254,10 @@ static void PR_CALLBACK SemaThread(void + n = count / 2; for (i = 0; i < n; i++) { - DPRINTF(("SemaThread: thread = 0x%lx waiting on sem = 0x%lx\n", + DPRINTF(("SemaThread: thread = %p waiting on sem = %p\n", PR_GetCurrentThread(), sem[0])); PR_WaitSem(sem[0]); - DPRINTF(("SemaThread: thread = 0x%lx posting on sem = 0x%lx\n", + DPRINTF(("SemaThread: thread = %p posting on sem = %p\n", PR_GetCurrentThread(), sem[1])); PR_PostSem(sem[1]); -@@ -306,5 +306,5 @@ + } +@@ -266,7 +266,7 @@ static void PR_CALLBACK SemaThread(void + --alive; PR_Notify(mon2); PR_ExitMonitor(mon2); - DPRINTF(("SemaThread: thread = 0x%lx exiting\n", PR_GetCurrentThread())); + DPRINTF(("SemaThread: thread = %p exiting\n", PR_GetCurrentThread())); } -@@ -334,5 +334,5 @@ + static PRSemaphore *sem_set1[2]; +@@ -294,7 +294,7 @@ static void SemaContextSwitch(PRThreadSc + if (NULL == t1) { fprintf(stderr, "SemaContextSwitch: cannot create thread\n"); } else { - DPRINTF(("SemaContextSwitch: created %s thread = 0x%lx\n", + DPRINTF(("SemaContextSwitch: created %s thread = %p\n", (scope1 == PR_GLOBAL_THREAD ? "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD"), -@@ -349,5 +349,5 @@ + t1)); +@@ -309,7 +309,7 @@ static void SemaContextSwitch(PRThreadSc + if (NULL == t2) { fprintf(stderr, "SemaContextSwitch: cannot create thread\n"); } else { - DPRINTF(("SemaContextSwitch: created %s thread = 0x%lx\n", + DPRINTF(("SemaContextSwitch: created %s thread = %p\n", (scope2 == PR_GLOBAL_THREAD ? "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD"), ---- ../pr/tests/prpoll.c 2009-05-06 01:40:39.000000000 -0400 -+++ ../pr/tests/prpoll.c 2009-11-04 16:31:54.000000000 -0500 -@@ -72,5 +72,5 @@ + t2)); +--- pr/tests/pipepong.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/pipepong.c +@@ -36,7 +36,7 @@ int main(int argc, char **argv) + nBytes = fread(buf, 1, 5, stdin); + fprintf(stderr, "pong process: received \"%s\"\n", buf); + if (nBytes != 5) { +- fprintf(stderr, "pong process: expected 5 bytes but got %d bytes\n", ++ fprintf(stderr, "pong process: expected 5 bytes but got %zd bytes\n", + nBytes); + exit(1); + } +--- pr/tests/poll_nm.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/poll_nm.c +@@ -47,7 +47,7 @@ PRIntn debug_mode; + static void PR_CALLBACK clientThreadFunc(void *arg) { +- PRUintn port = (PRUintn) arg; ++ PRUintn port = (intptr_t) arg; + PRFileDesc *sock; + PRNetAddr addr; + char buf[128]; +@@ -196,7 +196,7 @@ int main(int argc, char **argv) + npds = 5; + + clientThread = PR_CreateThread(PR_USER_THREAD, +- clientThreadFunc, (void *) listenPort1, ++ clientThreadFunc, (void *)(intptr_t)listenPort1, + PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, + PR_UNJOINABLE_THREAD, 0); + if (clientThread == NULL) { +@@ -206,7 +206,7 @@ int main(int argc, char **argv) + } + + clientThread = PR_CreateThread(PR_USER_THREAD, +- clientThreadFunc, (void *) listenPort2, ++ clientThreadFunc, (void *)(intptr_t)listenPort2, + PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, + PR_UNJOINABLE_THREAD, 0); + if (clientThread == NULL) { +--- pr/tests/prfz.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/prfz.c +@@ -7,7 +7,7 @@ + */ + + #include "prprf.h" +-#include ++#include + #include + #include + +--- pr/tests/provider.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/provider.c +@@ -1049,7 +1049,7 @@ int main(int argc, char **argv) + { + PRUintn index; + PRBool boolean; +- CSClient_t *client; ++ CSClient_t *client = NULL; + PRStatus rv, joinStatus; + CSServer_t *server = NULL; + char *thread_type; +--- pr/tests/prpoll.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/prpoll.c +@@ -39,7 +39,7 @@ int main(int argc, char **argv) + static void + clientThreadFunc(void *arg) + { - PRUint16 port = (PRUint16) arg; + PRUint16 port = (PRUint16)(uintptr_t)arg; PRFileDesc *sock; PRNetAddr addr; -@@ -106,5 +106,5 @@ + char buf[BUF_SIZE]; +@@ -73,7 +73,7 @@ int main(int argc, char **argv) + PRInt32 rv; PROsfd sd; struct sockaddr_in saddr; - PRIntn saddr_len; + socklen_t saddr_len; PRUint16 listenPort3; PRFileDesc *socket_poll_fd; -@@ -232,5 +232,5 @@ + PRIntn i, j; +@@ -199,7 +199,7 @@ int main(int argc, char **argv) + npds--; clientThread = PR_CreateThread(PR_USER_THREAD, - clientThreadFunc, (void *) listenPort1, + clientThreadFunc, (void *)(uintptr_t)listenPort1, PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, PR_UNJOINABLE_THREAD, 0); -@@ -241,5 +241,5 @@ + if (clientThread == NULL) { +@@ -208,7 +208,7 @@ int main(int argc, char **argv) + } clientThread = PR_CreateThread(PR_USER_THREAD, - clientThreadFunc, (void *) listenPort2, + clientThreadFunc, (void *)(uintptr_t)listenPort2, PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD, 0); -@@ -250,5 +250,5 @@ + if (clientThread == NULL) { +@@ -217,7 +217,7 @@ int main(int argc, char **argv) + } clientThread = PR_CreateThread(PR_USER_THREAD, - clientThreadFunc, (void *) listenPort3, + clientThreadFunc, (void *)(uintptr_t)listenPort3, PR_PRIORITY_NORMAL, PR_GLOBAL_BOUND_THREAD, PR_UNJOINABLE_THREAD, 0); ---- ../pr/tests/prfz.c.orig 2015-10-16 13:22:19 UTC -+++ ../pr/tests/prfz.c -@@ -7,7 +7,7 @@ - */ + if (clientThread == NULL) { +--- pr/tests/randseed.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/randseed.c +@@ -48,7 +48,6 @@ static void Help( void ) + static void PrintRand( void *buf, PRIntn size ) + { + PRUint32 *rp = buf; +- PRIntn i; - #include "prprf.h" --#include -+#include - #include - #include - ---- ../pr/tests/ranfile.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/ranfile.c Mon Jul 25 21:13:44 2005 -@@ -169,5 +169,5 @@ + printf("%4.4d--\n", size ); + while (size > 0 ) { +--- pr/tests/ranfile.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/ranfile.c +@@ -130,7 +130,7 @@ static void PR_CALLBACK Thread(void *arg + PRStatus rv = PR_SUCCESS; Hammer_t *cd = (Hammer_t*)arg; - (void)sprintf(filename, "%ssg%04ld.dat", baseName, cd->id); + (void)sprintf(filename, "%ssg%04d.dat", baseName, (int)cd->id); if (debug_mode) printf("Starting work on %s\n", filename); -@@ -408,6 +408,6 @@ + +@@ -364,14 +364,14 @@ int main(int argc, char **argv) + } else if (debug_mode) printf( - "%s: test failed %s after %ld seconds\n", - programName, where[hammer[poll].problem], duration); + "%s: test failed %s after %d seconds\n", + programName, where[hammer[poll].problem], (int)duration); else failed_already=1; } -@@ -415,5 +415,5 @@ + } } if (debug_mode) printf( - "%s: [%ld [%ld] %ld] writes/sec average\n", + "%s: [%d [%d] %d] writes/sec average\n", programName, writesMin, writesTot * 1000 / durationTot, writesMax); ---- ../pr/tests/randseed.c Fri Apr 29 18:46:05 2005 -+++ ../pr/tests/randseed.c Mon Jul 25 21:15:01 2005 -@@ -81,5 +81,4 @@ - { - PRUint32 *rp = buf; -- PRIntn i; + PR_DestroyCondVar(cv); +--- pr/tests/runtests.sh.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/runtests.sh +@@ -58,9 +58,6 @@ fi + # Tests not run (but should) + # - printf("%4.4d--\n", size ); ---- ../pr/tests/sel_spd.c 2009-05-06 01:40:39.000000000 -0400 -+++ ../pr/tests/sel_spd.c 2009-11-04 16:34:14.000000000 -0500 -@@ -48,4 +48,7 @@ +-#forktest (failed on IRIX) +-#nbconn - fails on some platforms +-#poll_er - fails on some platforms? limited use? + #prpoll - the bad-FD test needs to be moved to a different test + #sleep - specific to OS/2 + +@@ -92,6 +89,7 @@ exit + fdcach + fileio + foreign ++forktest + formattm + fsync + gethost +@@ -99,7 +97,6 @@ getproto + i2l + initclk + inrval +-instrumt + intrio + intrupt + io_timeout +@@ -120,6 +117,7 @@ logger + many_cv + multiwait + nameshm1 ++nbconn + nblayer + nonblock + ntioto +@@ -136,6 +134,7 @@ perf + pipeping + pipeping2 + pipeself ++poll_er + poll_nm + poll_to + pollable +@@ -208,7 +207,7 @@ OBJDIR=`basename $PWD` + printf "\nNSPR Test Results - $OBJDIR\n\n" + printf "BEGIN\t\t\t`date`\n" + printf "NSPR_TEST_LOGFILE\t${LOGFILE}\n\n" +-printf "Test\t\t\tResult\n\n" ++printf " Test\t\t\tResult\n\n" + if [ $OS_PLATFORM = "Windows_95" ] || [ $OS_PLATFORM = "Windows_98" ] || [ $OS_PLATFORM = "Windows_NT" ] || [ $OS_PLATFORM = "OS/2" ] ; then + for prog in $TESTS + do +@@ -226,10 +225,8 @@ if [ $OS_PLATFORM = "Windows_95" ] || [ + else + for prog in $TESTS + do +- printf "$prog" +- printf "\nBEGIN TEST: $prog\n\n" >> ${LOGFILE} 2>&1 +- export test_rval +- ./$prog >> ${LOGFILE} 2>&1 & ++ printf %16s $prog ++ ./$prog >> $prog.output 2>&1 & + test_pid=$! + sleep_pid=0 + if test -n "$TEST_TIMEOUT" && test "$TEST_TIMEOUT" -gt 0 +@@ -244,28 +241,11 @@ else + printf "\t\t\tPassed\n"; + else + printf "\t\t\tFAILED\n"; ++ sed "s,^, $prog: ," < $prog.output + rval=1 + fi; +- printf "\nEND TEST: $prog\n\n" >> ${LOGFILE} 2>&1 + done + fi; + + printf "END\t\t\t`date`\n" + exit $rval +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +- +--- pr/tests/sel_spd.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/sel_spd.c +@@ -15,6 +15,9 @@ + #include #include #include +#if defined(XP_UNIX) || defined(XP_OS2_EMX) +# include /* getopt(3) */ +#endif #ifdef SYMBIAN #include -@@ -55,14 +58,14 @@ + #endif +@@ -22,16 +25,16 @@ + #define PORT_BASE 19000 typedef struct timer_slot_t { - unsigned long d_connect; - unsigned long d_cl_data; - unsigned long d_sv_data; - unsigned long d_close; - unsigned long d_total; - unsigned long requests; + unsigned int d_connect; + unsigned int d_cl_data; + unsigned int d_sv_data; + unsigned int d_close; + unsigned int d_total; + unsigned int requests; } timer_slot_t; -static long _iterations = 5; -static long _client_data = 8192; +static int _iterations = 5; +static int _client_data = 8192; #ifdef SYMBIAN -@@ -73,10 +76,9 @@ + /* +@@ -40,12 +43,11 @@ static long _client_data = 8192; + * memory and not be able to allocate thread stack or client/server data * buffer. */ -static long _server_data = (8*1024); -static long _threads_max = 10, _threads = 10; +static int _server_data = (8*1024); #else -static long _server_data = (128*1024); -static long _threads_max = 10, _threads = 10; +static int _server_data = (128*1024); #endif +static int _threads_max = 10, _threads = 10; static int verbose=0; -@@ -134,5 +136,5 @@ + static PRMonitor *exit_cv; +@@ -101,7 +103,7 @@ _server_thread(void *arg_id) + void _client_thread(void *); PRThread *thread; int *id = (int *)arg_id; - PRFileDesc *sock; + PRFileDesc *sock = NULL; PRSocketOptionData sockopt; PRNetAddr sa; -@@ -502,10 +504,10 @@ + PRFileDesc * newsock; +@@ -469,12 +471,12 @@ void + tally_results(int verbose) { int index; - unsigned long tot_connect = 0; - unsigned long tot_cl_data = 0; - unsigned long tot_sv_data = 0; - unsigned long tot_close = 0; - unsigned long tot_all = 0; - unsigned long tot_requests = 0; + unsigned int tot_connect = 0; + unsigned int tot_cl_data = 0; + unsigned int tot_sv_data = 0; + unsigned int tot_close = 0; + unsigned int tot_all = 0; + unsigned int tot_requests = 0; fprintf(stdout, "Server results:\n\n"); ---- ../pr/tests/selct_nm.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/selct_nm.c Mon Jul 25 21:21:56 2005 -@@ -82,5 +82,5 @@ + for (index=0; index<_threads_max*2; index+=2) { +--- pr/tests/selct_nm.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/selct_nm.c +@@ -45,7 +45,7 @@ PRIntn debug_mode; + static void clientThreadFunc(void *arg) { - PRUintn port = (PRUintn) arg; + PRUintn port = (PRUintn)(uintptr_t)arg; PRFileDesc *sock; PRNetAddr addr; -@@ -202,5 +202,5 @@ + char buf[128]; +@@ -165,7 +165,7 @@ failed_already=1; + if (debug_mode) printf("%s", buf); clientThread = PR_CreateThread(PR_USER_THREAD, - clientThreadFunc, (void *) listenPort1, + clientThreadFunc, (void *)(uintptr_t)listenPort1, PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, PR_UNJOINABLE_THREAD, 0); -@@ -212,5 +212,5 @@ + if (clientThread == NULL) { +@@ -175,7 +175,7 @@ failed_already=1; + } clientThread = PR_CreateThread(PR_USER_THREAD, - clientThreadFunc, (void *) listenPort2, + clientThreadFunc, (void *)(uintptr_t)listenPort2, PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, PR_UNJOINABLE_THREAD, 0); ---- ../pr/tests/select2.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/select2.c Mon Jul 25 21:27:44 2005 -@@ -86,4 +86,5 @@ + if (clientThread == NULL) { +--- pr/tests/select2.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/select2.c +@@ -53,6 +53,7 @@ PRInt32 count; + ** ***********************************************************************/ +static int exitcode = 2; static void Test_Result (int result) -@@ -93,7 +94,10 @@ + { +@@ -60,9 +61,12 @@ static void Test_Result (int result) + { case PASS: printf ("PASS\n"); + if (exitcode == 2) + exitcode = 0; break; case FAIL: printf ("FAIL\n"); + exitcode = 1; break; default: -@@ -352,3 +357,4 @@ + printf ("NOSTATUS\n"); +@@ -319,4 +323,5 @@ int main(int argc, char **argv) + PR_Cleanup(); + return exitcode; } ---- ../pr/tests/semaerr.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/semaerr.c Mon Jul 25 21:29:23 2005 -@@ -91,5 +91,5 @@ +--- pr/tests/semaerr.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/semaerr.c +@@ -65,7 +65,7 @@ int main(int argc, char **argv) + exit(1); } if (PR_GetError() != PR_FILE_NOT_FOUND_ERROR) { - fprintf(stderr, "Expected error is %d but got (%d, %d)\n", + fprintf(stderr, "Expected error is %ld (PR_FILE_NOT_FOUND_ERROR) but got (%d, %d)\n", PR_FILE_NOT_FOUND_ERROR, PR_GetError(), PR_GetOSError()); exit(1); ---- ../pr/tests/semaerr1.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/semaerr1.c Mon Jul 25 21:30:25 2005 -@@ -103,5 +103,5 @@ } +--- pr/tests/semaerr1.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/semaerr1.c +@@ -75,7 +75,7 @@ int main(int argc, char **argv) + exit(1); + } if (PR_GetError() != PR_FILE_EXISTS_ERROR) { - fprintf(stderr, "Expect %d but got %d\n", PR_FILE_EXISTS_ERROR, + fprintf(stderr, "Expected %ld (PR_FILE_EXISTS_ERROR) but got %d\n", PR_FILE_EXISTS_ERROR, PR_GetError()); exit(1); ---- ../pr/tests/sendzlf.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/sendzlf.c Mon Jul 25 21:31:35 2005 -@@ -59,5 +59,5 @@ + } +--- pr/tests/sendzlf.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/sendzlf.c +@@ -26,7 +26,7 @@ static void ClientThread(void *arg) + { PRFileDesc *sock; PRNetAddr addr; - PRUint16 port = (PRUint16) arg; + PRUint16 port = (PRUint16)(uintptr_t)arg; char buf[1024]; char *bufPtr; -@@ -217,5 +217,5 @@ + PRInt32 nbytes; +@@ -184,7 +184,7 @@ int main(int argc, char **argv) + } clientThread = PR_CreateThread(PR_USER_THREAD, - ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)), + ClientThread, (void *)(uintptr_t)PR_ntohs(PR_NetAddrInetPort(&addr)), PR_PRIORITY_NORMAL, scope, PR_JOINABLE_THREAD, 0); if (NULL == clientThread) { ---- ../pr/tests/servr_kk.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/servr_kk.c Mon Jul 25 21:38:28 2005 -@@ -90,5 +90,5 @@ + fprintf(stderr, "PR_CreateThread failed\n"); +--- pr/tests/server_test.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/server_test.c +@@ -60,7 +60,7 @@ PRCondVar *ServerStateCV; + #ifdef DEBUGPRINTS #define DPRINTF printf #else -#define DPRINTF +#define DPRINTF(...) #endif -@@ -501,4 +501,5 @@ + +@@ -502,6 +502,7 @@ static void do_workUU(void) + do_work(); } +#if 0 + static void do_workUK(void) + { + ServerScope = PR_LOCAL_THREAD; +@@ -522,6 +523,7 @@ static void do_workKK(void) + ClientScope = PR_GLOBAL_THREAD; + do_work(); + } ++#endif + + + static void Measure(void (*func)(void), const char *msg) +--- pr/tests/servr_kk.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/servr_kk.c +@@ -57,7 +57,7 @@ PRCondVar *ServerStateCV; + #ifdef DEBUGPRINTS + #define DPRINTF printf + #else +-#define DPRINTF ++#define DPRINTF(...) + #endif + + PRIntn failed_already=0; +@@ -472,6 +472,7 @@ void do_work() + PR_JoinThread(ServerThread); + } + ++#if 0 static void do_workUU(void) { -@@ -521,4 +522,5 @@ + ServerScope = PR_LOCAL_THREAD; +@@ -492,6 +493,7 @@ static void do_workKU(void) + ClientScope = PR_LOCAL_THREAD; do_work(); } +#endif static void do_workKK(void) ---- ../pr/tests/short_thread.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/short_thread.c Mon Jul 25 21:44:20 2005 -@@ -76,6 +76,6 @@ + { +--- pr/tests/servr_ku.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/servr_ku.c +@@ -57,7 +57,7 @@ PRCondVar *ServerStateCV; + #ifdef DEBUGPRINTS + #define DPRINTF printf + #else +-#define DPRINTF ++#define DPRINTF(...) + #endif + + PRIntn failed_already=0; +--- pr/tests/servr_uk.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/servr_uk.c +@@ -57,7 +57,7 @@ PRCondVar *ServerStateCV; + #ifdef DEBUGPRINTS + #define DPRINTF printf + #else +-#define DPRINTF ++#define DPRINTF(...) + #endif + + PRIntn failed_already=0; +--- pr/tests/servr_uu.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/servr_uu.c +@@ -57,7 +57,7 @@ PRCondVar *ServerStateCV; + #ifdef DEBUGPRINTS + #define DPRINTF printf + #else +-#define DPRINTF ++#define DPRINTF(...) + #endif + + PRIntn failed_already=0; +--- pr/tests/short_thread.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/short_thread.c +@@ -43,8 +43,8 @@ int main (int argc, char **argv) + PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_UNJOINABLE_THREAD, 0)) == NULL ) { fprintf(stderr, - "simple_test: Error - PR_CreateThread failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + "simple_test: Error - PR_CreateThread failed: (%d, %d)\n", + PR_GetError(), PR_GetOSError()); exit( 1 ); } ---- ../pr/tests/cvar2.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/cvar2.c Mon Jul 25 20:37:10 2005 -@@ -128,5 +128,5 @@ - PR_Lock(info->lock); - if (*info->tcount == 0) { -- DPRINTF(("PrivateCondVarThread: thread 0x%lx waiting on cvar = 0x%lx\n", -+ DPRINTF(("PrivateCondVarThread: thread %p waiting on cvar = %p\n", - PR_GetCurrentThread(), info->cvar)); - PR_WaitCondVar(info->cvar, info->timeout); -@@ -141,6 +141,6 @@ - (*info->exitcount)++; - PR_NotifyCondVar(info->exitcvar); --DPRINTF(("PrivateCondVarThread: thread 0x%lx notified exitcvar = 0x%lx cnt = %ld\n", -- PR_GetCurrentThread(), info->exitcvar,(*info->exitcount))); -+DPRINTF(("PrivateCondVarThread: thread %p notified exitcvar = %p cnt = %d\n", -+ PR_GetCurrentThread(), info->exitcvar,(int)(*info->exitcount))); - PR_Unlock(info->exitlock); - } -@@ -190,5 +190,5 @@ - CondVarTestSUU(void *_arg) - { -- PRInt32 arg = (PRInt32)_arg; -+ PRInt32 arg = (PRInt32)(intptr_t)_arg; - PRInt32 index, loops; - threadinfo *list; -@@ -222,5 +222,5 @@ - PR_LOCAL_THREAD); - index++; -- DPRINTF(("CondVarTestSUU: created thread 0x%lx\n",list[index].thread)); -+ DPRINTF(("CondVarTestSUU: created thread %p\n",list[index].thread)); - } + PR_Cleanup(); +--- pr/tests/socket.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/socket.c +@@ -103,13 +103,15 @@ char *LARGE_FILE_NAME = "/tmp/prsocket_t + #endif -@@ -232,5 +232,5 @@ - PR_NotifyCondVar(list[index].cvar); - PR_Unlock(list[index].lock); -- DPRINTF(("PrivateCondVarThread: thread 0x%lx notified cvar = 0x%lx\n", -+ DPRINTF(("PrivateCondVarThread: thread %p notified cvar = %p\n", - PR_GetCurrentThread(), list[index].cvar)); - } -@@ -260,5 +260,5 @@ - CondVarTestSUK(void *_arg) - { -- PRInt32 arg = (PRInt32)_arg; -+ PRInt32 arg = (PRInt32)(intptr_t)_arg; - PRInt32 index, loops; - threadinfo *list; -@@ -334,5 +334,5 @@ - CondVarTestPUU(void *_arg) - { -- PRInt32 arg = (PRInt32)_arg; -+ PRInt32 arg = (PRInt32)(intptr_t)_arg; - PRInt32 index, loops; - threadinfo *list; -@@ -369,5 +369,5 @@ - PR_LOCAL_THREAD); - -- DPRINTF(("CondVarTestPUU: created thread 0x%lx\n",list[index].thread)); -+ DPRINTF(("CondVarTestPUU: created thread %p\n",list[index].thread)); - index++; - tcount++; -@@ -387,6 +387,6 @@ - /* Wait for threads to finish */ - while(exitcount < arg) { --DPRINTF(("CondVarTestPUU: thread 0x%lx waiting on exitcvar = 0x%lx cnt = %ld\n", -- PR_GetCurrentThread(), exitcvar, exitcount)); -+DPRINTF(("CondVarTestPUU: thread %p waiting on exitcvar = %p cnt = %d\n", -+ PR_GetCurrentThread(), exitcvar, (int)exitcount)); - PR_WaitCondVar(exitcvar, PR_SecondsToInterval(60)); - } -@@ -398,5 +398,5 @@ - /* Join all the threads */ - for(index=0; index<(arg); index++) { -- DPRINTF(("CondVarTestPUU: joining thread 0x%lx\n",list[index].thread)); -+ DPRINTF(("CondVarTestPUU: joining thread %p\n",list[index].thread)); - PR_JoinThread(list[index].thread); - if (list[index].internal) { -@@ -420,5 +420,5 @@ - CondVarTestPUK(void *_arg) - { -- PRInt32 arg = (PRInt32)_arg; -+ PRInt32 arg = (PRInt32)(intptr_t)_arg; - PRInt32 index, loops; - threadinfo *list; -@@ -501,5 +501,5 @@ - CondVarTest(void *_arg) - { -- PRInt32 arg = (PRInt32)_arg; -+ PRInt32 arg = (PRInt32)(intptr_t)_arg; - PRInt32 index, loops; - threadinfo *list; -@@ -634,5 +634,5 @@ - CondVarTimeoutTest(void *_arg) - { -- PRInt32 arg = (PRInt32)_arg; -+ PRInt32 arg = (PRInt32)(intptr_t)_arg; - PRInt32 index, loops; - threadinfo *list; -@@ -745,5 +745,5 @@ - CondVarMixedTest(void *_arg) - { -- PRInt32 arg = (PRInt32)_arg; -+ PRInt32 arg = (PRInt32)(intptr_t)_arg; - PRInt32 index, loops; - threadinfo *list; -@@ -835,5 +835,5 @@ - - PR_Lock(list[index].lock); -- *list[index].tcount++; -+ list[index].tcount++; - PR_NotifyCondVar(list[index].cvar); - PR_Unlock(list[index].lock); -@@ -906,5 +906,5 @@ - - start = PR_IntervalNow(); -- (*func)((void *)arg); -+ (*func)((void *)(intptr_t)arg); - stop = PR_IntervalNow(); - -@@ -965,5 +965,5 @@ - - for (threads = default_threads; threads < default_threads*5; threads+=default_threads) { -- printf("\n%ld Thread tests\n", threads); -+ printf("\n%d Thread tests\n", (int)threads); - Measure(CondVarTestSUU, threads, "Condvar simple test shared UU"); - Measure(CondVarTestSUK, threads, "Condvar simple test shared UK"); ---- ../pr/tests/io_timeout.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/io_timeout.c Mon Jul 25 20:50:40 2005 -@@ -55,9 +55,11 @@ - #include "plgetopt.h" - -+#include - #include -+#include - #include "nspr.h" - - #define NUM_THREADS 1 --#define BASE_PORT 8000 -+#define BASE_PORT 38011 - #define DEFAULT_ACCEPT_TIMEOUT 2 - -@@ -71,5 +73,5 @@ - - PRIntn failed_already = 0; --PRIntn debug_mode = 0; -+PRIntn debug_mode = 1; - - #define LOCAL_SCOPE_STRING "LOCAL scope" -@@ -87,5 +89,5 @@ - PRStatus rv; - PRThreadScope tscope; -- char *scope_str; -+ const char *scope_str; - - -@@ -106,4 +108,5 @@ - default: - PR_ASSERT(!"Invalid thread scope"); -+ scope_str = NULL; - break; - } -@@ -124,5 +127,10 @@ - if (rv == PR_FAILURE) { - if (debug_mode) -- printf("unable to bind\n"); -+ printf("unable to bind to %d: %s\n", -+ BASE_PORT + info->id, strerror(PR_GetOSError())); -+ if (PR_GetOSError() == EADDRINUSE) { -+ printf("can not proceed with this test\n"); -+ exit(0); -+ } - failed_already=1; - goto dead; -@@ -146,6 +154,7 @@ - if (PR_GetError() == PR_IO_TIMEOUT_ERROR) { - if (debug_mode) { -- printf("PR_Accept() timeout worked!\n"); -- printf("TEST PASSED! PR_Accept() returned error %d\n", -+ printf("PR_Accept() timeout worked!\n" -+ "TEST PASSED! PR_Accept() returned error " -+ "PR_IO_TIMEOUT_ERROR (%ld)\n", - PR_IO_TIMEOUT_ERROR); - } ---- ../pr/tests/socket.c 2009-05-06 01:40:39.000000000 -0400 -+++ ../pr/tests/socket.c 2009-11-04 16:45:41.000000000 -0500 -@@ -132,11 +132,13 @@ - static PRInt32 num_tcp_clients = NUM_TCP_CLIENTS; -static PRInt32 num_udp_clients = NUM_UDP_CLIENTS; static PRInt32 num_transmitfile_clients = NUM_TRANSMITFILE_CLIENTS; static PRInt32 num_tcp_connections_per_client = NUM_TCP_CONNECTIONS_PER_CLIENT; static PRInt32 tcp_mesg_size = TCP_MESG_SIZE; static PRInt32 num_tcp_mesgs_per_connection = NUM_TCP_MESGS_PER_CONNECTION; +#if defined(SYMBIAN) && !defined(__WINSCW__) +static PRInt32 num_udp_clients = NUM_UDP_CLIENTS; static PRInt32 num_udp_datagrams_per_client = NUM_UDP_DATAGRAMS_PER_CLIENT; static PRInt32 udp_datagram_size = UDP_DGRAM_SIZE; +#endif static PRInt32 thread_count; -@@ -210,5 +212,7 @@ + PRUint16 server_domain = PR_AF_INET, client_domain = PR_AF_INET; +@@ -181,19 +183,23 @@ readn(PRFileDesc *sockfd, char *buf, int + int rem; int bytes; int offset = 0; +#ifdef WINNT int err; +#endif PRIntervalTime timeout = PR_INTERVAL_NO_TIMEOUT; -@@ -217,10 +221,12 @@ + if (test_cancelio) + timeout = PR_SecondsToInterval(2); for (rem=len; rem; offset += bytes, rem -= bytes) { - DPRINTF(("thread = 0x%lx: calling PR_Recv, bytes = %d\n", + DPRINTF(("thread = %p: calling PR_Recv, bytes = %d\n", PR_GetCurrentThread(), rem)); +#ifdef WINNT retry: +#endif bytes = PR_Recv(sockfd, buf + offset, rem, 0, timeout); - DPRINTF(("thread = 0x%lx: returning from PR_Recv, bytes = %d\n", + DPRINTF(("thread = %p: returning from PR_Recv, bytes = %d\n", PR_GetCurrentThread(), bytes)); if (bytes < 0) { -@@ -253,9 +259,9 @@ + #ifdef WINNT +@@ -224,11 +230,11 @@ writen(PRFileDesc *sockfd, char *buf, in + int offset = 0; for (rem=len; rem; offset += bytes, rem -= bytes) { - DPRINTF(("thread = 0x%lx: calling PR_Send, bytes = %d\n", + DPRINTF(("thread = %p: calling PR_Send, bytes = %d\n", PR_GetCurrentThread(), rem)); bytes = PR_Send(sockfd, buf + offset, rem, 0, PR_INTERVAL_NO_TIMEOUT); - DPRINTF(("thread = 0x%lx: returning from PR_Send, bytes = %d\n", + DPRINTF(("thread = %p: returning from PR_Send, bytes = %d\n", PR_GetCurrentThread(), bytes)); if (bytes <= 0) -@@ -308,5 +314,5 @@ + return -1; +@@ -279,7 +285,7 @@ Serve_Client(void *arg) + fprintf(stderr,"prsocket_test: ERROR - PR_Shutdown\n"); } #endif - DPRINTF(("Serve_Client [0x%lx]: inbuf[0] = 0x%lx\n",PR_GetCurrentThread(), + DPRINTF(("Serve_Client [%p]: inbuf[0] = %d\n",PR_GetCurrentThread(), (*((int *) in_buf->data)))); if (writen(sockfd, in_buf->data, bytes) < bytes) { -@@ -447,5 +453,5 @@ + fprintf(stderr,"prsocket_test: ERROR - Serve_Client:writen\n"); +@@ -418,7 +424,7 @@ TCP_Server(void *arg) + goto exit; } - DPRINTF(("TCP_Server: PR_BIND netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n", + DPRINTF(("TCP_Server: PR_BIND netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n", netaddr.inet.ip, netaddr.inet.port)); if (PR_SetNetAddr(PR_IpAddrLoopback, client_domain, -@@ -489,5 +495,5 @@ + PR_ntohs(PR_NetAddrInetPort(&netaddr)), +@@ -460,7 +466,7 @@ TCP_Server(void *arg) + scp->datalen = sp->datalen; t = create_new_thread(PR_USER_THREAD, - Serve_Client, (void *)scp, + Serve_Client, (void *)scp, PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, -@@ -499,5 +505,5 @@ + PR_UNJOINABLE_THREAD, +@@ -470,7 +476,7 @@ TCP_Server(void *arg) + failed_already=1; goto exit; } - DPRINTF(("TCP_Server: Created Serve_Client = 0x%lx\n", t)); + DPRINTF(("TCP_Server: Created Serve_Client = %p\n", t)); } -@@ -515,7 +521,8 @@ + exit: +@@ -486,9 +492,10 @@ exit: + --(*sp->exit_counter); PR_Notify(sp->exit_mon); PR_ExitMonitor(sp->exit_mon); - DPRINTF(("TCP_Server [0x%lx] exiting\n", PR_GetCurrentThread())); + DPRINTF(("TCP_Server [%p] exiting\n", PR_GetCurrentThread())); } +#if defined(SYMBIAN) && !defined(__WINSCW__) /* * UDP Server -@@ -573,5 +580,5 @@ + * Server Thread +@@ -544,7 +551,7 @@ UDP_Server(void *arg) + return; } - DPRINTF(("PR_Bind: UDP Server netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n", + DPRINTF(("PR_Bind: UDP Server netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n", netaddr.inet.ip, netaddr.inet.port)); /* -@@ -611,5 +618,5 @@ + * We can't use the IP address returned by PR_GetSockName in +@@ -582,13 +589,13 @@ UDP_Server(void *arg) + */ memset(&netaddr, 0 , sizeof(netaddr)); for (i = 0; i < (num_udp_clients * num_udp_datagrams_per_client); i++) { - DPRINTF(("UDP_Server: calling PR_RecvFrom client - ip = 0x%lx, port = %d bytes = %d inbuf = 0x%lx, inbuf[0] = 0x%lx\n", + DPRINTF(("UDP_Server: calling PR_RecvFrom client - ip = 0x%x, port = %d bytes = %d inbuf = %p, inbuf[0] = 0x%x\n", netaddr.inet.ip, netaddr.inet.port, bytes, in_buf->data, in_buf->data[0])); -@@ -617,5 +624,5 @@ + rv = PR_RecvFrom(sockfd, in_buf->data, bytes, 0, &netaddr, PR_INTERVAL_NO_TIMEOUT); - DPRINTF(("UDP_Server: PR_RecvFrom client - ip = 0x%lx, port = %d bytes = %d inbuf = 0x%lx, inbuf[0] = 0x%lx\n", + DPRINTF(("UDP_Server: PR_RecvFrom client - ip = 0x%x, port = %d bytes = %d inbuf = %p, inbuf[0] = 0x%x\n", netaddr.inet.ip, netaddr.inet.port, rv, in_buf->data, in_buf->data[0])); -@@ -640,6 +647,7 @@ + if (rv != bytes) { +@@ -611,8 +618,9 @@ UDP_Server(void *arg) + --(*sp->exit_counter); PR_Notify(sp->exit_mon); PR_ExitMonitor(sp->exit_mon); - DPRINTF(("UDP_Server [0x%x] exiting\n", PR_GetCurrentThread())); + DPRINTF(("UDP_Server [%p] exiting\n", PR_GetCurrentThread())); } +#endif /* defined(SYMBIAN) && !defined(__WINSCW__) */ /* -@@ -684,5 +692,5 @@ + * TCP_Client +@@ -655,7 +663,7 @@ TCP_Client(void *arg) + } if (PR_Connect(sockfd, &netaddr,PR_INTERVAL_NO_TIMEOUT) < 0){ fprintf(stderr, "PR_Connect failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; return; -@@ -692,5 +700,5 @@ + } +@@ -663,7 +671,7 @@ TCP_Client(void *arg) + /* * fill in random data */ - memset(out_buf->data, ((PRInt32) (&netaddr)) + i + j, bytes); + memset(out_buf->data, ((intptr_t)(&netaddr)) + i + j, bytes); /* * write to server -@@ -705,5 +713,5 @@ + */ +@@ -676,7 +684,7 @@ TCP_Client(void *arg) + failed_already=1; return; } - DPRINTF(("TCP Client [0x%lx]: out_buf = 0x%lx out_buf[0] = 0x%lx\n", + DPRINTF(("TCP Client [%p]: out_buf = %p out_buf[0] = 0x%x\n", PR_GetCurrentThread(), out_buf, (*((int *) out_buf->data)))); if (readn(sockfd, in_buf->data, bytes) < bytes) { -@@ -745,11 +753,12 @@ + fprintf(stderr,"prsocket_test: ERROR - TCP_Client:readn\n"); +@@ -716,13 +724,14 @@ TCP_Client(void *arg) + --(*cp->exit_counter); PR_Notify(cp->exit_mon); PR_ExitMonitor(cp->exit_mon); - DPRINTF(("TCP_Client [0x%x] exiting\n", PR_GetCurrentThread())); + DPRINTF(("TCP_Client [%p] exiting\n", PR_GetCurrentThread())); } +#if defined(SYMBIAN) && !defined(__WINSCW__) /* * UDP_Client * Client Thread - * Create a socket and bind an address + * Create a socket and bind an address * Communicate with the server at the address specified in the argument. * Fill in a buffer, write data to server, read it back and check -@@ -809,5 +818,5 @@ + * for data corruption. +@@ -780,7 +789,7 @@ UDP_Client(void *arg) + return; } - DPRINTF(("PR_Bind: UDP Client netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n", + DPRINTF(("PR_Bind: UDP Client netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n", netaddr.inet.ip, netaddr.inet.port)); -@@ -826,7 +835,7 @@ + netaddr = cp->server_addr; +@@ -797,9 +806,9 @@ UDP_Client(void *arg) + /* * fill in random data */ - DPRINTF(("UDP_Client [0x%lx]: out_buf = 0x%lx bytes = 0x%lx\n", + DPRINTF(("UDP_Client [%p]: out_buf = %p bytes = %d\n", PR_GetCurrentThread(), out_buf->data, bytes)); - memset(out_buf->data, ((PRInt32) (&netaddr)) + i, bytes); + memset(out_buf->data, ((intptr_t)(&netaddr)) + i, bytes); /* * write to server -@@ -841,5 +850,5 @@ + */ +@@ -812,7 +821,7 @@ UDP_Client(void *arg) + if (rv != bytes) { return; } - DPRINTF(("UDP_Client [0x%lx]: out_buf = 0x%lx out_buf[0] = 0x%lx\n", + DPRINTF(("UDP_Client [%p]: out_buf = %p out_buf[0] = 0x%x\n", PR_GetCurrentThread(), out_buf, (*((int *) out_buf->data)))); if (cp->udp_connect) -@@ -852,5 +861,5 @@ + rv = PR_Recv(sockfd, in_buf->data, bytes, 0, +@@ -823,7 +832,7 @@ UDP_Client(void *arg) + if (rv != bytes) { return; } - DPRINTF(("UDP_Client [0x%lx]: in_buf = 0x%lx in_buf[0] = 0x%lx\n", + DPRINTF(("UDP_Client [%p]: in_buf = %p in_buf[0] = 0x%x\n", PR_GetCurrentThread(), in_buf, (*((int *) in_buf->data)))); /* -@@ -877,10 +886,11 @@ + * verify the data read +@@ -848,12 +857,13 @@ UDP_Client(void *arg) + PR_Notify(cp->exit_mon); PR_ExitMonitor(cp->exit_mon); PR_DELETE(cp); - DPRINTF(("UDP_Client [0x%x] exiting\n", PR_GetCurrentThread())); + DPRINTF(("UDP_Client [%p] exiting\n", PR_GetCurrentThread())); } +#endif /* defined(SYMBIAN) && !defined(__WINSCW__) */ /* * TCP_Socket_Client_Server_Test - concurrent server test - * + * * One server and several clients are started * Each client connects to the server and sends a chunk of data -@@ -934,5 +944,5 @@ + * For each connection, server starts another thread to read the data +@@ -905,7 +915,7 @@ TCP_Socket_Client_Server_Test(void) + sparamp->exit_counter = &thread_count; sparamp->datalen = datalen; t = PR_CreateThread(PR_USER_THREAD, - TCP_Server, (void *)sparamp, + TCP_Server, (void *)sparamp, PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, -@@ -944,5 +954,5 @@ + PR_UNJOINABLE_THREAD, +@@ -915,7 +925,7 @@ TCP_Socket_Client_Server_Test(void) + failed_already=1; return -1; } - DPRINTF(("Created TCP server = 0x%lx\n", t)); + DPRINTF(("Created TCP server = %p\n", t)); thread_count++; -@@ -978,5 +988,5 @@ + /* +@@ -949,7 +959,7 @@ TCP_Socket_Client_Server_Test(void) + failed_already=1; return -1; } - DPRINTF(("Created TCP client = 0x%lx\n", t)); + DPRINTF(("Created TCP client = %p\n", t)); thread_count++; } -@@ -988,7 +998,7 @@ + /* Wait for server and client threads to exit */ +@@ -959,17 +969,18 @@ TCP_Socket_Client_Server_Test(void) + } PR_ExitMonitor(mon2); printf("%30s","TCP_Socket_Client_Server_Test:"); - printf("%2ld Server %2ld Clients %2ld connections_per_client\n",1l, + printf(" 1 Server %2d Clients %2d connections_per_client\n", num_tcp_clients, num_tcp_connections_per_client); - printf("%30s %2ld messages_per_connection %4ld bytes_per_message\n",":", + printf("%30s %2d messages_per_connection %4d bytes_per_message\n",":", num_tcp_mesgs_per_connection, tcp_mesg_size); -@@ -996,7 +1006,8 @@ + return 0; } +#if defined(SYMBIAN) && !defined(__WINSCW__) /* * UDP_Socket_Client_Server_Test - iterative server test - * + * * One server and several clients are started * Each client connects to the server and sends a chunk of data -@@ -1052,5 +1063,5 @@ + * For each connection, server starts another thread to read the data +@@ -1023,7 +1034,7 @@ UDP_Socket_Client_Server_Test(void) + sparamp->datalen = datalen; DPRINTF(("Creating UDP server")); t = PR_CreateThread(PR_USER_THREAD, - UDP_Server, (void *)sparamp, + UDP_Server, (void *)sparamp, PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, -@@ -1113,10 +1124,11 @@ + PR_UNJOINABLE_THREAD, +@@ -1084,12 +1095,13 @@ UDP_Socket_Client_Server_Test(void) + } PR_ExitMonitor(mon2); printf("%30s","UDP_Socket_Client_Server_Test: "); - printf("%2ld Server %2ld Clients\n",1l, num_udp_clients); - printf("%30s %2ld datagrams_per_client %4ld bytes_per_datagram\n",":", + printf(" 1 Server %2d Clients\n", num_udp_clients); + printf("%30s %2d datagrams_per_client %4d bytes_per_datagram\n",":", num_udp_datagrams_per_client, udp_datagram_size); return 0; } +#endif /* defined(SYMBIAN) && !defined(__WINSCW__) */ static PRFileDesc *small_file_fd, *large_file_fd; -@@ -1470,5 +1482,5 @@ + static void *small_file_addr, *small_file_header, *large_file_addr; +@@ -1441,7 +1453,7 @@ TransmitFile_Client(void *arg) + --(*cp->exit_counter); PR_Notify(cp->exit_mon); PR_ExitMonitor(cp->exit_mon); - DPRINTF(("TransmitFile_Client [0x%lx] exiting\n", PR_GetCurrentThread())); + DPRINTF(("TransmitFile_Client [%p] exiting\n", PR_GetCurrentThread())); } -@@ -1513,5 +1525,5 @@ + /* +@@ -1484,7 +1496,7 @@ Serve_TransmitFile_Client(void *arg) + if (bytes != (SMALL_FILE_SIZE+ SMALL_FILE_HEADER_SIZE)) { fprintf(stderr, "prsocet_test: PR_TransmitFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1521,5 +1533,5 @@ + bytes = PR_TransmitFile(sockfd, local_large_file_fd, NULL, 0, +@@ -1492,7 +1504,7 @@ Serve_TransmitFile_Client(void *arg) + if (bytes != LARGE_FILE_SIZE) { fprintf(stderr, "prsocket_test: PR_TransmitFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1549,5 +1561,5 @@ + +@@ -1520,7 +1532,7 @@ Serve_TransmitFile_Client(void *arg) + slen, bytes); fprintf(stderr, "prsocket_test: PR_SendFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1573,5 +1585,5 @@ + +@@ -1544,7 +1556,7 @@ Serve_TransmitFile_Client(void *arg) + slen, bytes); fprintf(stderr, "prsocket_test: PR_SendFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1595,5 +1607,5 @@ + /* +@@ -1566,7 +1578,7 @@ Serve_TransmitFile_Client(void *arg) + slen, bytes); fprintf(stderr, "prsocket_test: PR_SendFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1617,5 +1629,5 @@ + /* +@@ -1588,7 +1600,7 @@ Serve_TransmitFile_Client(void *arg) + slen, bytes); fprintf(stderr, "prsocket_test: PR_SendFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1639,5 +1651,5 @@ + /* +@@ -1610,7 +1622,7 @@ Serve_TransmitFile_Client(void *arg) + slen, bytes); fprintf(stderr, "prsocket_test: PR_SendFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1661,5 +1673,5 @@ + /* +@@ -1632,7 +1644,7 @@ Serve_TransmitFile_Client(void *arg) + slen, bytes); fprintf(stderr, "prsocket_test: PR_SendFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1683,5 +1695,5 @@ + /* +@@ -1654,7 +1666,7 @@ Serve_TransmitFile_Client(void *arg) + slen, bytes); fprintf(stderr, "prsocket_test: PR_SendFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1707,5 +1719,5 @@ + /* +@@ -1678,7 +1690,7 @@ Serve_TransmitFile_Client(void *arg) + slen, bytes); fprintf(stderr, "prsocket_test: PR_SendFile failed: (%ld, %ld)\n", - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } -@@ -1781,5 +1793,5 @@ + done: +@@ -1752,7 +1764,7 @@ TransmitFile_Server(void *arg) + goto exit; } - DPRINTF(("TCP_Server: PR_BIND netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n", + DPRINTF(("TCP_Server: PR_BIND netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n", netaddr.inet.ip, netaddr.inet.port)); tcp_server_addr.inet.family = netaddr.inet.family; -@@ -1836,5 +1848,5 @@ + tcp_server_addr.inet.port = netaddr.inet.port; +@@ -1807,7 +1819,7 @@ TransmitFile_Server(void *arg) + scp->datalen = sp->datalen; t[i] = PR_CreateThread(PR_USER_THREAD, - Serve_TransmitFile_Client, (void *)scp, + Serve_TransmitFile_Client, (void *)scp, PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, -@@ -1847,5 +1859,5 @@ + PR_JOINABLE_THREAD, +@@ -1818,7 +1830,7 @@ TransmitFile_Server(void *arg) + failed_already=1; goto exit; } - DPRINTF(("TransmitFile_Server: Created Serve_TransmitFile_Client = 0x%lx\n", t)); + DPRINTF(("TransmitFile_Server: Created Serve_TransmitFile_Client = %p\n", t)); } -@@ -1875,10 +1887,10 @@ + /* +@@ -1846,12 +1858,12 @@ exit: + --(*sp->exit_counter); PR_Notify(sp->exit_mon); PR_ExitMonitor(sp->exit_mon); - DPRINTF(("TransmitFile_Server [0x%lx] exiting\n", PR_GetCurrentThread())); + DPRINTF(("TransmitFile_Server [%p] exiting\n", PR_GetCurrentThread())); } /* - * Socket_Misc_Test - test miscellaneous functions - * + * Socket_Misc_Test - test miscellaneous functions + * */ static PRInt32 -@@ -2015,5 +2027,5 @@ + Socket_Misc_Test(void) +@@ -1986,7 +1998,7 @@ Socket_Misc_Test(void) + fprintf(stderr, "prsocket_test failed to write to file %s: (%ld, %ld)\n", LARGE_FILE_NAME, - PR_GetError(), PR_GetOSError()); + (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; rv = -1; -@@ -2094,5 +2106,5 @@ + goto done; +@@ -2065,7 +2077,7 @@ Socket_Misc_Test(void) + sparamp->exit_counter = &thread_count; sparamp->datalen = datalen; t = PR_CreateThread(PR_USER_THREAD, - TransmitFile_Server, (void *)sparamp, + TransmitFile_Server, (void *)sparamp, PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, -@@ -2105,5 +2117,5 @@ + PR_UNJOINABLE_THREAD, +@@ -2076,7 +2088,7 @@ Socket_Misc_Test(void) + rv = -1; goto done; } - DPRINTF(("Created TCP server = 0x%x\n", t)); + DPRINTF(("Created TCP server = %p\n", t)); thread_count++; -@@ -2142,5 +2154,5 @@ + /* +@@ -2113,7 +2125,7 @@ Socket_Misc_Test(void) + failed_already=1; goto done; } - DPRINTF(("Created TransmitFile client = 0x%lx\n", t)); + DPRINTF(("Created TransmitFile client = %p\n", t)); thread_count++; } -@@ -2173,5 +2185,5 @@ + /* Wait for server and client threads to exit */ +@@ -2144,7 +2156,7 @@ done: + } if ((PR_RmDir(TEST_DIR)) == PR_FAILURE) { fprintf(stderr,"prsocket_test failed to rmdir %s: (%ld, %ld)\n", - TEST_DIR, PR_GetError(), PR_GetOSError()); + TEST_DIR, (long)PR_GetError(), (long)PR_GetOSError()); failed_already=1; } ---- ../pr/tests/sprintf.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/sprintf.c Mon Jul 25 22:21:32 2005 -@@ -162,5 +162,5 @@ + +--- pr/tests/sprintf.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/sprintf.c +@@ -127,7 +127,7 @@ static void test_l(char *pattern, char * + (strncmp(s, sbuf, sizeof(sbuf)) != 0)) { fprintf(stderr, "pattern='%s' l=%ld\nPR_smprintf='%s'\nPR_snprintf='%s'\n sprintf='%s'\n", - pattern, l, s, buf, sbuf); + pattern, (long)l, s, buf, sbuf); PR_smprintf_free(s); exit(-1); ---- ../pr/tests/stack.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/stack.c Mon Jul 25 22:22:43 2005 -@@ -86,5 +86,5 @@ - PRIntn main(PRIntn argc, char **argv) + } +--- pr/tests/stack.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/stack.c +@@ -54,7 +54,7 @@ PRFileDesc *errhandle; + int main(int argc, char **argv) { + #if !(defined(SYMBIAN) && defined(__WINS__)) - PRInt32 rv, cnt, sum; + PRInt32 cnt, sum; DataRecord *Item; PRStack *list1, *list2; -@@ -240,5 +240,5 @@ + PRStackElem *node; +@@ -209,7 +209,7 @@ int main(int argc, char **argv) + static void stackop(void *thread_arg) { PRInt32 val, cnt, index, loops; - DataRecord *Items, *Item; + DataRecord *Items; PRStack *list1, *list2; PRStackElem *node; ---- ../pr/tests/suspend.c.orig 2010-09-24 20:14:40.000000000 +0200 -+++ ../pr/tests/suspend.c 2011-01-15 13:56:43.000000000 +0100 -@@ -62,14 +62,14 @@ + stack_data *arg = (stack_data *) thread_arg; +--- pr/tests/suspend.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/suspend.c +@@ -30,14 +30,14 @@ void PR_CALLBACK Level_2_Thread(void *arg) { PR_Sleep(PR_MillisecondsToInterval(4 * 1000)); - printf("Level_2_Thread[0x%lx] exiting\n",PR_GetCurrentThread()); + printf("Level_2_Thread[%p] exiting\n",PR_GetCurrentThread()); return; } void PR_CALLBACK Level_1_Thread(void *arg) { - PRUint32 tmp = (PRUint32)arg; + PRUint32 tmp = (PRUint32)(uintptr_t)arg; PRThreadScope scope = (PRThreadScope) tmp; PRThread *thr; -@@ -84,7 +84,7 @@ +@@ -52,7 +52,7 @@ Level_1_Thread(void *arg) if (!thr) { printf("Could not create thread!\n"); } else { - printf("Level_1_Thread[0x%lx] created %15s thread 0x%lx\n", + printf("Level_1_Thread[%p] created %15s thread %p\n", PR_GetCurrentThread(), (scope == PR_GLOBAL_THREAD) ? "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD", -@@ -95,7 +95,7 @@ +@@ -63,7 +63,7 @@ Level_1_Thread(void *arg) alive--; PR_Notify(mon); PR_ExitMonitor(mon); - printf("Thread[0x%lx] exiting\n",PR_GetCurrentThread()); + printf("Thread[%p] exiting\n",PR_GetCurrentThread()); } static PRStatus PR_CALLBACK print_thread(PRThread *thread, int i, void *arg) -@@ -104,14 +104,15 @@ +@@ -72,14 +72,15 @@ static PRStatus PR_CALLBACK print_thread PRWord *registers; printf( - "\nprint_thread[0x%lx]: %-20s - i = %ld\n",thread, + "\nprint_thread[%p]: %-20s - i = %ld\n",thread, (PR_GLOBAL_THREAD == PR_GetThreadScope(thread)) ? "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD", i); registers = PR_GetGCRegisters(thread, 0, (int *)&words); if (registers) - printf("Registers R0 = 0x%x R1 = 0x%x R2 = 0x%x R3 = 0x%x\n", - registers[0],registers[1],registers[2],registers[3]); - printf("Stack Pointer = 0x%lx\n", PR_GetSP(thread)); + printf("Regsters R0 = 0x%lx R1 = 0x%lx R2 = 0x%lx R3 = 0x%lx\n", + (unsigned long)registers[0], (unsigned long)registers[1], + (unsigned long)registers[2], (unsigned long)registers[3]); + printf("Stack Pointer = %p\n", PR_GetSP(thread)); return PR_SUCCESS; } -@@ -139,7 +140,7 @@ +@@ -107,7 +108,7 @@ static void Level_0_Thread(PRThreadScope printf("Could not create thread!\n"); alive--; } - printf("Level_0_Thread[0x%lx] created %15s thread 0x%lx\n", + printf("Level_0_Thread[%p] created %15s thread %p\n", PR_GetCurrentThread(), (scope1 == PR_GLOBAL_THREAD) ? "PR_GLOBAL_THREAD" : "PR_LOCAL_THREAD", -@@ -151,9 +152,10 @@ +@@ -119,9 +120,10 @@ static void Level_0_Thread(PRThreadScope PR_EnumerateThreads(print_thread, NULL); registers = PR_GetGCRegisters(me, 1, (int *)&words); if (registers) - printf("My Registers: R0 = 0x%x R1 = 0x%x R2 = 0x%x R3 = 0x%x\n", - registers[0],registers[1],registers[2],registers[3]); - printf("My Stack Pointer = 0x%lx\n", PR_GetSP(me)); + printf("My Registers: R0 = 0x%lx R1 = 0x%lx R2 = 0x%lx R3 = 0x%lx\n", + (unsigned long)registers[0], (unsigned long)registers[1], + (unsigned long)registers[2], (unsigned long)registers[3]); + printf("My Stack Pointer = %p\n", PR_GetSP(me)); PR_ResumeAll(); /* Wait for all threads to exit */ ---- ../pr/tests/testfile.c Tue Jun 20 17:46:54 2000 -+++ ../pr/tests/testfile.c Mon Jul 25 22:36:39 2005 -@@ -69,4 +69,7 @@ +--- pr/tests/switch.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/switch.c +@@ -80,7 +80,7 @@ PRIntn PR_CALLBACK Switch(PRIntn argc, c + PRStatus status; + PRBool help = PR_FALSE; + PRUintn concurrency = 1; +- Shared *shared, *link; ++ Shared *shared = NULL, *link; + PRIntervalTime timein, timeout; + PRThreadScope thread_scope = PR_LOCAL_THREAD; + PRUintn thread_count, inner_count, loop_count, average; +--- pr/tests/testfile.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/testfile.c +@@ -36,6 +36,9 @@ static int _debug_on = 0; + #ifdef XP_WIN #define mode_t int #endif +#if defined(XP_UNIX) || defined(XP_OS2_EMX) +# include /* getopt(3) */ +#endif #define DPRINTF(arg) if (_debug_on) printf arg -@@ -119,5 +122,5 @@ +@@ -93,7 +96,7 @@ static PRInt32 PR_CALLBACK DirTest(void + PRInt32 dirtest_failed = 0; + PRThread* create_new_thread(PRThreadType type, - void (*start)(void *arg), + void *(*start)(void *arg), void *arg, PRThreadPriority priority, -@@ -181,5 +184,5 @@ + PRThreadScope scope, +@@ -155,7 +158,7 @@ PRInt32 native_thread = 0; + return((PRThread *) thandle); #endif } else { - return(PR_CreateThread(type,start,arg,priority,scope,state,stackSize)); + return(PR_CreateThread(type,(void (*)(void*))start,arg,priority,scope,state,stackSize)); } #else -@@ -342,6 +345,6 @@ + return(PR_CreateThread(type,start,arg,priority,scope,state,stackSize)); +@@ -316,8 +319,8 @@ char tmpname[1024]; + printf( "testfile PR_GetFileInfo returned incorrect status-change time: %s\n", pathname); - printf("ft = %lld, ft1 = %lld\n",file_info.creationTime, - file_info1.creationTime); + printf("ft = %lld, ft1 = %lld\n", (long long)file_info.creationTime, + (long long)file_info1.creationTime); rv = -1; goto cleanup; -@@ -368,6 +371,6 @@ + } +@@ -342,8 +345,8 @@ char tmpname[1024]; + printf( "testfile PR_GetFileInfo returned incorrect modify time: %s\n", pathname); - printf("ft = %lld, ft1 = %lld\n",file_info.modifyTime, - file_info1.modifyTime); + printf("ft = %lld, ft1 = %lld\n", (long long)file_info.modifyTime, + (long long)file_info1.modifyTime); rv = -1; goto cleanup; -@@ -495,5 +498,5 @@ + } +@@ -469,7 +472,7 @@ File_Rdwr_Param *fparamp; + memset(fparamp->buf, i, len); t = create_new_thread(PR_USER_THREAD, - File_Write, (void *)fparamp, + (void *(*)(void *))File_Write, (void *)fparamp, PR_PRIORITY_NORMAL, scope, -@@ -530,5 +533,5 @@ + PR_UNJOINABLE_THREAD, +@@ -504,7 +507,7 @@ File_Rdwr_Param *fparamp; + fparamp->len = len; t = create_new_thread(PR_USER_THREAD, - File_Read, (void *)fparamp, + (void *(*)(void *))File_Read, (void *)fparamp, PR_PRIORITY_NORMAL, scope, -@@ -598,5 +601,5 @@ + PR_UNJOINABLE_THREAD, +@@ -572,7 +575,7 @@ struct dirtest_arg thrarg; + thrarg.done= 0; t = create_new_thread(PR_USER_THREAD, - DirTest, &thrarg, + (void *(*)(void *))DirTest, &thrarg, PR_PRIORITY_NORMAL, PR_LOCAL_THREAD, -@@ -953,6 +956,4 @@ - #if defined(XP_UNIX) || defined(XP_OS2_EMX) + PR_UNJOINABLE_THREAD, +@@ -895,8 +898,6 @@ int main(int argc, char **argv) + #endif + #if defined(XP_UNIX) || defined(XP_OS2) int opt; - extern char *optarg; - extern int optind; #endif - #if defined(XP_UNIX) || defined(XP_OS2_EMX) ---- ../pr/tests/thrpool_server.c 2009-05-06 01:40:39.000000000 -0400 -+++ ../pr/tests/thrpool_server.c 2009-11-04 16:53:49.000000000 -0500 -@@ -351,5 +351,5 @@ + #if defined(XP_UNIX) || defined(XP_OS2) + while ((opt = getopt(argc, argv, "d")) != EOF) { +--- pr/tests/threads.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/threads.c +@@ -27,7 +27,7 @@ void + PR_CALLBACK + DumbThread(void *arg) + { +- PRInt32 tmp = (PRInt32)arg; ++ PRInt32 tmp = (PRInt32)(intptr_t)arg; + PRThreadScope scope = (PRThreadScope)tmp; + PRThread *thr; - DPRINTF(( -- "TCP_Server: PR_BIND netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n", -+ "TCP_Server: PR_BIND netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n", - netaddr.inet.ip, netaddr.inet.port)); +@@ -167,10 +167,10 @@ int main(int argc, char **argv) -@@ -363,5 +363,5 @@ - sp->iod.timeout = PR_SecondsToInterval(60); - sp->datalen = tcp_mesg_size; -- sp->exit_mon = sc_mon; -+ sp->exit_mon = NULL; - sp->job_counterp = &job_counter; - sp->conn_counter = 0; -@@ -486,5 +486,5 @@ + if (debug_mode) + { +- printf("\ +-** Tests lots of thread creations. \n\ +-** Create %ld native threads %ld times. \n\ +-** Create %ld user threads %ld times \n", iterations,count,iterations,count); ++ printf("** Tests lots of thread creations.\n" ++ "** Create %d native threads %d times.\n" ++ "** Create %d user threads %d times.\n", iterations, count, ++ iterations, count); + } - PR_ASSERT(NULL != jobp); -- DPRINTF(("TCP_Server: Created Serve_Client = 0x%lx\n", jobp)); -+ DPRINTF(("TCP_Server: Created Serve_Client = %p\n", jobp)); + for (index=0; indexexit_mon); - printf("%30s","TCP_Socket_Client_Server_Test:"); -- printf("%2ld Server %2ld Clients %2ld connections_per_client\n",1l, -+ printf(" 1 Server %2d Clients %2d connections_per_client\n", - num_tcp_clients, num_tcp_connections_per_client); -- printf("%30s %2ld messages_per_connection %4ld bytes_per_message\n",":", -+ printf("%30s %2d messages_per_connection %4d bytes_per_message\n",":", - num_tcp_mesgs_per_connection, tcp_mesg_size); - ---- ../pr/tests/thrpool_client.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/thrpool_client.c Mon Jul 25 22:40:45 2005 -@@ -127,9 +127,9 @@ - for (rem=len; rem; offset += bytes, rem -= bytes) { - DPRINTF(("thread = 0x%lx: calling PR_Recv, bytes = %d\n", + DPRINTF(("thread = %p: calling PR_Recv, bytes = %d\n", PR_GetCurrentThread(), rem)); bytes = PR_Recv(sockfd, buf + offset, rem, 0, timeout); - DPRINTF(("thread = 0x%lx: returning from PR_Recv, bytes = %d\n", + DPRINTF(("thread = %p: returning from PR_Recv, bytes = %d\n", PR_GetCurrentThread(), bytes)); if (bytes < 0) { -@@ -152,9 +152,9 @@ + return -1; +@@ -107,11 +107,11 @@ writen(PRFileDesc *sockfd, char *buf, in + int offset = 0; for (rem=len; rem; offset += bytes, rem -= bytes) { - DPRINTF(("thread = 0x%lx: calling PR_Send, bytes = %d\n", + DPRINTF(("thread = %p: calling PR_Send, bytes = %d\n", PR_GetCurrentThread(), rem)); bytes = PR_Send(sockfd, buf + offset, rem, 0, PR_INTERVAL_NO_TIMEOUT); - DPRINTF(("thread = 0x%lx: returning from PR_Send, bytes = %d\n", + DPRINTF(("thread = %p: returning from PR_Send, bytes = %d\n", PR_GetCurrentThread(), bytes)); if (bytes <= 0) -@@ -209,5 +209,5 @@ + return -1; +@@ -164,7 +164,7 @@ TCP_Client(void *arg) + DPRINTF(("TCP client connecting to server:%d\n", server_port)); if (PR_Connect(sockfd, &netaddr,PR_INTERVAL_NO_TIMEOUT) < 0){ - fprintf(stderr, "PR_Connect failed: (%ld, %ld)\n", + fprintf(stderr, "PR_Connect failed: (%d, %d)\n", PR_GetError(), PR_GetOSError()); failed_already=1; -@@ -218,5 +218,5 @@ + return; +@@ -173,7 +173,7 @@ TCP_Client(void *arg) + /* * fill in random data */ - memset(out_buf->data, ((PRInt32) (&netaddr)) + i + j, bytes); + memset(out_buf->data, ((intptr_t)(&netaddr)) + i + j, bytes); /* * write to server -@@ -326,5 +326,5 @@ + */ +@@ -281,7 +281,7 @@ TCP_Socket_Client_Server_Test(void) + PR_EnterMonitor(mon2); connections++; PR_ExitMonitor(mon2); - DPRINTF(("Created TCP client = 0x%lx\n", thr)); + DPRINTF(("Created TCP client = %p\n", thr)); } /* Wait for client jobs to exit */ -@@ -336,7 +336,7 @@ + PR_EnterMonitor(mon2); +@@ -291,9 +291,9 @@ TCP_Socket_Client_Server_Test(void) + } PR_ExitMonitor(mon2); printf("%30s","TCP_Socket_Client_Server_Test:"); - printf("%2ld Server %2ld Clients %2ld connections_per_client\n",1l, + printf(" 1 Server %2d Clients %2d connections_per_client\n", num_tcp_clients, num_tcp_connections_per_client); - printf("%30s %2ld messages_per_connection %4ld bytes_per_message\n",":", + printf("%30s %2d messages_per_connection %4d bytes_per_message\n",":", num_tcp_mesgs_per_connection, tcp_mesg_size); ---- ../pr/tests/threads.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/threads.c Mon Jul 25 22:43:10 2005 -@@ -66,5 +66,5 @@ - DumbThread(void *arg) - { -- PRInt32 tmp = (PRInt32)arg; -+ PRInt32 tmp = (PRInt32)(intptr_t)arg; - PRThreadScope scope = (PRThreadScope)tmp; - PRThread *thr; -@@ -214,8 +214,8 @@ - if (debug_mode) - { -- printf("\ --** Tests lots of thread creations. \n\ --** Create %ld native threads %ld times. \n\ --** Create %ld user threads %ld times \n", iterations,count,iterations,count); -+ printf("** Tests lots of thread creations.\n" -+ "** Create %d native threads %d times.\n" -+ "** Create %d user threads %d times.\n", iterations, count, -+ iterations, count); + PR_DELETE(cparamp); +--- pr/tests/thrpool_server.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/thrpool_server.c +@@ -329,7 +329,7 @@ TCP_Server(void *arg) } ---- ../pr/tests/thruput.c.orig 2009-02-23 00:00:45.000000000 -0500 -+++ ../pr/tests/thruput.c 2009-11-04 16:56:33.000000000 -0500 -@@ -99,5 +99,5 @@ + DPRINTF(( +- "TCP_Server: PR_BIND netaddr.inet.ip = 0x%lx, netaddr.inet.port = %d\n", ++ "TCP_Server: PR_BIND netaddr.inet.ip = 0x%x, netaddr.inet.port = %d\n", + netaddr.inet.ip, netaddr.inet.port)); + + sp = PR_NEW(Server_Param); +@@ -341,7 +341,7 @@ TCP_Server(void *arg) + sp->iod.socket = sockfd; + sp->iod.timeout = PR_SecondsToInterval(60); + sp->datalen = tcp_mesg_size; +- sp->exit_mon = sc_mon; ++ sp->exit_mon = NULL; + sp->job_counterp = &job_counter; + sp->conn_counter = 0; + sp->tp = tp; +@@ -464,7 +464,7 @@ TCP_Server_Accept(void *arg) + PR_FALSE); + + PR_ASSERT(NULL != jobp); +- DPRINTF(("TCP_Server: Created Serve_Client = 0x%lx\n", jobp)); ++ DPRINTF(("TCP_Server: Created Serve_Client = %p\n", jobp)); + + /* + * single-threaded update; no lock needed +@@ -481,7 +481,7 @@ TCP_Server_Accept(void *arg) + print_stats, sp, PR_FALSE); + + PR_ASSERT(NULL != jobp); +- DPRINTF(("TCP_Server: Created print_stats timer job = 0x%lx\n", jobp)); ++ DPRINTF(("TCP_Server: Created print_stats timer job = %p\n", jobp)); + + exit: + PR_EnterMonitor(sp->exit_mon); +@@ -498,9 +498,9 @@ exit: + } + PR_DestroyMonitor(sp->exit_mon); + printf("%30s","TCP_Socket_Client_Server_Test:"); +- printf("%2ld Server %2ld Clients %2ld connections_per_client\n",1l, ++ printf(" 1 Server %2d Clients %2d connections_per_client\n", + num_tcp_clients, num_tcp_connections_per_client); +- printf("%30s %2ld messages_per_connection %4ld bytes_per_message\n",":", ++ printf("%30s %2d messages_per_connection %4d bytes_per_message\n",":", + num_tcp_mesgs_per_connection, tcp_mesg_size); + + DPRINTF(("%s: calling PR_ShutdownThreadPool\n", program_name)); +--- pr/tests/thruput.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/thruput.c +@@ -66,7 +66,7 @@ static void PR_CALLBACK Clientel(void *a + { PRStatus rv; PRFileDesc *xport; - PRInt32 bytes, sampled; + PRInt32 bytes, sampled = -1; PRIntervalTime now, interval; PRBool do_display = PR_FALSE; -@@ -208,5 +208,5 @@ + Shared *shared = (Shared*)arg; +@@ -175,7 +175,7 @@ static void Client(const char *server_na + static void PR_CALLBACK Servette(void *arg) { - PRInt32 bytes, sampled; + PRInt32 bytes, sampled = -1; PRIntervalTime now, interval; PRBool do_display = PR_FALSE; -@@ -405,4 +405,5 @@ + PRFileDesc *client = (PRFileDesc*)arg; +@@ -373,6 +373,7 @@ int main(int argc, char **argv) else Client(server_name); + return 0; + return 0; } /* main */ ---- ../pr/tests/timemac.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/timemac.c Mon Jul 25 22:45:33 2005 -@@ -63,5 +63,5 @@ + /* thruput.c */ +--- pr/tests/timemac.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/timemac.c +@@ -24,7 +24,7 @@ static void printExplodedTime(const PREx + const char *sign; /* Print day of the week, month, day, hour, minute, and second */ - printf( "%s %s %ld %02ld:%02ld:%02ld ", + printf( "%s %s %d %02d:%02d:%02d ", dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday, et->tm_hour, et->tm_min, et->tm_sec); -@@ -79,5 +79,5 @@ + +@@ -40,7 +40,7 @@ static void printExplodedTime(const PREx + } hourOffset = totalOffset / 3600; minOffset = (totalOffset % 3600) / 60; - printf("%s%02ld%02ld ", sign, hourOffset, minOffset); + printf("%s%02d%02d ", sign, hourOffset, minOffset); } -@@ -140,5 +140,5 @@ + /* Print year */ +@@ -97,7 +97,7 @@ int main(int argc, char** argv) + printf("Current local time is "); printExplodedTime(&et); printf("\n"); - printf("GMT offset is %ld, DST offset is %ld\n", + printf("GMT offset is %d, DST offset is %d\n", et.tm_params.tp_gmt_offset, et.tm_params.tp_dst_offset); t2 = PR_ImplodeTime(&et); ---- ../pr/tests/timetest.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/timetest.c Mon Jul 25 22:48:03 2005 -@@ -75,5 +75,5 @@ + if (LL_NE(t1, t2)) { +--- pr/tests/timetest.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/timetest.c +@@ -36,7 +36,7 @@ static void PrintExplodedTime(const PREx + const char *sign; /* Print day of the week, month, day, hour, minute, and second */ - if (debug_mode) printf("%s %s %ld %02ld:%02ld:%02ld ", + if (debug_mode) printf("%s %s %d %02d:%02d:%02d ", dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday, et->tm_hour, et->tm_min, et->tm_sec); -@@ -92,5 +92,5 @@ + +@@ -53,7 +53,7 @@ static void PrintExplodedTime(const PREx + hourOffset = totalOffset / 3600; minOffset = (totalOffset % 3600) / 60; if (debug_mode) - printf("%s%02ld%02ld ", sign, hourOffset, minOffset); + printf("%s%02d%02d ", sign, hourOffset, minOffset); } -@@ -276,5 +276,5 @@ + /* Print year */ +@@ -232,7 +232,7 @@ int main(int argc, char** argv) + if (debug_mode) printf("Current local time is "); PrintExplodedTime(&et); if (debug_mode) printf("\n"); - if (debug_mode) printf("GMT offset is %ld, DST offset is %ld\n", + if (debug_mode) printf("GMT offset is %d, DST offset is %d\n", et.tm_params.tp_gmt_offset, et.tm_params.tp_dst_offset); t2 = PR_ImplodeTime(&et); ---- ../pr/tests/y2k.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/y2k.c Mon Jul 25 22:49:18 2005 -@@ -82,5 +82,5 @@ + if (LL_NE(t1, t2)) { +--- pr/tests/y2k.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/y2k.c +@@ -43,7 +43,7 @@ static void PrintExplodedTime(const PREx + const char *sign; /* Print day of the week, month, day, hour, minute, and second */ - printf("%s %s %2ld %02ld:%02ld:%02ld ", + printf("%s %s %2d %02d:%02d:%02d ", dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday, et->tm_hour, et->tm_min, et->tm_sec); -@@ -101,5 +101,5 @@ + +@@ -62,7 +62,7 @@ static void PrintExplodedTime(const PREx + } hourOffset = totalOffset / 3600; minOffset = (totalOffset % 3600) / 60; - printf("%s%02ld%02ld ", sign, hourOffset, minOffset); + printf("%s%02d%02d ", sign, hourOffset, minOffset); } #ifdef PRINT_DETAILS ---- ../pr/tests/y2ktmo.c Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/y2ktmo.c Mon Jul 25 22:58:00 2005 -@@ -95,5 +95,5 @@ + printf("{%d, %d, %d, %d, %d, %d, %d, %d, %d, { %d, %d}}\n",et->tm_usec, +--- pr/tests/y2ktmo.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/y2ktmo.c +@@ -70,7 +70,7 @@ static struct _timeb start_time_tb; + static void SleepThread(void *arg) { - PRIntervalTime timeout = (PRIntervalTime) arg; + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg; PRIntervalTime elapsed; #if defined(XP_UNIX) || defined(WIN32) -@@ -142,5 +142,5 @@ + PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout); +@@ -121,7 +121,7 @@ static void SleepThread(void *arg) + static void AcceptThread(void *arg) { - PRIntervalTime timeout = (PRIntervalTime) arg; + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg; PRIntervalTime elapsed; #if defined(XP_UNIX) || defined(WIN32) -@@ -214,5 +214,5 @@ + PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout); +@@ -197,7 +197,7 @@ static void AcceptThread(void *arg) + static void PollThread(void *arg) { - PRIntervalTime timeout = (PRIntervalTime) arg; + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg; PRIntervalTime elapsed; #if defined(XP_UNIX) || defined(WIN32) -@@ -289,5 +289,5 @@ + PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout); +@@ -276,7 +276,7 @@ static void PollThread(void *arg) + static void WaitCondVarThread(void *arg) { - PRIntervalTime timeout = (PRIntervalTime) arg; + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg; PRIntervalTime elapsed; #if defined(XP_UNIX) || defined(WIN32) -@@ -349,5 +349,5 @@ + PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout); +@@ -340,7 +340,7 @@ static void WaitCondVarThread(void *arg) + static void WaitMonitorThread(void *arg) { - PRIntervalTime timeout = (PRIntervalTime) arg; + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg; PRIntervalTime elapsed; #if defined(XP_UNIX) || defined(WIN32) -@@ -402,5 +402,5 @@ + PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout); +@@ -397,7 +397,7 @@ static void WaitMonitorThread(void *arg) + static void WaitCMonitorThread(void *arg) { - PRIntervalTime timeout = (PRIntervalTime) arg; + PRIntervalTime timeout = (PRIntervalTime)(intptr_t)arg; PRIntervalTime elapsed; #if defined(XP_UNIX) || defined(WIN32) -@@ -525,5 +525,5 @@ + PRInt32 timeout_msecs = PR_IntervalToMilliseconds(timeout); +@@ -528,7 +528,7 @@ int main(int argc, char **argv) + for (i = 0; i < num_thread_scopes; i++) { for (j = 0; j < num_thread_funcs; j++) { threads[idx] = PR_CreateThread(PR_USER_THREAD, threadFuncs[j], - (void*)PR_SecondsToInterval(secs), PR_PRIORITY_NORMAL, + (void*)(intptr_t)PR_SecondsToInterval(secs), PR_PRIORITY_NORMAL, threadScopes[i], PR_JOINABLE_THREAD, 0); if (threads[idx] == NULL) { ---- ../pr/tests/zerolen.c.orig 2012-03-06 14:14:33.000000000 +0100 -+++ ../pr/tests/zerolen.c 2012-06-04 13:39:40.000000000 +0200 -@@ -45,7 +45,7 @@ + fprintf(stderr, "PR_CreateThread failed\n"); +--- pr/tests/zerolen.c.orig 2015-10-16 13:22:19 UTC ++++ pr/tests/zerolen.c +@@ -45,7 +45,7 @@ static void ClientThread(void *arg) { PRFileDesc *sock; PRNetAddr addr; - PRUint16 port = (PRUint16) arg; + PRUint16 port = (PRUint16)(uintptr_t)arg; char buf[1024]; PRInt32 nbytes; -@@ -127,7 +127,7 @@ +@@ -127,7 +127,7 @@ int main() * First test PR_Writev. */ clientThread = PR_CreateThread(PR_USER_THREAD, - ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)), + ClientThread, (void *)(uintptr_t)PR_ntohs(PR_NetAddrInetPort(&addr)), PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0); if (NULL == clientThread) { fprintf(stderr, "PR_CreateThread failed\n"); -@@ -171,7 +171,7 @@ +@@ -171,7 +171,7 @@ int main() * Then test PR_Write. */ clientThread = PR_CreateThread(PR_USER_THREAD, - ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)), + ClientThread, (void *)(uintptr_t)PR_ntohs(PR_NetAddrInetPort(&addr)), PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0); if (NULL == clientThread) { fprintf(stderr, "PR_CreateThread failed\n"); -@@ -216,7 +216,7 @@ +@@ -216,7 +216,7 @@ int main() * Finally test PR_Send. */ clientThread = PR_CreateThread(PR_USER_THREAD, - ClientThread, (void *) PR_ntohs(PR_NetAddrInetPort(&addr)), + ClientThread, (void *)(uintptr_t)PR_ntohs(PR_NetAddrInetPort(&addr)), PR_PRIORITY_NORMAL, PR_GLOBAL_THREAD, PR_JOINABLE_THREAD, 0); if (NULL == clientThread) { fprintf(stderr, "PR_CreateThread failed\n"); ---- ../pr/tests/runtests.sh Sun Apr 25 11:01:02 2004 -+++ ../pr/tests/runtests.sh Tue Jul 26 00:01:35 2005 -@@ -85,7 +85,4 @@ - # - --#forktest (failed on IRIX) --#nbconn - fails on some platforms --#poll_er - fails on some platforms? limited use? - #prpoll - the bad-FD test needs to be moved to a different test - #sleep - specific to OS/2 -@@ -119,4 +116,5 @@ - fileio - foreign -+forktest - formattm - fsync -@@ -126,5 +124,4 @@ - initclk - inrval --instrumt - intrio - intrupt -@@ -146,4 +143,5 @@ - multiwait - nameshm1 -+nbconn - nblayer - nonblock -@@ -161,4 +159,5 @@ - pipeping2 - pipeself -+poll_er - poll_nm - poll_to -@@ -230,5 +229,5 @@ - printf "BEGIN\t\t\t`date`\n" - printf "NSPR_TEST_LOGFILE\t${LOGFILE}\n\n" --printf "Test\t\t\tResult\n\n" -+printf " Test\t\t\tResult\n\n" - if [ $OS_PLATFORM = "Windows_95" ] || [ $OS_PLATFORM = "Windows_98" ] || [ $OS_PLATFORM = "Windows_NT" ] || [ $OS_PLATFORM = "OS/2" ] ; then - for prog in $TESTS -@@ -248,8 +247,6 @@ - for prog in $TESTS - do -- printf "$prog" -- printf "\nBEGIN TEST: $prog\n\n" >> ${LOGFILE} 2>&1 -- export test_rval -- ./$prog >> ${LOGFILE} 2>&1 & -+ printf %16s $prog -+ ./$prog >> $prog.output 2>&1 & - test_pid=$! - sleep_pid=0 -@@ -266,7 +263,7 @@ - else - printf "\t\t\tFAILED\n"; -+ sed "s,^, $prog: ," < $prog.output - rval=1 - fi; -- printf "\nEND TEST: $prog\n\n" >> ${LOGFILE} 2>&1 - done - fi; -@@ -274,19 +271,2 @@ - printf "END\t\t\t`date`\n" - exit $rval -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- ---- ../pr/tests/server_test.c.orig 2009-03-18 10:49:45.000000000 +0100 -+++ ../pr/tests/server_test.c 2009-06-17 09:30:18.000000000 +0200 -@@ -92,7 +92,7 @@ - #ifdef DEBUGPRINTS - #define DPRINTF printf - #else --#define DPRINTF -+#define DPRINTF(...) - #endif - - -@@ -534,6 +534,7 @@ - do_work(); - } - -+#if 0 - static void do_workUK(void) - { - ServerScope = PR_LOCAL_THREAD; -@@ -554,6 +555,7 @@ - ClientScope = PR_GLOBAL_THREAD; - do_work(); - } -+#endif - - - static void Measure(void (*func)(void), const char *msg) ---- ../pr/tests/servr_ku.c.orig 2009-03-18 10:49:46.000000000 +0100 -+++ ../pr/tests/servr_ku.c 2009-06-17 09:51:45.000000000 +0200 -@@ -89,7 +89,7 @@ - #ifdef DEBUGPRINTS - #define DPRINTF printf - #else --#define DPRINTF -+#define DPRINTF(...) - #endif - - PRIntn failed_already=0; ---- ../pr/tests/servr_uk.c.orig 2009-03-18 10:49:46.000000000 +0100 -+++ ../pr/tests/servr_uk.c 2009-06-17 09:53:37.000000000 +0200 -@@ -89,7 +89,7 @@ - #ifdef DEBUGPRINTS - #define DPRINTF printf - #else --#define DPRINTF -+#define DPRINTF(...) - #endif - - PRIntn failed_already=0; ---- ../pr/tests/servr_uu.c.orig 2009-03-18 10:49:46.000000000 +0100 -+++ ../pr/tests/servr_uu.c 2009-06-17 09:55:30.000000000 +0200 -@@ -89,7 +89,7 @@ - #ifdef DEBUGPRINTS - #define DPRINTF printf - #else --#define DPRINTF -+#define DPRINTF(...) - #endif - - PRIntn failed_already=0; ---- ../pr/tests/cltsrv.c 2009-05-06 01:40:38.000000000 -0400 -+++ ../pr/tests/cltsrv.c 2009-11-04 15:34:25.000000000 -0500 -@@ -920,5 +920,5 @@ - PRUintn index; - PRBool boolean; -- CSClient_t *client; -+ CSClient_t *client = NULL; - PRStatus rv, joinStatus; - CSServer_t *server = NULL; ---- ../pr/tests/parsetm.c 2009-05-11 18:23:19.000000000 -0400 -+++ ../pr/tests/parsetm.c 2009-11-04 16:27:29.000000000 -0500 -@@ -64,6 +64,6 @@ - /* Print day of the week, month, day, hour, minute, and second */ - if (debug_mode) printf("%s %s %ld %02ld:%02ld:%02ld ", -- dayOfWeek[et->tm_wday], month[et->tm_month], et->tm_mday, -- et->tm_hour, et->tm_min, et->tm_sec); -+ dayOfWeek[et->tm_wday], month[et->tm_month], (long)et->tm_mday, -+ (long)et->tm_hour, (long)et->tm_min, (long)et->tm_sec); - - /* Print time zone */ -@@ -80,4 +80,4 @@ - minOffset = (totalOffset % 3600) / 60; - if (debug_mode) -- printf("%s%02ld%02ld ", sign, hourOffset, minOffset); -+ printf("%s%02ld%02ld ", sign, (long)hourOffset, (long)minOffset); - } ---- ../pr/tests/provider.c 2009-05-06 01:40:39.000000000 -0400 -+++ ../pr/tests/provider.c 2009-11-04 16:29:30.000000000 -0500 -@@ -1082,5 +1082,5 @@ - PRUintn index; - PRBool boolean; -- CSClient_t *client; -+ CSClient_t *client = NULL; - PRStatus rv, joinStatus; - CSServer_t *server = NULL; ---- ../pr/tests/switch.c 2009-05-06 01:40:39.000000000 -0400 -+++ ../pr/tests/switch.c 2009-11-04 16:48:07.000000000 -0500 -@@ -113,5 +113,5 @@ - PRBool help = PR_FALSE; - PRUintn concurrency = 1; -- Shared *shared, *link; -+ Shared *shared = NULL, *link; - PRIntervalTime timein, timeout; - PRThreadScope thread_scope = PR_LOCAL_THREAD; Index: head/devel/nspr/files/patch-warnings =================================================================== --- head/devel/nspr/files/patch-warnings (revision 402127) +++ head/devel/nspr/files/patch-warnings (revision 402128) @@ -1,98 +1,116 @@ ---- ../pr/src/pthreads/ptio.c 2009-05-09 23:07:02.000000000 -0400 -+++ ../pr/src/pthreads/ptio.c 2009-11-04 15:24:47.000000000 -0500 -@@ -3758,7 +3769,7 @@ - * We use these variables to figure out how much time has - * elapsed and how much of the timeout still remains. - */ -- PRIntervalTime start, elapsed, remaining; -+ PRIntervalTime start = 0, elapsed, remaining; - - if (pt_TestAbort()) return -1; - -@@ -4927,6 +4938,7 @@ - - if (timeout == PR_INTERVAL_NO_TIMEOUT) { - tvp = NULL; -+ start = 0; /* Not needed, but shuts down a warning */ - } else { - tv.tv_sec = (PRInt32)PR_IntervalToSeconds(timeout); - tv.tv_usec = (PRInt32)PR_IntervalToMicroseconds( ---- ../pr/src/pthreads/ptsynch.c Mon Nov 22 16:24:53 2004 -+++ ../pr/src/pthreads/ptsynch.c Mon Jul 25 00:03:49 2005 -@@ -63,5 +63,5 @@ - #endif /* defined(DEBUG) */ - --#if defined(FREEBSD) -+#if defined(FREEBSD) && (defined(DEBUG) || defined(FORCE_PR_ASSERT)) - /* - * On older versions of FreeBSD, pthread_mutex_trylock returns EDEADLK. ---- ../pr/include/prcountr.h Sun Apr 25 11:00:47 2004 -+++ ../pr/include/prcountr.h Mon Jul 25 20:43:03 2005 -@@ -427,5 +427,5 @@ +--- pr/include/prcountr.h.orig 2015-10-16 13:22:19 UTC ++++ pr/include/prcountr.h +@@ -394,7 +394,7 @@ NSPR_API(void) + #define PR_GET_COUNTER(counter,handle)\ (counter) = PR_GetCounter((handle)) #else -#define PR_GET_COUNTER(counter,handle) 0 +#define PR_GET_COUNTER(counter,handle) #endif -@@ -501,5 +501,5 @@ + NSPR_API(PRUint32) +@@ -468,7 +468,7 @@ NSPR_API(void) + #define PR_FIND_NEXT_COUNTER_QNAME(next,handle)\ (next) = PR_FindNextCounterQname((handle)) #else -#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) NULL +#define PR_FIND_NEXT_COUNTER_QNAME(next,handle) #endif ---- ../pr/src/io/prprf.c 2008-05-31 11:10:17.000000000 -0400 -+++ ../pr/src/io/prprf.c 2009-11-04 14:27:19.000000000 -0500 -@@ -698,5 +698,5 @@ + NSPR_API(PRCounterHandle) +--- pr/src/io/prprf.c.orig 2015-10-16 13:22:19 UTC ++++ pr/src/io/prprf.c +@@ -697,7 +697,7 @@ static int dosprintf(SprintfState *ss, c + char *hexp; int rv, i; struct NumArg* nas = NULL; - struct NumArg* nap; + struct NumArg* nap = NULL; struct NumArg nasArray[ NAS_DEFAULT_NUM ]; char pattern[20]; ---- ../pr/src/io/prscanf.c 2005-08-05 18:44:06.000000000 -0400 -+++ ../pr/src/io/prscanf.c 2009-11-04 14:31:24.000000000 -0500 -@@ -230,5 +230,5 @@ + const char* dolPt = NULL; /* in "%4$.2f", dolPt will point to . */ +--- pr/src/io/prscanf.c.orig 2015-10-16 13:22:19 UTC ++++ pr/src/io/prscanf.c +@@ -194,7 +194,7 @@ static PRStatus + GetInt(ScanfState *state, int code) { char buf[FMAX + 1], *p; - int ch; + int ch = -1; static const char digits[] = "0123456789abcdefABCDEF"; PRBool seenDigit = PR_FALSE; -@@ -340,5 +340,5 @@ + int base; +@@ -304,7 +304,7 @@ static PRStatus + GetFloat(ScanfState *state) { char buf[FMAX + 1], *p; - int ch; + int ch = -1; PRBool seenDigit = PR_FALSE; ---- ../pr/src/misc/pralarm.c 2009-05-06 01:40:37.000000000 -0400 -+++ ../pr/src/misc/pralarm.c 2009-11-04 14:34:27.000000000 -0500 -@@ -134,5 +134,5 @@ + if (state->width == 0 || state->width > FMAX) { +--- pr/src/misc/pralarm.c.orig 2015-10-16 13:22:19 UTC ++++ pr/src/misc/pralarm.c +@@ -101,7 +101,7 @@ static void PR_CALLBACK pr_alarmNotifier + while (why != abort) { - PRIntervalTime pause; + PRIntervalTime pause = 0; PR_Lock(alarm->lock); ---- ../pr/src/misc/prdtoa.c 2009-10-05 18:58:41.000000000 -0400 -+++ ../pr/src/misc/prdtoa.c 2009-11-04 14:36:24.000000000 -0500 -@@ -2765,5 +2765,5 @@ + while (why == scan) +--- pr/src/misc/prdtoa.c.orig 2015-10-16 13:22:19 UTC ++++ pr/src/misc/prdtoa.c +@@ -2751,7 +2751,7 @@ dtoa + to hold the suppressed trailing zeros. */ - int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, + int bbits, b2, b5, be, dig, i, ieps, ilim = -1, ilim0, ilim1 = -1, j, j1, k, k0, k_check, leftright, m2, m5, s2, s5, spec_case, try_quick; ---- ../pr/src/misc/prtpool.c 2005-04-28 18:37:25.000000000 -0400 -+++ ../pr/src/misc/prtpool.c 2009-11-04 15:08:05.000000000 -0500 -@@ -314,6 +314,6 @@ + Long L; +--- pr/src/misc/prtpool.c.orig 2015-10-16 13:22:19 UTC ++++ pr/src/misc/prtpool.c +@@ -281,8 +281,8 @@ PRThreadPool *tp = (PRThreadPool *) arg; + int pollfd_cnt, pollfds_used; int rv; PRCList *qp, *nextqp; -PRPollDesc *pollfds; -PRJob **polljobs; +PRPollDesc *pollfds = NULL; +PRJob **polljobs = NULL; int poll_timeout; PRIntervalTime now; + +--- pr/src/pthreads/ptio.c.orig 2015-10-16 13:22:19 UTC ++++ pr/src/pthreads/ptio.c +@@ -3765,7 +3765,7 @@ static PRInt32 _pr_poll_with_poll( + * We use these variables to figure out how much time has + * elapsed and how much of the timeout still remains. + */ +- PRIntervalTime start, elapsed, remaining; ++ PRIntervalTime start = 0, elapsed, remaining; + + if (pt_TestAbort()) return -1; + +@@ -4934,6 +4934,7 @@ PR_IMPLEMENT(PRInt32) PR_Select( + + if (timeout == PR_INTERVAL_NO_TIMEOUT) { + tvp = NULL; ++ start = 0; /* Not needed, but shuts down a warning */ + } else { + tv.tv_sec = (PRInt32)PR_IntervalToSeconds(timeout); + tv.tv_usec = (PRInt32)PR_IntervalToMicroseconds( +--- pr/src/pthreads/ptsynch.c.orig 2015-10-16 13:22:19 UTC ++++ pr/src/pthreads/ptsynch.c +@@ -30,7 +30,7 @@ static pthread_t pt_zero_tid; /* a null + #endif /* defined(_PR_DCETHREADS) */ + #endif /* defined(DEBUG) */ + +-#if defined(FREEBSD) ++#if defined(FREEBSD) && (defined(DEBUG) || defined(FORCE_PR_ASSERT)) + /* + * On older versions of FreeBSD, pthread_mutex_trylock returns EDEADLK. + * Newer versions return EBUSY. We still need to support both. Index: head/devel/nspr/pkg-plist =================================================================== --- head/devel/nspr/pkg-plist (revision 402127) +++ head/devel/nspr/pkg-plist (revision 402128) @@ -1,92 +1,93 @@ bin/nspr-config include/nspr/md/_aix32.cfg include/nspr/md/_aix64.cfg include/nspr/md/_beos.cfg include/nspr/md/_bsdi.cfg include/nspr/md/_darwin.cfg include/nspr/md/_dgux.cfg include/nspr/md/_freebsd.cfg include/nspr/md/_hpux32.cfg include/nspr/md/_hpux64.cfg include/nspr/md/_irix32.cfg include/nspr/md/_irix64.cfg include/nspr/md/_linux.cfg include/nspr/md/_netbsd.cfg include/nspr/md/_nto.cfg include/nspr/md/_openbsd.cfg include/nspr/md/_os2.cfg include/nspr/md/_osf1.cfg include/nspr/md/_qnx.cfg include/nspr/md/_riscos.cfg include/nspr/md/_scoos.cfg include/nspr/md/_solaris.cfg include/nspr/md/_symbian.cfg include/nspr/md/_unixware.cfg include/nspr/md/_unixware7.cfg include/nspr/md/_win95.cfg include/nspr/md/_winnt.cfg include/nspr/nspr.h include/nspr/obsolete/pralarm.h include/nspr/obsolete/probslet.h include/nspr/obsolete/protypes.h include/nspr/obsolete/prsem.h include/nspr/plarena.h include/nspr/plarenas.h include/nspr/plbase64.h include/nspr/plerror.h include/nspr/plgetopt.h include/nspr/plhash.h include/nspr/plstr.h include/nspr/pratom.h include/nspr/prbit.h include/nspr/prclist.h include/nspr/prcmon.h include/nspr/prcountr.h include/nspr/prcpucfg.h include/nspr/prcvar.h include/nspr/prdtoa.h include/nspr/prenv.h include/nspr/prerr.h include/nspr/prerror.h include/nspr/prinet.h include/nspr/prinit.h include/nspr/prinrval.h include/nspr/prio.h include/nspr/pripcsem.h include/nspr/private/pprio.h include/nspr/private/pprthred.h include/nspr/private/prpriv.h include/nspr/prlink.h include/nspr/prlock.h include/nspr/prlog.h include/nspr/prlong.h include/nspr/prmem.h include/nspr/prmon.h include/nspr/prmwait.h include/nspr/prnetdb.h include/nspr/prolock.h include/nspr/prpdce.h include/nspr/prprf.h include/nspr/prproces.h include/nspr/prrng.h include/nspr/prrwlock.h include/nspr/prshm.h include/nspr/prshma.h include/nspr/prsystem.h include/nspr/prthread.h include/nspr/prtime.h include/nspr/prtpool.h include/nspr/prtrace.h include/nspr/prtypes.h include/nspr/prvrsion.h include/nspr/prwin16.h lib/libnspr4.a lib/libnspr4.so lib/libnspr4.so.1 lib/libplc4.a lib/libplc4.so lib/libplc4.so.1 lib/libplds4.a lib/libplds4.so lib/libplds4.so.1 libdata/pkgconfig/nspr.pc +share/aclocal/nspr.m4