summaryrefslogtreecommitdiff
path: root/pr/include
diff options
context:
space:
mode:
authorcvs2hg <devnull@localhost>2007-11-07 22:25:20 +0000
committercvs2hg <devnull@localhost>2007-11-07 22:25:20 +0000
commit2bbaa9b6112bb1669f468f142241e4376160d684 (patch)
tree5d15212a7a9d7ba155977a7b79901209679b4f25 /pr/include
parent5813276c3e2c1796bcb3a72277e9190fa7f1f16a (diff)
downloadnspr-hg-2bbaa9b6112bb1669f468f142241e4376160d684.tar.gz
fixup commit for branch 'GECKO181_20080827_RELBRANCH'GECKO181_20080827_RELBRANCH
Diffstat (limited to 'pr/include')
-rw-r--r--pr/include/md/_beos.cfg63
-rw-r--r--pr/include/md/_darwin.cfg1
-rw-r--r--pr/include/md/_darwin.h19
-rw-r--r--pr/include/md/_hpux.h46
-rw-r--r--pr/include/md/_netbsd.h179
-rw-r--r--pr/include/md/_openvms.h1
-rw-r--r--pr/include/md/_pth.h7
-rw-r--r--pr/include/md/_win95.h5
-rw-r--r--pr/include/md/_winnt.h1
-rw-r--r--pr/include/obsolete/probslet.h9
-rw-r--r--pr/include/obsolete/protypes.h2
-rw-r--r--pr/include/prinet.h4
-rw-r--r--pr/include/prinit.h6
-rw-r--r--pr/include/private/primpl.h12
-rw-r--r--pr/include/prlink.h13
-rw-r--r--pr/include/prsystem.h7
-rw-r--r--pr/include/prtypes.h9
17 files changed, 194 insertions, 190 deletions
diff --git a/pr/include/md/_beos.cfg b/pr/include/md/_beos.cfg
index d15cf044..e1a4d313 100644
--- a/pr/include/md/_beos.cfg
+++ b/pr/include/md/_beos.cfg
@@ -1,36 +1,39 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
* The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1998-2000 Netscape Communications Corporation. All
- * Rights Reserved.
- *
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
* Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the
- * terms of the GNU General Public License Version 2 or later (the
- * "GPL"), in which case the provisions of the GPL are applicable
- * instead of those above. If you wish to allow use of your
- * version of this file only under the terms of the GPL and not to
- * allow others to use your version of this file under the MPL,
- * indicate your decision by deleting the provisions above and
- * replace them with the notice and other provisions required by
- * the GPL. If you do not delete the provisions above, a recipient
- * may use your version of this file under either the MPL or the
- * GPL.
- */
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
#ifndef nspr_cpucfg___
#define nspr_cpucfg___
diff --git a/pr/include/md/_darwin.cfg b/pr/include/md/_darwin.cfg
index 349ef3ba..dc7e0e0c 100644
--- a/pr/include/md/_darwin.cfg
+++ b/pr/include/md/_darwin.cfg
@@ -94,6 +94,7 @@
#define PR_ALIGN_OF_FLOAT 4
#define PR_ALIGN_OF_DOUBLE 4
#define PR_ALIGN_OF_POINTER 4
+#define PR_ALIGN_OF_WORD 4
#ifndef NO_NSPR_10_SUPPORT
diff --git a/pr/include/md/_darwin.h b/pr/include/md/_darwin.h
index 6f409e36..3c599fa7 100644
--- a/pr/include/md/_darwin.h
+++ b/pr/include/md/_darwin.h
@@ -48,9 +48,9 @@
#define PR_LINKER_ARCH "darwin"
#define _PR_SI_SYSNAME "DARWIN"
-#ifdef i386
+#ifdef __i386__
#define _PR_SI_ARCHITECTURE "x86"
-#else
+#elif defined(__ppc__)
#define _PR_SI_ARCHITECTURE "ppc"
#endif
#define PR_DLL_SUFFIX ".dylib"
@@ -65,7 +65,7 @@
#define USE_MACH_DYLD
#define _PR_HAVE_SOCKADDR_LEN
#define _PR_STAT_HAS_ST_ATIMESPEC
-#define _PR_NO_LARGE_FILES
+#define _PR_HAVE_LARGE_OFF_T
#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
#define _PR_INET6
@@ -113,7 +113,18 @@ extern PRInt32 _PR_DarwinPPC_AtomicSet(PRInt32 *val, PRInt32 newval);
#define _MD_ATOMIC_SET(val, newval) _PR_DarwinPPC_AtomicSet(val, newval)
extern PRInt32 _PR_DarwinPPC_AtomicAdd(PRInt32 *ptr, PRInt32 val);
#define _MD_ATOMIC_ADD(ptr, val) _PR_DarwinPPC_AtomicAdd(ptr, val)
-#endif /* __ppc__ */
+#elif defined(__i386__)
+#define _PR_HAVE_ATOMIC_OPS
+#define _MD_INIT_ATOMIC()
+extern PRInt32 _PR_Darwin_x86_AtomicIncrement(PRInt32 *val);
+#define _MD_ATOMIC_INCREMENT(val) _PR_Darwin_x86_AtomicIncrement(val)
+extern PRInt32 _PR_Darwin_x86_AtomicDecrement(PRInt32 *val);
+#define _MD_ATOMIC_DECREMENT(val) _PR_Darwin_x86_AtomicDecrement(val)
+extern PRInt32 _PR_Darwin_x86_AtomicSet(PRInt32 *val, PRInt32 newval);
+#define _MD_ATOMIC_SET(val, newval) _PR_Darwin_x86_AtomicSet(val, newval)
+extern PRInt32 _PR_Darwin_x86_AtomicAdd(PRInt32 *ptr, PRInt32 val);
+#define _MD_ATOMIC_ADD(ptr, val) _PR_Darwin_x86_AtomicAdd(ptr, val)
+#endif /* __i386__ */
#define USE_SETJMP
diff --git a/pr/include/md/_hpux.h b/pr/include/md/_hpux.h
index 73928313..2a6f177f 100644
--- a/pr/include/md/_hpux.h
+++ b/pr/include/md/_hpux.h
@@ -44,8 +44,18 @@
#define PR_LINKER_ARCH "hpux"
#define _PR_SI_SYSNAME "HPUX"
+#ifdef __ia64
+#define _PR_SI_ARCHITECTURE "ia64"
+#define PR_DLL_SUFFIX ".so"
+#else
+/*
+ * _PR_SI_ARCHITECTURE must be "hppa1.1" for backward compatibility.
+ * It was changed to "hppa" in NSPR 4.6.2, but was changed back in
+ * NSPR 4.6.4.
+ */
#define _PR_SI_ARCHITECTURE "hppa1.1"
#define PR_DLL_SUFFIX ".sl"
+#endif
#define _PR_VMBASE 0x30000000
#define _PR_STACK_VMBASE 0x50000000
@@ -80,14 +90,44 @@
#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY
#define _PR_ACCEPT_INHERIT_NONBLOCK
-#undef _PR_HAVE_ATOMIC_OPS
+#if defined(__ia64)
+#define _PR_HAVE_ATOMIC_OPS
+#define _MD_INIT_ATOMIC()
+extern PRInt32 _PR_ia64_AtomicIncrement(PRInt32 *val);
+#define _MD_ATOMIC_INCREMENT _PR_ia64_AtomicIncrement
+extern PRInt32 _PR_ia64_AtomicDecrement(PRInt32 *val);
+#define _MD_ATOMIC_DECREMENT _PR_ia64_AtomicDecrement
+extern PRInt32 _PR_ia64_AtomicAdd(PRInt32 *ptr, PRInt32 val);
+#define _MD_ATOMIC_ADD _PR_ia64_AtomicAdd
+extern PRInt32 _PR_ia64_AtomicSet(PRInt32 *val, PRInt32 newval);
+#define _MD_ATOMIC_SET _PR_ia64_AtomicSet
+#endif
-#ifdef _PR_INET6
-#define _PR_HAVE_INET_NTOP
#define _PR_HAVE_GETIPNODEBYNAME
#define _PR_HAVE_GETIPNODEBYADDR
#define _PR_HAVE_GETADDRINFO
+#ifdef _PR_INET6
+#define _PR_HAVE_INET_NTOP
+#else
#define _PR_INET6_PROBE
+#define _PR_HAVE_MD_SOCKADDR_IN6
+/* isomorphic to struct in6_addr on HP-UX B.11.23 */
+struct _md_in6_addr {
+ union {
+ PRUint8 _S6_u8[16];
+ PRUint16 _S6_u16[8];
+ PRUint32 _S6_u32[4];
+ PRUint32 __S6_align;
+ } _s6_un;
+};
+/* isomorphic to struct sockaddr_in6 on HP-UX B.11.23 */
+struct _md_sockaddr_in6 {
+ PRUint16 sin6_family;
+ PRUint16 sin6_port;
+ PRUint32 sin6_flowinfo;
+ struct _md_in6_addr sin6_addr;
+ PRUint32 sin6_scope_id;
+};
#endif
#if !defined(_PR_PTHREADS)
diff --git a/pr/include/md/_netbsd.h b/pr/include/md/_netbsd.h
index cc16f105..db25bd89 100644
--- a/pr/include/md/_netbsd.h
+++ b/pr/include/md/_netbsd.h
@@ -1,36 +1,39 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
- *
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
* The Original Code is the Netscape Portable Runtime (NSPR).
- *
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1998-2000 Netscape Communications Corporation. All
- * Rights Reserved.
- *
+ *
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998-2000
+ * the Initial Developer. All Rights Reserved.
+ *
* Contributor(s):
- *
- * Alternatively, the contents of this file may be used under the
- * terms of the GNU General Public License Version 2 or later (the
- * "GPL"), in which case the provisions of the GPL are applicable
- * instead of those above. If you wish to allow use of your
- * version of this file only under the terms of the GPL and not to
- * allow others to use your version of this file under the MPL,
- * indicate your decision by deleting the provisions above and
- * replace them with the notice and other provisions required by
- * the GPL. If you do not delete the provisions above, a recipient
- * may use your version of this file under either the MPL or the
- * GPL.
- */
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
#ifndef nspr_netbsd_defs_h___
#define nspr_netbsd_defs_h___
@@ -104,100 +107,40 @@
#define CONTEXT(_th) ((_th)->md.context)
+#if defined(__i386__) || defined(__sparc__) || defined(__m68k__) || defined(__powerpc__)
+#define JB_SP_INDEX 2
+#elif defined(__mips__)
+#define JB_SP_INDEX 4
+#elif defined(__alpha__)
+#define JB_SP_INDEX 34
+#elif defined(__arm32__)
/*
-** Initialize a thread context to run "_main()" when started
-*/
-#ifdef __i386__
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
-{ \
- sigsetjmp(CONTEXT(_thread), 1); \
- CONTEXT(_thread)[2] = (unsigned char*) ((_sp) - 128); \
- CONTEXT(_thread)[0] = (int) _main; \
- *status = PR_TRUE; \
-}
-#define _MD_GET_SP(_thread) CONTEXT(_thread)[2]
-#endif
-#ifdef __sparc_v9__
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
-{ \
- sigsetjmp(CONTEXT(_thread), 1); \
- CONTEXT(_thread)[1] = (unsigned char*) ((_sp) - 176 - 0x7ff); \
- CONTEXT(_thread)[2] = (long) _main; \
- CONTEXT(_thread)[3] = (long) _main + 4; \
- *status = PR_TRUE; \
-}
-#define _MD_GET_SP(_thread) (CONTEXT(_thread)[2]+0x7ff)
-#elif defined(__sparc__)
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
-{ \
- sigsetjmp(CONTEXT(_thread), 1); \
- CONTEXT(_thread)[2] = (unsigned char*) ((_sp) - 128); \
- CONTEXT(_thread)[3] = (int) _main; \
- CONTEXT(_thread)[4] = (int) _main + 4; \
- *status = PR_TRUE; \
-}
-#define _MD_GET_SP(_thread) CONTEXT(_thread)[2]
-#endif
-#ifdef __powerpc__
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
-{ \
- sigsetjmp(CONTEXT(_thread), 1); \
- CONTEXT(_thread)[3] = (unsigned char*) ((_sp) - 128); \
- CONTEXT(_thread)[4] = (int) _main; \
- *status = PR_TRUE; \
-}
-#define _MD_GET_SP(_thread) CONTEXT(_thread)[3]
-#endif
-#ifdef __m68k__
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
-{ \
- sigsetjmp(CONTEXT(_thread), 1); \
- CONTEXT(_thread)[2] = (unsigned char*) ((_sp) - 128); \
- CONTEXT(_thread)[5] = (int) _main; \
- *status = PR_TRUE; \
-}
-#define _MD_GET_SP(_thread) CONTEXT(_thread)[2]
-#endif
-#ifdef __mips__
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
-{ \
- sigsetjmp(CONTEXT(_thread), 1); \
- CONTEXT(_thread)[32] = (unsigned char*) ((_sp) - 128); \
- CONTEXT(_thread)[2] = (int) _main; \
- CONTEXT(_thread)[28] = (int) _main; \
- *status = PR_TRUE; \
-}
-#define _MD_GET_SP(_thread) CONTEXT(_thread)[32]
-#endif
-#if defined(__arm32__) || defined(__arm__) || defined(__armel__) \
- || defined(__armeb__)
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
-{ \
- sigsetjmp(CONTEXT(_thread), 1); \
- CONTEXT(_thread)[23] = (unsigned char*) ((_sp) - 128); \
- CONTEXT(_thread)[24] = (int) _main; \
- *status = PR_TRUE; \
-}
-#define _MD_GET_SP(_thread) CONTEXT(_thread)[23]
-#endif
-#ifdef __alpha__
-#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
-{ \
- sigsetjmp(CONTEXT(_thread), 1); \
- CONTEXT(_thread)[34] = (unsigned char*) ((_sp) - 128); \
- CONTEXT(_thread)[2] = (long) _main; \
- CONTEXT(_thread)[30] = (long) _main; \
- CONTEXT(_thread)[31] = (long) _main; \
- *status = PR_TRUE; \
-}
-#define _MD_GET_SP(_thread) CONTEXT(_thread)[34]
+ * On the arm32, the jmpbuf regs underwent a name change after NetBSD 1.3.
+ */
+#ifdef JMPBUF_REG_R13
+#define JB_SP_INDEX JMPBUF_REG_R13
+#else
+#define JB_SP_INDEX _JB_REG_R13
#endif
-#ifndef _MD_INIT_CONTEXT
-#error "Need to define _MD_INIT_CONTEXT for this platform"
+#else
+#error "Need to define SP index in jmp_buf here"
#endif
+#define _MD_GET_SP(_th) (_th)->md.context[JB_SP_INDEX]
#define PR_NUM_GCREGS _JBLEN
+/*
+** Initialize a thread context to run "_main()" when started
+*/
+#define _MD_INIT_CONTEXT(_thread, _sp, _main, status) \
+{ \
+ *status = PR_TRUE; \
+ if (sigsetjmp(CONTEXT(_thread), 1)) { \
+ _main(); \
+ } \
+ _MD_GET_SP(_thread) = (unsigned char*) ((_sp) - 64); \
+}
+
#define _MD_SWITCH_CONTEXT(_thread) \
if (!sigsetjmp(CONTEXT(_thread), 1)) { \
(_thread)->md.errcode = errno; \
diff --git a/pr/include/md/_openvms.h b/pr/include/md/_openvms.h
index 1ee7e428..c2f3dc68 100644
--- a/pr/include/md/_openvms.h
+++ b/pr/include/md/_openvms.h
@@ -101,6 +101,7 @@ struct ip_mreq {
#define _PR_STAT_HAS_ONLY_ST_ATIME
#define _PR_NO_LARGE_FILES
#define _PR_STRICT_ADDR_LEN
+#define _PR_NEED_SECRET_AF
/* IPv6 support */
#ifdef _SOCKADDR_LEN
diff --git a/pr/include/md/_pth.h b/pr/include/md/_pth.h
index aadb45e0..c1e428c8 100644
--- a/pr/include/md/_pth.h
+++ b/pr/include/md/_pth.h
@@ -202,13 +202,6 @@
#define PT_NO_SIGTIMEDWAIT
#endif
-/*
- * These platforms don't have pthread_kill()
- */
-#if defined(DARWIN)
-#define pthread_kill(thread, sig) ENOSYS
-#endif
-
#if defined(OSF1) || defined(VMS)
#define PT_PRIO_MIN PRI_OTHER_MIN
#define PT_PRIO_MAX PRI_OTHER_MAX
diff --git a/pr/include/md/_win95.h b/pr/include/md/_win95.h
index cd26bd63..4569a2a3 100644
--- a/pr/include/md/_win95.h
+++ b/pr/include/md/_win95.h
@@ -265,8 +265,9 @@ extern PRInt32 _MD_CloseFile(PRInt32 osfd);
#define _MD_TLOCKFILE _PR_MD_TLOCKFILE
#define _MD_UNLOCKFILE _PR_MD_UNLOCKFILE
-#ifdef MOZ_UNICODE
/* --- UTF16 IO stuff --- */
+extern PRBool _pr_useUnicode;
+#ifdef MOZ_UNICODE
#define _MD_OPEN_FILE_UTF16 _PR_MD_OPEN_FILE_UTF16
#define _MD_OPEN_DIR_UTF16 _PR_MD_OPEN_DIR_UTF16
#define _MD_READ_DIR_UTF16 _PR_MD_READ_DIR_UTF16
@@ -275,6 +276,8 @@ extern PRInt32 _MD_CloseFile(PRInt32 osfd);
#endif /* MOZ_UNICODE */
/* --- Socket IO stuff --- */
+extern void _PR_MD_InitSockets(void);
+extern void _PR_MD_CleanupSockets(void);
#define _MD_EACCES WSAEACCES
#define _MD_EADDRINUSE WSAEADDRINUSE
#define _MD_EADDRNOTAVAIL WSAEADDRNOTAVAIL
diff --git a/pr/include/md/_winnt.h b/pr/include/md/_winnt.h
index 0e6ce819..6757b88a 100644
--- a/pr/include/md/_winnt.h
+++ b/pr/include/md/_winnt.h
@@ -112,6 +112,7 @@ struct _md_sockaddr_in6 {
#define _PR_PEEK_BUFFER_MAX (32 * 1024)
#define _PR_FD_NEED_EMULATE_MSG_PEEK(fd) \
(!(fd)->secret->nonblocking && (fd)->secret->inheritable != _PR_TRI_TRUE)
+#define _PR_NEED_SECRET_AF
/* --- Common User-Thread/Native-Thread Definitions --------------------- */
diff --git a/pr/include/obsolete/probslet.h b/pr/include/obsolete/probslet.h
index 374e696c..fffd1ed8 100644
--- a/pr/include/obsolete/probslet.h
+++ b/pr/include/obsolete/probslet.h
@@ -158,6 +158,15 @@ NSPR_API(void) PR_FD_NSET(PRInt32 osfd, PR_fd_set *set);
NSPR_API(void) PR_FD_NCLR(PRInt32 osfd, PR_fd_set *set);
NSPR_API(PRInt32) PR_FD_NISSET(PRInt32 osfd, PR_fd_set *set);
+/*
+** The next two entry points should not be in the API, but they are
+** declared here for historical reasons.
+*/
+
+NSPR_API(PRInt32) PR_GetSysfdTableMax(void);
+
+NSPR_API(PRInt32) PR_SetSysfdTableSize(PRIntn table_size);
+
#ifndef NO_NSPR_10_SUPPORT
#ifdef XP_MAC
#include <stat.h>
diff --git a/pr/include/obsolete/protypes.h b/pr/include/obsolete/protypes.h
index c2a3c9b3..4405bfce 100644
--- a/pr/include/obsolete/protypes.h
+++ b/pr/include/obsolete/protypes.h
@@ -152,14 +152,12 @@ typedef PRInt64 int64;
#if !defined(XP_BEOS) && !defined(VMS) \
&& !defined(_PR_AIX_HAVE_BSD_INT_TYPES) \
&& !defined(HPUX)
-#if !defined(WIN32) || !defined(_WINSOCK2API_) /* defines its own "int32" */
#if !defined(XP_MAC) && !defined(_WIN32) && !defined(XP_OS2) && !defined(NTO)
typedef PRInt32 int32;
#else
typedef long int32;
#endif
#endif
-#endif
/*
* int16
diff --git a/pr/include/prinet.h b/pr/include/prinet.h
index 2c733b0b..02dfef6f 100644
--- a/pr/include/prinet.h
+++ b/pr/include/prinet.h
@@ -60,10 +60,6 @@
#define prinet_h__
#if defined(XP_UNIX) || defined(XP_OS2) || defined(XP_BEOS)
-#ifdef LINUX
-#undef __STRICT_ANSI__
-#define __STRICT_ANSI__
-#endif
#include <sys/types.h>
#include <sys/socket.h> /* AF_INET */
#include <netinet/in.h> /* INADDR_ANY, ..., ntohl(), ... */
diff --git a/pr/include/prinit.h b/pr/include/prinit.h
index e7ca7bce..f88ecbde 100644
--- a/pr/include/prinit.h
+++ b/pr/include/prinit.h
@@ -63,11 +63,11 @@ PR_BEGIN_EXTERN_C
** The format of the version string is
** "<major version>.<minor version>[.<patch level>] [<Beta>]"
*/
-#define PR_VERSION "4.6.1 Beta"
+#define PR_VERSION "4.6.8"
#define PR_VMAJOR 4
#define PR_VMINOR 6
-#define PR_VPATCH 1
-#define PR_BETA PR_TRUE
+#define PR_VPATCH 8
+#define PR_BETA PR_FALSE
/*
** PRVersionCheck
diff --git a/pr/include/private/primpl.h b/pr/include/private/primpl.h
index eebcb841..e2e3e606 100644
--- a/pr/include/private/primpl.h
+++ b/pr/include/private/primpl.h
@@ -1745,12 +1745,10 @@ struct PRFilePrivate {
* append mode. See Bugzilla 4090, 276330. */
#endif
_MDFileDesc md;
-#ifdef _PR_STRICT_ADDR_LEN
- PRUint16 af; /* If the platform requires passing the exact
- * length of the sockaddr structure for the
- * address family of the socket to socket
- * functions like accept(), we need to save
- * the address family of the socket. */
+#ifdef _PR_NEED_SECRET_AF
+ PRUint16 af; /* If the platform's implementation of accept()
+ * requires knowing the address family of the
+ * socket, we save the address family here. */
#endif
};
@@ -1780,12 +1778,14 @@ extern void _PR_InitLinker(void);
extern void _PR_InitAtomic(void);
extern void _PR_InitCPUs(void);
extern void _PR_InitDtoa(void);
+extern void _PR_InitTime(void);
extern void _PR_InitMW(void);
extern void _PR_InitRWLocks(void);
extern void _PR_NotifyCondVar(PRCondVar *cvar, PRThread *me);
extern void _PR_CleanupThread(PRThread *thread);
extern void _PR_CleanupCallOnce(void);
extern void _PR_CleanupMW(void);
+extern void _PR_CleanupTime(void);
extern void _PR_CleanupDtoa(void);
extern void _PR_ShutdownLinker(void);
extern void _PR_CleanupEnv(void);
diff --git a/pr/include/prlink.h b/pr/include/prlink.h
index b2eb5141..f0cea829 100644
--- a/pr/include/prlink.h
+++ b/pr/include/prlink.h
@@ -118,15 +118,16 @@ NSPR_API(PRLibrary*) PR_LoadLibrary(const char *name);
** in a library, if code fragments are supported by the OS.
** A code fragment can be specified by name or by an integer index.
**
-** Right now PRLibSpec supports three types of library specification:
-** a pathname, a Mac code fragment by name, and a Mac code fragment
-** by index.
+** Right now PRLibSpec supports four types of library specification:
+** a pathname in the native character encoding, a Mac code fragment
+** by name, a Mac code fragment by index, and a UTF-16 pathname.
*/
typedef enum PRLibSpecType {
PR_LibSpec_Pathname,
PR_LibSpec_MacNamedFragment, /* obsolete (for Mac OS Classic) */
- PR_LibSpec_MacIndexedFragment /* obsolete (for Mac OS Classic) */
+ PR_LibSpec_MacIndexedFragment, /* obsolete (for Mac OS Classic) */
+ PR_LibSpec_PathnameU /* supported only on Win32 */
} PRLibSpecType;
struct FSSpec; /* Mac OS FSSpec */
@@ -148,6 +149,9 @@ typedef struct PRLibSpec {
const struct FSSpec *fsspec;
PRUint32 index;
} mac_indexed_fragment; /* obsolete (for Mac OS Classic) */
+
+ /* if type is PR_LibSpec_PathnameU */
+ const PRUnichar *pathname_u; /* supported only on Win32 */
} value;
} PRLibSpec;
@@ -161,6 +165,7 @@ typedef struct PRLibSpec {
#define PR_LD_NOW 0x2 /* equivalent to RTLD_NOW on Unix */
#define PR_LD_GLOBAL 0x4 /* equivalent to RTLD_GLOBAL on Unix */
#define PR_LD_LOCAL 0x8 /* equivalent to RTLD_LOCAL on Unix */
+/* 0x8000 reserved for NSPR internal use */
/*
** Load the specified library, in the manner specified by 'flags'.
diff --git a/pr/include/prsystem.h b/pr/include/prsystem.h
index b0dfcf9e..13cf8bab 100644
--- a/pr/include/prsystem.h
+++ b/pr/include/prsystem.h
@@ -70,10 +70,13 @@ NSPR_API(char) PR_GetPathSeparator(void);
/* Types of information available via PR_GetSystemInfo(...) */
typedef enum {
- PR_SI_HOSTNAME,
+ PR_SI_HOSTNAME, /* the hostname with the domain name (if any)
+ * removed */
PR_SI_SYSNAME,
PR_SI_RELEASE,
- PR_SI_ARCHITECTURE
+ PR_SI_ARCHITECTURE,
+ PR_SI_HOSTNAME_UNTRUNCATED /* the hostname exactly as configured
+ * on the system */
} PRSysInfo;
diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h
index 3eb15548..09fe032a 100644
--- a/pr/include/prtypes.h
+++ b/pr/include/prtypes.h
@@ -178,7 +178,9 @@
#else /* Unix */
-#ifdef HAVE_VISIBILITY_PRAGMA
+/* GCC 3.3 and later support the visibility attribute. */
+#if (__GNUC__ >= 4) || \
+ (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
#define PR_VISIBILITY_DEFAULT __attribute__((visibility("default")))
#else
#define PR_VISIBILITY_DEFAULT
@@ -468,10 +470,6 @@ typedef PRUint8 PRPackedBool;
*/
typedef enum { PR_FAILURE = -1, PR_SUCCESS = 0 } PRStatus;
-#ifdef MOZ_UNICODE
-/*
- * EXPERIMENTAL: This type may be removed in a future release.
- */
#ifndef __PRUNICHAR__
#define __PRUNICHAR__
#if defined(WIN32) || defined(XP_MAC)
@@ -480,7 +478,6 @@ typedef wchar_t PRUnichar;
typedef PRUint16 PRUnichar;
#endif
#endif
-#endif /* MOZ_UNICODE */
/*
** WARNING: The undocumented data types PRWord and PRUword are