Update NSPR to 4.16

This commit is contained in:
wolfbeast 2018-02-06 11:40:35 +01:00 • committed by Roy Tam
commit f29876f120
31 changed files with 811 additions and 247 deletions

View file

@ -498,6 +498,9 @@
#elif defined(__mips__)
/* For _ABI64 */
#include <sgidefs.h>
#ifdef __MIPSEB__
#define IS_BIG_ENDIAN 1
#undef IS_LITTLE_ENDIAN

View file

@ -290,6 +290,9 @@ extern void _MD_MakeNonblock(PRFileDesc *f);
extern PRInt32 _MD_CloseSocket(PROsfd osfd);
#define _MD_CLOSE_SOCKET _MD_CloseSocket
#define _MD_SENDTO _PR_MD_SENDTO
#ifdef _WIN64
#define _MD_TCPSENDTO _PR_MD_TCPSENDTO
#endif
#define _MD_RECVFROM _PR_MD_RECVFROM
#define _MD_SOCKETPAIR(s, type, proto, sv) -1
#define _MD_GETSOCKNAME _PR_MD_GETSOCKNAME

View file

@ -31,10 +31,10 @@ PR_BEGIN_EXTERN_C
** The format of the version string is
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
*/
#define PR_VERSION "4.13.1"
#define PR_VERSION "4.16"
#define PR_VMAJOR 4
#define PR_VMINOR 13
#define PR_VPATCH 1
#define PR_VMINOR 16
#define PR_VPATCH 0
#define PR_BETA PR_FALSE
/*

View file

@ -1225,6 +1225,13 @@ extern PRInt32 _PR_MD_SENDTO(
const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout);
#define _PR_MD_SENDTO _MD_SENDTO
#if defined(_WIN64) && defined(WIN95)
extern PRInt32 _PR_MD_TCPSENDTO(
PRFileDesc *fd, const void *buf, PRInt32 amount, PRIntn flags,
const PRNetAddr *addr, PRUint32 addrlen, PRIntervalTime timeout);
#define _PR_MD_TCPSENDTO _MD_TCPSENDTO
#endif
extern PRInt32 _PR_MD_SOCKETPAIR(int af, int type, int flags, PROsfd *osfd);
#define _PR_MD_SOCKETPAIR _MD_SOCKETPAIR
@ -1747,6 +1754,18 @@ struct PRFilePrivate {
* requires knowing the address family of the
* socket, we save the address family here. */
#endif
#if defined(_WIN64)
/* This is necessary for TCP Fast Open. TCP Fast Open in windows must
* use ConnectEx function which uses OVERLAPPED. TCPSendTo will call
* ConnectEx to send fast open data. If ConnectEx returns
* ERROR_IO_PENDING we need to save OVERLAPPED structure and we will
* use it in ConnectContinue to get the final result of ConnectEx.
*/
PRBool alreadyConnected;
PRBool overlappedActive;
OVERLAPPED ol;
#endif
};
#ifdef _WIN64

View file

@ -231,7 +231,7 @@ PR_BEGIN_EXTERN_C
** to use <stdint.h>. A patch to do that is in NSPR bug 634793.
*/
#if defined(__APPLE__) || defined(__ANDROID__) || defined(__OpenBSD__)
#if defined(__APPLE__) || defined(__OpenBSD__)
#define PR_ALTERNATE_INT64_TYPEDEF
#endif
@ -245,16 +245,24 @@ PR_BEGIN_EXTERN_C
#if PR_BYTES_PER_BYTE == 1
typedef unsigned char PRUint8;
/*
** There are two scenarios that require us to define PRInt8 as type 'char'.
** (1)
** Some cfront-based C++ compilers do not like 'signed char' and
** issue the warning message:
** warning: "signed" not implemented (ignored)
** For these compilers, we have to define PRInt8 as plain 'char'.
** Make sure that plain 'char' is indeed signed under these compilers.
** (2)
** Mozilla C++ code expects the PRInt{N} and int{N}_t types to match (see bug
** 634793). If a platform defines int8_t as 'char', but NSPR defines it as
** 'signed char', it results in a type mismatch.
** On such platforms we define PRInt8 as 'char' to avoid the mismatch.
*/
#if (defined(HPUX) && defined(__cplusplus) \
#if (defined(HPUX) && defined(__cplusplus) /* reason 1*/ \
&& !defined(__GNUC__) && __cplusplus < 199707L) \
|| (defined(SCO) && defined(__cplusplus) \
&& !defined(__GNUC__) && __cplusplus == 1L)
|| (defined(SCO) && defined(__cplusplus) /* reason 1 */ \
&& !defined(__GNUC__) && __cplusplus == 1L) \
|| (defined(__sun) && defined(__cplusplus)) /* reason 2 */
typedef char PRInt8;
#else
typedef signed char PRInt8;