Bug 1788009 - NSPR_4_35_BETA1. r=glandium UPGRADE_NSPR_RELEASE

Differential Revision: https://phabricator.services.mozilla.com/D155960
This commit is contained in:
Kai Engert 2022-08-31 08:14:25 +00:00
parent 2f9b6fc184
commit 66e15d61bb
12 changed files with 82 additions and 17 deletions

View file

@ -1 +1 @@
NSPR_4_34_1_RTM NSPR_4_35_BETA1

View file

@ -10,3 +10,4 @@
*/ */
#error "Do not include this header file." #error "Do not include this header file."

4
nsprpub/configure vendored
View file

@ -2486,8 +2486,8 @@ test -n "$target_alias" &&
program_prefix=${target_alias}- program_prefix=${target_alias}-
MOD_MAJOR_VERSION=4 MOD_MAJOR_VERSION=4
MOD_MINOR_VERSION=34 MOD_MINOR_VERSION=35
MOD_PATCH_VERSION=1 MOD_PATCH_VERSION=0
NSPR_MODNAME=nspr20 NSPR_MODNAME=nspr20
_HAVE_PTHREADS= _HAVE_PTHREADS=
USE_PTHREADS= USE_PTHREADS=

View file

@ -15,8 +15,8 @@ dnl ========================================================
dnl = Defaults dnl = Defaults
dnl ======================================================== dnl ========================================================
MOD_MAJOR_VERSION=4 MOD_MAJOR_VERSION=4
MOD_MINOR_VERSION=34 MOD_MINOR_VERSION=35
MOD_PATCH_VERSION=1 MOD_PATCH_VERSION=0
NSPR_MODNAME=nspr20 NSPR_MODNAME=nspr20
_HAVE_PTHREADS= _HAVE_PTHREADS=
USE_PTHREADS= USE_PTHREADS=

View file

@ -499,7 +499,7 @@
#elif defined(__mips__) #elif defined(__mips__)
/* For _ABI64 */ /* For _ABI64 */
#include <sgidefs.h> #include <asm/sgidefs.h>
#ifdef __MIPSEB__ #ifdef __MIPSEB__
#define IS_BIG_ENDIAN 1 #define IS_BIG_ENDIAN 1
@ -1255,6 +1255,52 @@
#define PR_BYTES_PER_WORD_LOG2 3 #define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3 #define PR_BYTES_PER_DWORD_LOG2 3
#elif defined(__loongarch64)
#undef IS_BIG_ENDIAN
#define IS_LITTLE_ENDIAN 1
#define IS_64
#define PR_BYTES_PER_BYTE 1
#define PR_BYTES_PER_SHORT 2
#define PR_BYTES_PER_INT 4
#define PR_BYTES_PER_INT64 8
#define PR_BYTES_PER_LONG 8
#define PR_BYTES_PER_FLOAT 4
#define PR_BYTES_PER_DOUBLE 8
#define PR_BYTES_PER_WORD 8
#define PR_BYTES_PER_DWORD 8
#define PR_BITS_PER_BYTE 8
#define PR_BITS_PER_SHORT 16
#define PR_BITS_PER_INT 32
#define PR_BITS_PER_INT64 64
#define PR_BITS_PER_LONG 64
#define PR_BITS_PER_FLOAT 32
#define PR_BITS_PER_DOUBLE 64
#define PR_BITS_PER_WORD 64
#define PR_BITS_PER_BYTE_LOG2 3
#define PR_BITS_PER_SHORT_LOG2 4
#define PR_BITS_PER_INT_LOG2 5
#define PR_BITS_PER_INT64_LOG2 6
#define PR_BITS_PER_LONG_LOG2 6
#define PR_BITS_PER_FLOAT_LOG2 5
#define PR_BITS_PER_DOUBLE_LOG2 6
#define PR_BITS_PER_WORD_LOG2 6
#define PR_ALIGN_OF_SHORT 2
#define PR_ALIGN_OF_INT 4
#define PR_ALIGN_OF_LONG 8
#define PR_ALIGN_OF_INT64 8
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 8
#define PR_ALIGN_OF_POINTER 8
#define PR_ALIGN_OF_WORD 8
#define PR_BYTES_PER_WORD_LOG2 3
#define PR_BYTES_PER_DWORD_LOG2 3
#else #else
#error "Unknown CPU architecture" #error "Unknown CPU architecture"

View file

@ -73,6 +73,8 @@
#define _PR_SI_ARCHITECTURE "nds32" #define _PR_SI_ARCHITECTURE "nds32"
#elif defined(__xtensa__) #elif defined(__xtensa__)
#define _PR_SI_ARCHITECTURE "xtensa" #define _PR_SI_ARCHITECTURE "xtensa"
#elif defined(__loongarch64)
#define _PR_SI_ARCHITECTURE "loongarch64"
#else #else
#error "Unknown CPU architecture" #error "Unknown CPU architecture"
#endif #endif
@ -141,6 +143,18 @@ extern PRInt32 _PR_x86_64_AtomicSet(PRInt32 *val, PRInt32 newval);
#define _MD_ATOMIC_SET _PR_x86_64_AtomicSet #define _MD_ATOMIC_SET _PR_x86_64_AtomicSet
#endif #endif
#if defined(__loongarch__)
#if defined(__GNUC__)
/* Use GCC built-in functions */
#define _PR_HAVE_ATOMIC_OPS
#define _MD_INIT_ATOMIC()
#define _MD_ATOMIC_INCREMENT(ptr) __sync_add_and_fetch(ptr, 1)
#define _MD_ATOMIC_DECREMENT(ptr) __sync_sub_and_fetch(ptr, 1)
#define _MD_ATOMIC_ADD(ptr, i) __sync_add_and_fetch(ptr, i)
#define _MD_ATOMIC_SET(ptr, nv) __sync_lock_test_and_set(ptr, nv)
#endif
#endif
#if defined(__or1k__) #if defined(__or1k__)
#if defined(__GNUC__) #if defined(__GNUC__)
/* Use GCC built-in functions */ /* Use GCC built-in functions */

