From eba8dc2334fae2cca75d80bce13c466f3fa2d4ac Mon Sep 17 00:00:00 2001 From: Kai Engert Date: Sat, 9 Feb 2019 13:26:00 +0100 Subject: [PATCH] Bug 1526010, Upgrade Firefox 67 to use NSPR 4.21. Beta snapshot, r=me UPGRADE_NSPR_RELEASE --- nsprpub/TAG-INFO | 2 +- nsprpub/config/prdepend.h | 1 - nsprpub/configure | 19 ++----------------- nsprpub/configure.in | 18 +----------------- nsprpub/lib/ds/plvrsion.c | 2 +- nsprpub/lib/libc/src/plvrsion.c | 2 +- nsprpub/lib/prstreams/plvrsion.c | 2 +- nsprpub/pr/include/md/_win32_errors.h | 2 +- nsprpub/pr/include/prbit.h | 8 +++++--- nsprpub/pr/include/prinit.h | 6 +++--- nsprpub/pr/src/io/pripv6.c | 2 +- nsprpub/pr/src/prvrsion.c | 2 +- nsprpub/pr/tests/abstract.c | 2 +- nsprpub/pr/tests/vercheck.c | 6 +++--- 14 files changed, 22 insertions(+), 52 deletions(-) diff --git a/nsprpub/TAG-INFO b/nsprpub/TAG-INFO index 0b2cc86485c9..a5291854a14c 100644 --- a/nsprpub/TAG-INFO +++ b/nsprpub/TAG-INFO @@ -1 +1 @@ -NSPR_4_20_RTM +753fe0f7964c diff --git a/nsprpub/config/prdepend.h b/nsprpub/config/prdepend.h index 6c66b37ca0fc..e49e92677e3e 100644 --- a/nsprpub/config/prdepend.h +++ b/nsprpub/config/prdepend.h @@ -10,4 +10,3 @@ */ #error "Do not include this header file." - diff --git a/nsprpub/configure b/nsprpub/configure index ce2543ed7684..0d81aac00aa8 100755 --- a/nsprpub/configure +++ b/nsprpub/configure @@ -783,7 +783,6 @@ with_android_ndk with_android_toolchain with_android_version with_android_platform -with_gonk with_dist_prefix with_dist_bindir with_dist_includedir @@ -873,6 +872,7 @@ datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' + includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' @@ -1484,7 +1484,6 @@ Optional Packages: Android platform version, default 5 for arm, 9 for x86/mips --with-android-platform=DIR location of platform dir - --with-gonk=DIR location of gonk dir --with-dist-prefix=DIST_PREFIX place build files in DIST_PREFIX dist --with-dist-bindir=DIR build execuatables in DIR DIST_PREFIX/bin @@ -2488,7 +2487,7 @@ test -n "$target_alias" && program_prefix=${target_alias}- MOD_MAJOR_VERSION=4 -MOD_MINOR_VERSION=20 +MOD_MINOR_VERSION=21 MOD_PATCH_VERSION=0 NSPR_MODNAME=nspr20 _HAVE_PTHREADS= @@ -2656,19 +2655,6 @@ mipsel-*android*) ;; esac - - -# Check whether --with-gonk was given. -if test "${with_gonk+set}" = set; then : - withval=$with_gonk; gonkdir=$withval -fi - - -if test -n "$gonkdir" ; then - - $as_echo "#define ANDROID 1" >>confdefs.h - -else case "$target" in *-android*|*-linuxandroid*) if test -z "$android_ndk" ; then @@ -2754,7 +2740,6 @@ $as_echo "$android_platform" >&6; } ;; esac -fi dist_prefix='${MOD_DEPTH}/dist' dist_bindir='${dist_prefix}/bin' diff --git a/nsprpub/configure.in b/nsprpub/configure.in index cbd22b42e840..9ff70f3589ad 100644 --- a/nsprpub/configure.in +++ b/nsprpub/configure.in @@ -15,7 +15,7 @@ dnl ======================================================== dnl = Defaults dnl ======================================================== MOD_MAJOR_VERSION=4 -MOD_MINOR_VERSION=20 +MOD_MINOR_VERSION=21 MOD_PATCH_VERSION=0 NSPR_MODNAME=nspr20 _HAVE_PTHREADS= @@ -147,21 +147,6 @@ mipsel-*android*) ;; esac -dnl ======================================================== -dnl = Gonk is a fork of Android used for Mozilla's B2G project. -dnl = Configuration is done largely by the top level config -dnl = and the specified gonk directory doesn't matter here. -dnl ======================================================== - -AC_ARG_WITH(gonk, -[ --with-gonk=DIR location of gonk dir], - gonkdir=$withval) - -if test -n "$gonkdir" ; then - dnl Most things are directly configured by env vars when building for gonk - - AC_DEFINE(ANDROID) -else case "$target" in *-android*|*-linuxandroid*) if test -z "$android_ndk" ; then @@ -246,7 +231,6 @@ case "$target" in AC_DEFINE(ANDROID) ;; esac -fi dnl ======================================================== dnl = diff --git a/nsprpub/lib/ds/plvrsion.c b/nsprpub/lib/ds/plvrsion.c index 8b351b4db650..8bbf67653d72 100644 --- a/nsprpub/lib/ds/plvrsion.c +++ b/nsprpub/lib/ds/plvrsion.c @@ -54,7 +54,7 @@ PRVersionDescription VERSION_DESC_NAME = /* filename */ _PRODUCTION, /* the produced library name */ /* description */ "Portable runtime", /* what we are */ /* security */ "N/A", /* not applicable here */ - /* copywrite */ "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved", + /* copywrite */ "This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.", /* comment */ "http://www.mozilla.org/MPL/", /* specialString */ "" }; diff --git a/nsprpub/lib/libc/src/plvrsion.c b/nsprpub/lib/libc/src/plvrsion.c index c4bc7a83179c..f2b6278bfdcc 100644 --- a/nsprpub/lib/libc/src/plvrsion.c +++ b/nsprpub/lib/libc/src/plvrsion.c @@ -54,7 +54,7 @@ PRVersionDescription VERSION_DESC_NAME = /* filename */ _PRODUCTION, /* the produced library name */ /* description */ "Portable runtime", /* what we are */ /* security */ "N/A", /* not applicable here */ - /* copywrite */ "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved", + /* copywrite */ "This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.", /* comment */ "http://www.mozilla.org/MPL/", /* specialString */ "" }; diff --git a/nsprpub/lib/prstreams/plvrsion.c b/nsprpub/lib/prstreams/plvrsion.c index 27fd058d7048..4832e70801a7 100644 --- a/nsprpub/lib/prstreams/plvrsion.c +++ b/nsprpub/lib/prstreams/plvrsion.c @@ -54,7 +54,7 @@ PRVersionDescription VERSION_DESC_NAME = /* filename */ _PRODUCTION, /* the produced library name */ /* description */ "Portable runtime", /* what we are */ /* security */ "N/A", /* not applicable here */ - /* copywrite */ "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved", + /* copywrite */ "This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.", /* comment */ "http://www.mozilla.org/MPL/", /* specialString */ "" }; diff --git a/nsprpub/pr/include/md/_win32_errors.h b/nsprpub/pr/include/md/_win32_errors.h index 1c9623723fc7..173f6b393787 100644 --- a/nsprpub/pr/include/md/_win32_errors.h +++ b/nsprpub/pr/include/md/_win32_errors.h @@ -83,7 +83,7 @@ extern void _MD_win32_map_accept_error(PRInt32 err); extern void _MD_win32_map_acceptex_error(PRInt32 err); #define _PR_MD_MAP_ACCEPTEX_ERROR _MD_win32_map_acceptex_error -extern PRInt32 _MD_win32_map_connect_error(PRInt32 err); +extern void _MD_win32_map_connect_error(PRInt32 err); #define _PR_MD_MAP_CONNECT_ERROR _MD_win32_map_connect_error extern void _MD_win32_map_bind_error(PRInt32 err); diff --git a/nsprpub/pr/include/prbit.h b/nsprpub/pr/include/prbit.h index 0434fc683820..2ace89972fc8 100644 --- a/nsprpub/pr/include/prbit.h +++ b/nsprpub/pr/include/prbit.h @@ -14,7 +14,8 @@ PR_BEGIN_EXTERN_C ** functions. */ #if defined(_WIN32) && (_MSC_VER >= 1300) && \ - (defined(_M_IX86) || defined(_M_AMD64) || defined(_M_ARM)) + (defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || \ + defined(_M_ARM64)) # include # pragma intrinsic(_BitScanForward,_BitScanReverse) __forceinline static int __prBitScanForward32(unsigned int val) @@ -33,7 +34,8 @@ PR_BEGIN_EXTERN_C # define pr_bitscan_clz32(val) __prBitScanReverse32(val) # define PR_HAVE_BUILTIN_BITSCAN32 #elif ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && \ - (defined(__i386__) || defined(__x86_64__) || defined(__arm__)) + (defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \ + defined(__aarch64__)) # define pr_bitscan_ctz32(val) __builtin_ctz(val) # define pr_bitscan_clz32(val) __builtin_clz(val) # define PR_HAVE_BUILTIN_BITSCAN32 @@ -136,7 +138,7 @@ NSPR_API(PRIntn) PR_FloorLog2(PRUint32 i); */ #if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || \ - defined(_M_X64) || defined(_M_ARM)) + defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64)) #include #pragma intrinsic(_rotl, _rotr) #define PR_ROTATE_LEFT32(a, bits) _rotl(a, bits) diff --git a/nsprpub/pr/include/prinit.h b/nsprpub/pr/include/prinit.h index 5f6b4e3de966..1957d963f1f0 100644 --- a/nsprpub/pr/include/prinit.h +++ b/nsprpub/pr/include/prinit.h @@ -31,11 +31,11 @@ PR_BEGIN_EXTERN_C ** The format of the version string is ** ".[.] []" */ -#define PR_VERSION "4.20" +#define PR_VERSION "4.21 Beta" #define PR_VMAJOR 4 -#define PR_VMINOR 20 +#define PR_VMINOR 21 #define PR_VPATCH 0 -#define PR_BETA PR_FALSE +#define PR_BETA PR_TRUE /* ** PRVersionCheck diff --git a/nsprpub/pr/src/io/pripv6.c b/nsprpub/pr/src/io/pripv6.c index af7de49dea86..cdd1ce549181 100644 --- a/nsprpub/pr/src/io/pripv6.c +++ b/nsprpub/pr/src/io/pripv6.c @@ -247,7 +247,7 @@ static PRInt32 PR_CALLBACK Ipv6ToIpv4SocketRecvFrom(PRFileDesc *fd, void *buf, #if defined(_PR_INET6_PROBE) static PRBool ipv6_is_present; -extern PRBool _pr_test_ipv6_socket(void); +PR_EXTERN(PRBool) _pr_test_ipv6_socket(void); #if !defined(_PR_INET6) && defined(_PR_HAVE_GETIPNODEBYNAME) extern PRStatus _pr_find_getipnodebyname(void); diff --git a/nsprpub/pr/src/prvrsion.c b/nsprpub/pr/src/prvrsion.c index be43578ca7af..c27b493a7eb7 100644 --- a/nsprpub/pr/src/prvrsion.c +++ b/nsprpub/pr/src/prvrsion.c @@ -54,7 +54,7 @@ PRVersionDescription VERSION_DESC_NAME = /* filename */ _PRODUCTION, /* the produced library name */ /* description */ "Portable runtime", /* what we are */ /* security */ "N/A", /* not applicable here */ - /* copywrite */ "Copyright (c) 1998 Netscape Communications Corporation. All Rights Reserved", + /* copywrite */ "This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.", /* comment */ "License information: http://www.mozilla.org/MPL/", /* specialString */ "" }; diff --git a/nsprpub/pr/tests/abstract.c b/nsprpub/pr/tests/abstract.c index 6be5610c0412..47c4637a7a68 100755 --- a/nsprpub/pr/tests/abstract.c +++ b/nsprpub/pr/tests/abstract.c @@ -151,7 +151,7 @@ main() int main() { - prinf("PASS\n"); + printf("PASS\n"); return 0; } #endif diff --git a/nsprpub/pr/tests/vercheck.c b/nsprpub/pr/tests/vercheck.c index 5e6588f9d8ad..c0adbeacad66 100644 --- a/nsprpub/pr/tests/vercheck.c +++ b/nsprpub/pr/tests/vercheck.c @@ -40,7 +40,7 @@ static char *compatible_version[] = { "4.10", "4.10.1", "4.10.2", "4.10.3", "4.10.4", "4.10.5", "4.10.6", "4.10.7", "4.10.8", "4.10.9", "4.10.10", "4.11", "4.12", "4.13", "4.14", "4.15", - "4.16", "4.17", "4.18", "4.19", + "4.16", "4.17", "4.18", "4.19", "4.20", PR_VERSION }; @@ -56,8 +56,8 @@ static char *incompatible_version[] = { "3.0", "3.0.1", "3.1", "3.1.1", "3.1.2", "3.1.3", "3.5", "3.5.1", - "4.20.1", - "4.21", "4.21.1", + "4.21.1", + "4.22", "4.22.1", "10.0", "11.1", "12.14.20" };