summaryrefslogtreecommitdiff
path: root/pr/include/md
diff options
context:
space:
mode:
authorlarryh%netscape.com <devnull@localhost>1999-10-13 18:32:42 +0000
committerlarryh%netscape.com <devnull@localhost>1999-10-13 18:32:42 +0000
commit37bfd11ac779147a379619221da90fe589b8ac44 (patch)
tree1d4215798009e86bdaa632d963e0e1255f4aeee5 /pr/include/md
parent6b20a5101efcd554f96bc1a0d32dd38415e627f5 (diff)
downloadnspr-hg-37bfd11ac779147a379619221da90fe589b8ac44.tar.gz
NSPR 3.5 landing
Diffstat (limited to 'pr/include/md')
-rw-r--r--pr/include/md/Makefile10
-rw-r--r--pr/include/md/_aix.h7
-rw-r--r--pr/include/md/_aix32in6.cfg125
-rw-r--r--pr/include/md/_aix64.cfg4
-rw-r--r--pr/include/md/_beos.h2
-rw-r--r--pr/include/md/_hpux.h2
-rw-r--r--pr/include/md/_irix.h2
-rw-r--r--pr/include/md/_linux.h2
-rw-r--r--pr/include/md/_os2.h1
-rw-r--r--pr/include/md/_osf1.h6
-rw-r--r--pr/include/md/_solaris.h24
-rw-r--r--pr/include/md/_solaris32.cfg (renamed from pr/include/md/_solaris.cfg)0
-rw-r--r--pr/include/md/_solaris64.cfg130
-rw-r--r--pr/include/md/_unix_errors.h4
-rw-r--r--pr/include/md/_unixos.h4
-rw-r--r--pr/include/md/_win16.h1
-rw-r--r--pr/include/md/_win32_errors.h3
-rw-r--r--pr/include/md/_win95.h10
-rw-r--r--pr/include/md/_winnt.h19
19 files changed, 340 insertions, 16 deletions
diff --git a/pr/include/md/Makefile b/pr/include/md/Makefile
index 3acaa418..dfee019b 100644
--- a/pr/include/md/Makefile
+++ b/pr/include/md/Makefile
@@ -51,9 +51,13 @@ ifeq ($(OS_ARCH),AIX)
ifeq ($(USE_64),1)
MDCPUCFG_H = _aix64.cfg
else
+ifeq ($(USE_IPV6),1)
+MDCPUCFG_H = _aix32in6.cfg
+else
MDCPUCFG_H = _aix32.cfg
endif
endif
+endif
ifeq ($(OS_ARCH),BSD_OS)
MDCPUCFG_H = _bsdi.cfg
@@ -95,7 +99,11 @@ ifeq ($(OS_ARCH),SunOS)
ifeq ($(OS_RELEASE),4.1.3_U1)
MDCPUCFG_H = _sunos4.cfg
else
-MDCPUCFG_H = _solaris.cfg
+ifeq ($(USE_64),1)
+MDCPUCFG_H = _solaris64.cfg
+else
+MDCPUCFG_H = _solaris32.cfg
+endif
endif
endif
diff --git a/pr/include/md/_aix.h b/pr/include/md/_aix.h
index 011c756e..a80ccb06 100644
--- a/pr/include/md/_aix.h
+++ b/pr/include/md/_aix.h
@@ -54,6 +54,11 @@
#define _PR_POLL_AVAILABLE
#define _PR_USE_POLL
#define _PR_STAT_HAS_ONLY_ST_ATIME
+#ifdef _PR_INET6
+#define _PR_HAVE_GETHOSTBYNAME2
+#endif
+#define _PR_HAVE_SYSV_SEMAPHORES
+#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
/* Timer operations */
#if defined(AIX_TIMERS)
@@ -72,7 +77,9 @@ extern PRIntervalTime _MD_AixIntervalPerSec(void);
/* The atomic operations */
#include <sys/atomic_op.h>
#define _PR_HAVE_ATOMIC_OPS
+#ifndef IS_64
#define _PR_HAVE_ATOMIC_CAS
+#endif
#define _MD_INIT_ATOMIC()
#define _MD_ATOMIC_INCREMENT(val) ((PRInt32)fetch_and_add((atomic_p)val, 1) + 1)
#define _MD_ATOMIC_ADD(ptr, val) ((PRInt32)fetch_and_add((atomic_p)ptr, val) + val)
diff --git a/pr/include/md/_aix32in6.cfg b/pr/include/md/_aix32in6.cfg
new file mode 100644
index 00000000..05fe241f
--- /dev/null
+++ b/pr/include/md/_aix32in6.cfg
@@ -0,0 +1,125 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.1 (the "NPL"); you may not use this file except in
+ * compliance with the NPL. You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ *
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All Rights
+ * Reserved.
+ */
+
+#ifndef nspr_cpucfg___
+#define nspr_cpucfg___
+
+#ifndef XP_UNIX
+#define XP_UNIX
+#endif
+
+#ifndef AIX
+#define AIX
+#endif
+
+#undef IS_LITTLE_ENDIAN
+#define IS_BIG_ENDIAN 1
+
+#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 4
+#define PR_BYTES_PER_FLOAT 4
+#define PR_BYTES_PER_DOUBLE 8
+#define PR_BYTES_PER_WORD 4
+#define PR_BYTES_PER_DWORD 8
+
+#define PR_BYTES_PER_WORD_LOG2 2
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#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 32
+#define PR_BITS_PER_FLOAT 32
+#define PR_BITS_PER_DOUBLE 64
+#define PR_BITS_PER_WORD 32
+
+#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 5
+#define PR_BITS_PER_FLOAT_LOG2 5
+#define PR_BITS_PER_DOUBLE_LOG2 6
+#define PR_BITS_PER_WORD_LOG2 5
+
+#define PR_ALIGN_OF_SHORT 2
+#define PR_ALIGN_OF_INT 4
+#define PR_ALIGN_OF_LONG 4
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_FLOAT 4
+#define PR_ALIGN_OF_DOUBLE 4
+#define PR_ALIGN_OF_POINTER 4
+
+#define HAVE_LONG_LONG
+#undef HAVE_ALIGNED_DOUBLES
+#undef HAVE_ALIGNED_LONGLONGS
+
+#ifndef _PR_INET6
+#define _PR_INET6
+#endif
+
+#ifndef NO_NSPR_10_SUPPORT
+
+#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
+#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
+#define BYTES_PER_INT PR_BYTES_PER_INT
+#define BYTES_PER_INT64 PR_BYTES_PER_INT64
+#define BYTES_PER_LONG PR_BYTES_PER_LONG
+#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
+#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
+#define BYTES_PER_WORD PR_BYTES_PER_WORD
+#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
+
+#define BITS_PER_BYTE PR_BITS_PER_BYTE
+#define BITS_PER_SHORT PR_BITS_PER_SHORT
+#define BITS_PER_INT PR_BITS_PER_INT
+#define BITS_PER_INT64 PR_BITS_PER_INT64
+#define BITS_PER_LONG PR_BITS_PER_LONG
+#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
+#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
+#define BITS_PER_WORD PR_BITS_PER_WORD
+
+#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
+#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
+#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
+#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
+#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
+#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
+#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
+#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
+
+#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
+#define ALIGN_OF_INT PR_ALIGN_OF_INT
+#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
+#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
+#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
+#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
+#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
+#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
+
+#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
+#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
+#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
+
+#endif /* NO_NSPR_10_SUPPORT */
+
+#endif /* nspr_cpucfg___ */
diff --git a/pr/include/md/_aix64.cfg b/pr/include/md/_aix64.cfg
index e93d0130..30ad04d9 100644
--- a/pr/include/md/_aix64.cfg
+++ b/pr/include/md/_aix64.cfg
@@ -74,6 +74,10 @@
#undef HAVE_ALIGNED_DOUBLES
#undef HAVE_ALIGNED_LONGLONGS
+#ifndef _PR_INET6
+#define _PR_INET6
+#endif
+
#ifndef NO_NSPR_10_SUPPORT
#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
diff --git a/pr/include/md/_beos.h b/pr/include/md/_beos.h
index 310fe307..2e77f242 100644
--- a/pr/include/md/_beos.h
+++ b/pr/include/md/_beos.h
@@ -318,7 +318,6 @@ struct protoent* getprotobynumber(int number);
#define _MD_RECV _MD_recv
#define _MD_SEND _MD_send
#define _MD_ACCEPT_READ _MD_accept_read
-#define _MD_TRANSMITFILE _MD_transmitfile
#define _MD_GETSOCKNAME _MD_getsockname
#define _MD_GETPEERNAME _MD_getpeername
#define _MD_GETSOCKOPT _MD_getsockopt
@@ -514,7 +513,6 @@ PR_EXTERN(PRInt32) _MD_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr *
// PR_EXTERN(PRInt32) _MD_fast_accept(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg);
// PR_EXTERN(PRInt32) _MD_fast_accept_read(PRFileDesc *sd, PRInt32 *newSock, PRNetAddr **raddr, void *buf, PRInt32 amount, PRIntervalTime timeout, PRBool fast, _PR_AcceptTimeoutCallback callback, void *callbackArg);
// PR_EXTERN(void) _MD_update_accept_context(PRInt32 s, PRInt32 ls);
-PR_EXTERN(PRInt32) _MD_transmitfile(PRFileDesc *sock, PRFileDesc *file, const void *headers, PRInt32 hlen, PRInt32 flags, PRIntervalTime timeout);
PR_EXTERN(PRStatus) _MD_getsockname(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen);
PR_EXTERN(PRStatus) _MD_getpeername(PRFileDesc *fd, PRNetAddr *addr, PRUint32 *addrlen);
PR_EXTERN(PRStatus) _MD_getsockopt(PRFileDesc *fd, PRInt32 level, PRInt32 optname, char* optval, PRInt32* optlen);
diff --git a/pr/include/md/_hpux.h b/pr/include/md/_hpux.h
index 12895c63..0d45f6c3 100644
--- a/pr/include/md/_hpux.h
+++ b/pr/include/md/_hpux.h
@@ -46,6 +46,8 @@
#define _PR_POLL_AVAILABLE
#define _PR_USE_POLL
#define _PR_STAT_HAS_ONLY_ST_ATIME
+#define _PR_HAVE_POSIX_SEMAPHORES
+#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY
#undef _PR_HAVE_ATOMIC_OPS
diff --git a/pr/include/md/_irix.h b/pr/include/md/_irix.h
index 720991ac..4da14559 100644
--- a/pr/include/md/_irix.h
+++ b/pr/include/md/_irix.h
@@ -58,6 +58,8 @@
#define _PR_STAT_HAS_ST_ATIM
#define _PR_HAVE_OFF64_T
#define HAVE_POINTER_LOCALTIME_R
+#define _PR_HAVE_POSIX_SEMAPHORES
+#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY
/* Initialization entry points */
PR_EXTERN(void) _MD_EarlyInit(void);
diff --git a/pr/include/md/_linux.h b/pr/include/md/_linux.h
index 16a772b2..7980934c 100644
--- a/pr/include/md/_linux.h
+++ b/pr/include/md/_linux.h
@@ -70,6 +70,8 @@
#else
#define _PR_NO_LARGE_FILES
#endif
+#define _PR_HAVE_SYSV_SEMAPHORES
+#define PR_HAVE_SYSV_NAMED_SHARED_MEMORY
#ifdef _PR_PTHREADS
diff --git a/pr/include/md/_os2.h b/pr/include/md/_os2.h
index f4fee3d3..5d7ef0fc 100644
--- a/pr/include/md/_os2.h
+++ b/pr/include/md/_os2.h
@@ -261,7 +261,6 @@ extern PRInt32 _MD_CloseSocket(PRInt32 osfd);
#define _MD_ATOMIC_SET(x,y) _PR_MD_ATOMIC_SET(x, y)
#define _MD_INIT_IO (_PR_MD_INIT_IO)
-#define _MD_TRANSMITFILE (_PR_MD_TRANSMITFILE)
#define _MD_PR_POLL (_PR_MD_PR_POLL)
/* win95 doesn't have async IO */
diff --git a/pr/include/md/_osf1.h b/pr/include/md/_osf1.h
index 04860b68..7947ec61 100644
--- a/pr/include/md/_osf1.h
+++ b/pr/include/md/_osf1.h
@@ -46,6 +46,12 @@
#define _PR_USE_POLL
#define _PR_STAT_HAS_ONLY_ST_ATIME
#define _PR_HAVE_LARGE_OFF_T
+#ifdef _PR_INET6
+#define _PR_HAVE_GETIPNODEBYNAME
+#define _PR_HAVE_GETIPNODEBYADDR
+#endif
+#define _PR_HAVE_POSIX_SEMAPHORES
+#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY
#define USE_SETJMP
diff --git a/pr/include/md/_solaris.h b/pr/include/md/_solaris.h
index 467607ce..11681813 100644
--- a/pr/include/md/_solaris.h
+++ b/pr/include/md/_solaris.h
@@ -44,16 +44,34 @@
#define USE_DLFCN
#define NEED_STRFTIME_LOCK
-#ifdef _PR_LOCAL_THREADS_ONLY
-#undef _PR_HAVE_ATOMIC_OPS
-#else
+/*
+ * Sparc v8 does not have instructions to efficiently implement
+ * atomic increment/decrement operations. In the local threads
+ * only and pthreads versions, we use the default atomic routine
+ * implementation in pratom.c. The obsolete global threads only
+ * version uses a global mutex_t to implement the atomic routines
+ * in solaris.c, which is actually equivalent to the default
+ * implementation.
+ */
+#ifdef _PR_GLOBAL_THREADS_ONLY
#define _PR_HAVE_ATOMIC_OPS
+#endif
+
+#if defined(_PR_GLOBAL_THREADS_ONLY) || defined(_PR_PTHREADS)
+/*
+ * We have assembly language implementation of atomic
+ * stacks for the 32-bit sparc and x86 architectures only.
+ */
+#if !defined(sparc) || !defined(IS_64)
#define _PR_HAVE_ATOMIC_CAS
#endif
+#endif
#define _PR_POLL_AVAILABLE
#define _PR_USE_POLL
#define _PR_STAT_HAS_ST_ATIM
+#define _PR_HAVE_POSIX_SEMAPHORES
+#define PR_HAVE_POSIX_NAMED_SHARED_MEMORY
#include "prinrval.h"
PR_EXTERN(PRIntervalTime) _MD_Solaris_GetInterval(void);
diff --git a/pr/include/md/_solaris.cfg b/pr/include/md/_solaris32.cfg
index f6b988a1..f6b988a1 100644
--- a/pr/include/md/_solaris.cfg
+++ b/pr/include/md/_solaris32.cfg
diff --git a/pr/include/md/_solaris64.cfg b/pr/include/md/_solaris64.cfg
new file mode 100644
index 00000000..40832724
--- /dev/null
+++ b/pr/include/md/_solaris64.cfg
@@ -0,0 +1,130 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+ * The contents of this file are subject to the Netscape Public License
+ * Version 1.1 (the "NPL"); you may not use this file except in
+ * compliance with the NPL. You may obtain a copy of the NPL at
+ * http://www.mozilla.org/NPL/
+ *
+ * Software distributed under the NPL is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
+ * for the specific language governing rights and limitations under the
+ * NPL.
+ *
+ * The Initial Developer of this code under the NPL is Netscape
+ * Communications Corporation. Portions created by Netscape are
+ * Copyright (C) 1998 Netscape Communications Corporation. All Rights
+ * Reserved.
+ */
+
+#ifndef nspr_cpucfg___
+#define nspr_cpucfg___
+
+#ifndef XP_UNIX
+#define XP_UNIX
+#endif
+
+#ifndef SOLARIS
+#define SOLARIS
+#endif
+
+#ifdef sparc
+#undef IS_LITTLE_ENDIAN
+#define IS_BIG_ENDIAN 1
+#define PR_ALIGN_OF_INT64 8
+#define PR_ALIGN_OF_DOUBLE 8
+#elif defined(i386)
+#define IS_LITTLE_ENDIAN 1
+#undef IS_BIG_ENDIAN
+#define PR_ALIGN_OF_INT64 4
+#define PR_ALIGN_OF_DOUBLE 4
+#else
+#error unknown processor
+#endif
+#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_BYTES_PER_WORD_LOG2 3
+#define PR_BYTES_PER_DWORD_LOG2 3
+
+#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_FLOAT 4
+#define PR_ALIGN_OF_POINTER 8
+
+#define HAVE_LONG_LONG
+#define HAVE_ALIGNED_DOUBLES
+#define HAVE_ALIGNED_LONGLONGS
+
+#ifndef NO_NSPR_10_SUPPORT
+
+#define BYTES_PER_BYTE PR_BYTES_PER_BYTE
+#define BYTES_PER_SHORT PR_BYTES_PER_SHORT
+#define BYTES_PER_INT PR_BYTES_PER_INT
+#define BYTES_PER_INT64 PR_BYTES_PER_INT64
+#define BYTES_PER_LONG PR_BYTES_PER_LONG
+#define BYTES_PER_FLOAT PR_BYTES_PER_FLOAT
+#define BYTES_PER_DOUBLE PR_BYTES_PER_DOUBLE
+#define BYTES_PER_WORD PR_BYTES_PER_WORD
+#define BYTES_PER_DWORD PR_BYTES_PER_DWORD
+
+#define BITS_PER_BYTE PR_BITS_PER_BYTE
+#define BITS_PER_SHORT PR_BITS_PER_SHORT
+#define BITS_PER_INT PR_BITS_PER_INT
+#define BITS_PER_INT64 PR_BITS_PER_INT64
+#define BITS_PER_LONG PR_BITS_PER_LONG
+#define BITS_PER_FLOAT PR_BITS_PER_FLOAT
+#define BITS_PER_DOUBLE PR_BITS_PER_DOUBLE
+#define BITS_PER_WORD PR_BITS_PER_WORD
+
+#define BITS_PER_BYTE_LOG2 PR_BITS_PER_BYTE_LOG2
+#define BITS_PER_SHORT_LOG2 PR_BITS_PER_SHORT_LOG2
+#define BITS_PER_INT_LOG2 PR_BITS_PER_INT_LOG2
+#define BITS_PER_INT64_LOG2 PR_BITS_PER_INT64_LOG2
+#define BITS_PER_LONG_LOG2 PR_BITS_PER_LONG_LOG2
+#define BITS_PER_FLOAT_LOG2 PR_BITS_PER_FLOAT_LOG2
+#define BITS_PER_DOUBLE_LOG2 PR_BITS_PER_DOUBLE_LOG2
+#define BITS_PER_WORD_LOG2 PR_BITS_PER_WORD_LOG2
+
+#define ALIGN_OF_SHORT PR_ALIGN_OF_SHORT
+#define ALIGN_OF_INT PR_ALIGN_OF_INT
+#define ALIGN_OF_LONG PR_ALIGN_OF_LONG
+#define ALIGN_OF_INT64 PR_ALIGN_OF_INT64
+#define ALIGN_OF_FLOAT PR_ALIGN_OF_FLOAT
+#define ALIGN_OF_DOUBLE PR_ALIGN_OF_DOUBLE
+#define ALIGN_OF_POINTER PR_ALIGN_OF_POINTER
+#define ALIGN_OF_WORD PR_ALIGN_OF_WORD
+
+#define BYTES_PER_WORD_LOG2 PR_BYTES_PER_WORD_LOG2
+#define BYTES_PER_DWORD_LOG2 PR_BYTES_PER_DWORD_LOG2
+#define WORDS_PER_DWORD_LOG2 PR_WORDS_PER_DWORD_LOG2
+
+#endif /* NO_NSPR_10_SUPPORT */
+
+#endif /* ifndef nspr_cpucfg___ */
diff --git a/pr/include/md/_unix_errors.h b/pr/include/md/_unix_errors.h
index 23a6d84c..d911081e 100644
--- a/pr/include/md/_unix_errors.h
+++ b/pr/include/md/_unix_errors.h
@@ -24,8 +24,8 @@
PR_BEGIN_EXTERN_C
-PR_EXTERN(PRStatus) _MD_gethostname(char *name, PRUint32 namelen);
-#define _MD_GETHOSTNAME _MD_gethostname
+PR_EXTERN(void) _MD_unix_map_default_error(int err);
+#define _PR_MD_MAP_DEFAULT_ERROR _MD_unix_map_default_error
PR_EXTERN(void) _MD_unix_map_opendir_error(int err);
#define _PR_MD_MAP_OPENDIR_ERROR _MD_unix_map_opendir_error
diff --git a/pr/include/md/_unixos.h b/pr/include/md/_unixos.h
index 10b3c6be..53684bbe 100644
--- a/pr/include/md/_unixos.h
+++ b/pr/include/md/_unixos.h
@@ -324,8 +324,7 @@ extern PRInt32 _MD_mkdir(const char *name, PRIntn mode);
extern PRInt32 _MD_rmdir(const char *name);
extern PRInt32 _MD_accept_read(PRInt32 sock, PRInt32 *newSock,
PRNetAddr **raddr, void *buf, PRInt32 amount);
-extern PRInt32 _PR_UnixTransmitFile(PRFileDesc *sd, PRFileDesc *fd,
- const void *headers, PRInt32 hlen,
+extern PRInt32 _PR_UnixSendFile(PRFileDesc *sd, PRSendFileData *sfd,
PRTransmitFileFlags flags, PRIntervalTime timeout);
extern PRStatus _MD_LockFile(PRInt32 osfd);
@@ -446,6 +445,7 @@ extern int _MD_unix_get_nonblocking_connect_error(int osfd);
struct _MDFileMap {
PRIntn prot;
PRIntn flags;
+ PRBool isAnonFM; /* when true, PR_CloseFileMap() must close the related fd */
};
extern PRStatus _MD_CreateFileMap(struct PRFileMap *fmap, PRInt64 size);
diff --git a/pr/include/md/_win16.h b/pr/include/md/_win16.h
index 49b34415..544b4564 100644
--- a/pr/include/md/_win16.h
+++ b/pr/include/md/_win16.h
@@ -302,7 +302,6 @@ extern PRStatus _PR_KillWindowsProcess(struct PRProcess *process);
#define _MD_ATOMIC_SET(x,y) (*x, y)
#define _MD_INIT_IO _PR_MD_INIT_IO
-#define _MD_TRANSMITFILE _PR_MD_TRANSMITFILE
/* win95 doesn't have async IO */
#define _MD_SOCKET _PR_MD_SOCKET
diff --git a/pr/include/md/_win32_errors.h b/pr/include/md/_win32_errors.h
index 0601c06e..2ff0abe1 100644
--- a/pr/include/md/_win32_errors.h
+++ b/pr/include/md/_win32_errors.h
@@ -24,6 +24,9 @@
#include <errno.h>
+extern void _MD_win32_map_default_error(PRInt32 err);
+#define _PR_MD_MAP_DEFAULT_ERROR _MD_win32_map_default_error
+
extern void _MD_win32_map_opendir_error(PRInt32 err);
#define _PR_MD_MAP_OPENDIR_ERROR _MD_win32_map_opendir_error
diff --git a/pr/include/md/_win95.h b/pr/include/md/_win95.h
index f9ee38b0..89febac7 100644
--- a/pr/include/md/_win95.h
+++ b/pr/include/md/_win95.h
@@ -38,6 +38,7 @@
#define HAVE_SOCKET_REUSEADDR
#define HAVE_SOCKET_KEEPALIVE
#define _PR_HAVE_ATOMIC_OPS
+#define PR_HAVE_WIN32_NAMED_SHARED_MEMORY
/* --- Common User-Thread/Native-Thread Definitions --------------------- */
@@ -240,7 +241,6 @@ extern PRInt32 _MD_CloseSocket(PRInt32 osfd);
#define _MD_ATOMIC_SET(x,y) InterlockedExchange((PLONG)x, (LONG)y)
#define _MD_INIT_IO _PR_MD_INIT_IO
-#define _MD_TRANSMITFILE _PR_MD_TRANSMITFILE
/* win95 doesn't have async IO */
@@ -436,4 +436,12 @@ extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size);
extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap);
#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap
+/* --- Named semaphores stuff --- */
+#define _PR_HAVE_NAMED_SEMAPHORES
+#define _MD_OPEN_SEMAPHORE _PR_MD_OPEN_SEMAPHORE
+#define _MD_WAIT_SEMAPHORE _PR_MD_WAIT_SEMAPHORE
+#define _MD_POST_SEMAPHORE _PR_MD_POST_SEMAPHORE
+#define _MD_CLOSE_SEMAPHORE _PR_MD_CLOSE_SEMAPHORE
+#define _MD_DELETE_SEMAPHORE(name) PR_SUCCESS /* no op */
+
#endif /* nspr_win32_defs_h___ */
diff --git a/pr/include/md/_winnt.h b/pr/include/md/_winnt.h
index 0c2f438e..c75aa9b5 100644
--- a/pr/include/md/_winnt.h
+++ b/pr/include/md/_winnt.h
@@ -51,6 +51,7 @@
#define HAVE_SOCKET_KEEPALIVE
#define _PR_HAVE_ATOMIC_OPS
#define _PR_HAVE_ATOMIC_CAS
+#define PR_HAVE_WIN32_NAMED_SHARED_MEMORY
/* --- Common User-Thread/Native-Thread Definitions --------------------- */
@@ -85,7 +86,6 @@ typedef struct _MDOverlapped {
enum _MDIOModel ioModel; /* The I/O model to implement
* using overlapped I/O.
*/
-
union {
struct _MDThread *mdThread; /* For blocking I/O, this structure
* is embedded in the _MDThread
@@ -120,6 +120,10 @@ struct _MDThread {
void *sp; /* only valid when suspended */
PRUint32 magic; /* for debugging */
PR_CONTEXT_TYPE gcContext; /* Thread context for GC */
+ struct _PRCPU *thr_bound_cpu; /* thread bound to cpu */
+ PRBool interrupt_disabled;/* thread cannot be interrupted */
+ HANDLE thr_event; /* For native-threads-only support,
+ thread blocks on this event */
/* The following are used only if this is a fiber */
void *fiber_id; /* flag whether or not this is a fiber*/
@@ -194,6 +198,7 @@ struct _MDProcess {
DWORD id;
};
+
/* --- Misc stuff --- */
#define _MD_GET_SP(thread) (thread)->md.gcContext[6]
@@ -275,7 +280,7 @@ extern int _PR_NTFiberSafeSelect(int, fd_set *, fd_set *, fd_set *,
#define _MD_BIND _PR_MD_BIND
#define _MD_RECV _PR_MD_RECV
#define _MD_SEND _PR_MD_SEND
-#define _MD_TRANSMITFILE _PR_MD_TRANSMITFILE
+#define _MD_SENDFILE _PR_MD_SENDFILE
#define _MD_PR_POLL _PR_MD_PR_POLL
/* --- Scheduler stuff --- */
@@ -327,7 +332,7 @@ extern void _PR_Unblock_IO_Wait(PRThread *thr);
#define _MD_FREE_LOCK(lock) DeleteCriticalSection(&((lock)->mutex))
#ifndef PROFILE_LOCKS
#define _MD_LOCK(lock) EnterCriticalSection(&((lock)->mutex))
-#define _MD_TEST_AND_LOCK(lock) 0 /* XXXMB */
+#define _MD_TEST_AND_LOCK(lock) (TryEnterCriticalSection(&((lock)->mutex))== FALSE)
#define _MD_UNLOCK(lock) LeaveCriticalSection(&((lock)->mutex))
#else
#define _MD_LOCK(lock) \
@@ -505,4 +510,12 @@ extern PRStatus _MD_MemUnmap(void *addr, PRUint32 size);
extern PRStatus _MD_CloseFileMap(struct PRFileMap *fmap);
#define _MD_CLOSE_FILE_MAP _MD_CloseFileMap
+/* --- Named semaphores stuff --- */
+#define _PR_HAVE_NAMED_SEMAPHORES
+#define _MD_OPEN_SEMAPHORE _PR_MD_OPEN_SEMAPHORE
+#define _MD_WAIT_SEMAPHORE _PR_MD_WAIT_SEMAPHORE
+#define _MD_POST_SEMAPHORE _PR_MD_POST_SEMAPHORE
+#define _MD_CLOSE_SEMAPHORE _PR_MD_CLOSE_SEMAPHORE
+#define _MD_DELETE_SEMAPHORE(name) PR_SUCCESS /* no op */
+
#endif /* nspr_win32_defs_h___ */