View file

@ -31,11 +31,11 @@ PR_BEGIN_EXTERN_C
** The format of the version string is ** The format of the version string is
** "<major version>.<minor version>[.<patch level>] [<Beta>]" ** "<major version>.<minor version>[.<patch level>] [<Beta>]"
*/ */
#define PR_VERSION "4.34.1" #define PR_VERSION "4.35 Beta"
#define PR_VMAJOR 4 #define PR_VMAJOR 4
#define PR_VMINOR 34 #define PR_VMINOR 35
#define PR_VPATCH 1 #define PR_VPATCH 0
#define PR_BETA PR_FALSE #define PR_BETA PR_TRUE
/* /*
** PRVersionCheck ** PRVersionCheck

View file

@ -322,7 +322,7 @@ static PRStatus PR_CALLBACK SocketConnectContinue(
#if defined(_WIN64) #if defined(_WIN64)
if (fd->secret->overlappedActive) { if (fd->secret->overlappedActive) {
PRInt32 rvSent; PRInt32 rvSent;
if (GetOverlappedResult(osfd, &fd->secret->ol, &rvSent, FALSE) == FALSE) { if (GetOverlappedResult((HANDLE)osfd, &fd->secret->ol, &rvSent, FALSE) == FALSE) {
err = WSAGetLastError(); err = WSAGetLastError();
PR_LOG(_pr_io_lm, PR_LOG_MIN, PR_LOG(_pr_io_lm, PR_LOG_MIN,
("SocketConnectContinue GetOverlappedResult failed %d\n", err)); ("SocketConnectContinue GetOverlappedResult failed %d\n", err));
@ -354,7 +354,7 @@ static PRStatus PR_CALLBACK SocketConnectContinue(
if (fd->secret->overlappedActive) { if (fd->secret->overlappedActive) {
PR_ASSERT(fd->secret->nonblocking); PR_ASSERT(fd->secret->nonblocking);
PRInt32 rvSent; PRInt32 rvSent;
if (GetOverlappedResult(osfd, &fd->secret->ol, &rvSent, FALSE) == TRUE) { if (GetOverlappedResult((HANDLE)osfd, &fd->secret->ol, &rvSent, FALSE) == TRUE) {
fd->secret->overlappedActive = PR_FALSE; fd->secret->overlappedActive = PR_FALSE;
PR_LOG(_pr_io_lm, PR_LOG_MIN, PR_LOG(_pr_io_lm, PR_LOG_MIN,
("SocketConnectContinue GetOverlappedResult succeeded\n")); ("SocketConnectContinue GetOverlappedResult succeeded\n"));

View file

@ -2755,8 +2755,8 @@ static void _PR_InitIOV(void)
_md_iovector._mmap64 = mmap64; _md_iovector._mmap64 = mmap64;
#if (defined(ANDROID) && __ANDROID_API__ < 21) #if (defined(ANDROID) && __ANDROID_API__ < 21)
/* Same as the open64 case for Android. */ /* Same as the open64 case for Android. */
_md_iovector._fstat64 = fstat; _md_iovector._fstat64 = (_MD_Fstat64)fstat;
_md_iovector._stat64 = stat; _md_iovector._stat64 = (_MD_Stat64)stat;
#else #else
_md_iovector._fstat64 = fstat64; _md_iovector._fstat64 = fstat64;
_md_iovector._stat64 = stat64; _md_iovector._stat64 = stat64;

View file

@ -491,7 +491,7 @@ _PR_MD_TCPSENDTO(PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
if ( rv < 0 ) { if ( rv < 0 ) {
return -1; return -1;
} }
rv = GetOverlappedResult(osfd, &fd->secret->ol, &rvSent, FALSE); rv = GetOverlappedResult((HANDLE)osfd, &fd->secret->ol, &rvSent, FALSE);
if ( rv == TRUE ) { if ( rv == TRUE ) {
return rvSent; return rvSent;
} else { } else {

View file

@ -206,7 +206,11 @@ PR_IMPLEMENT(PRInt32) PR_GetNumberOfProcessors( void )
size_t len = sizeof(numCpus); size_t len = sizeof(numCpus);
mib[0] = CTL_HW; mib[0] = CTL_HW;
#ifdef HW_NCPUONLINE
mib[1] = HW_NCPUONLINE;
#else
mib[1] = HW_NCPU; mib[1] = HW_NCPU;
#endif
rc = sysctl( mib, 2, &numCpus, &len, NULL, 0 ); rc = sysctl( mib, 2, &numCpus, &len, NULL, 0 );
if ( -1 == rc ) { if ( -1 == rc ) {
numCpus = -1; /* set to -1 for return value on error */ numCpus = -1; /* set to -1 for return value on error */

View file

@ -58,8 +58,8 @@ static char *incompatible_version[] = {
"3.0", "3.0.1", "3.0", "3.0.1",
"3.1", "3.1.1", "3.1.2", "3.1.3", "3.1", "3.1.1", "3.1.2", "3.1.3",
"3.5", "3.5.1", "3.5", "3.5.1",
"4.34.2", "4.35.1",
"4.35", "4.35.1", "4.36", "4.36.1",
"10.0", "11.1", "12.14.20" "10.0", "11.1", "12.14.20"
}; };