summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2012-12-02 19:21:18 +0000
committerwtc%google.com <devnull@localhost>2012-12-02 19:21:18 +0000
commit5208113a435393acacafc2314a908bf8c782207c (patch)
tree9361b5facc6c957ef2ddd6da1587454bf938d591
parentfba3c2efa8db6a862c18970475c9a1223174c60a (diff)
downloadnspr-hg-5208113a435393acacafc2314a908bf8c782207c.tar.gz
Bug 634793: Back out the previous "try build" checkin.
Modified Files: config/prdepend.h pr/include/prlong.h pr/include/prtypes.h
-rw-r--r--config/prdepend.h1
-rw-r--r--pr/include/prlong.h8
-rw-r--r--pr/include/prtypes.h47
3 files changed, 11 insertions, 45 deletions
diff --git a/config/prdepend.h b/config/prdepend.h
index 6c66b37c..e49e9267 100644
--- a/config/prdepend.h
+++ b/config/prdepend.h
@@ -10,4 +10,3 @@
*/
#error "Do not include this header file."
-
diff --git a/pr/include/prlong.h b/pr/include/prlong.h
index aad21964..23bd3a9a 100644
--- a/pr/include/prlong.h
+++ b/pr/include/prlong.h
@@ -35,13 +35,7 @@ NSPR_API(PRUint64) LL_MaxUint(void);
#if defined(HAVE_LONG_LONG)
/* Keep this in sync with prtypes.h. */
-#ifdef _PR_HAVE_STDINT_H
-#define LL_MAXINT INT64_MAX
-#define LL_MININT INT64_MIN
-#define LL_ZERO INT64_C(0)
-#define LL_MAXUINT UINT64_MAX
-#define LL_INIT(hi, lo) ((INT64_C(hi) << 32) + INT64_C(lo))
-#elif PR_BYTES_PER_LONG == 8
+#if PR_BYTES_PER_LONG == 8 && !defined(__APPLE__)
#define LL_MAXINT 9223372036854775807L
#define LL_MININT (-LL_MAXINT - 1L)
#define LL_ZERO 0L
diff --git a/pr/include/prtypes.h b/pr/include/prtypes.h
index 04b0b0dd..56fa039c 100644
--- a/pr/include/prtypes.h
+++ b/pr/include/prtypes.h
@@ -205,22 +205,6 @@
PR_BEGIN_EXTERN_C
-/*
- * <stdint.h> first appeared in Visual C++ 2010.
- * _MSC_VER values:
- * Visual Studio 2008: 1500
- * Visual Studio 2010: 1600
- * Visual Studio 2012: 1700
- */
-#if defined(_MSC_VER) && _MSC_VER < 1600
-/* Visual C++ 2008 and older don't have <stdint.h>. */
-#elif defined(RC_INVOKED)
-/* Not applicable to the Windows resource compiler. */
-#else
-#include <stdint.h>
-#define _PR_HAVE_STDINT_H
-#endif
-
/************************************************************************
** TYPES: PRUint8
** PRInt8
@@ -228,10 +212,7 @@ PR_BEGIN_EXTERN_C
** The int8 types are known to be 8 bits each. There is no type that
** is equivalent to a plain "char".
************************************************************************/
-#ifdef _PR_HAVE_STDINT_H
-typedef uint8_t PRUint8;
-typedef int8_t PRInt8;
-#elif PR_BYTES_PER_BYTE == 1
+#if PR_BYTES_PER_BYTE == 1
typedef unsigned char PRUint8;
/*
** Some cfront-based C++ compilers do not like 'signed char' and
@@ -270,10 +251,7 @@ typedef signed char PRInt8;
** DESCRIPTION:
** The int16 types are known to be 16 bits each.
************************************************************************/
-#ifdef _PR_HAVE_STDINT_H
-typedef uint16_t PRUint16;
-typedef int16_t PRInt16;
-#elif PR_BYTES_PER_SHORT == 2
+#if PR_BYTES_PER_SHORT == 2
typedef unsigned short PRUint16;
typedef short PRInt16;
#else
@@ -298,12 +276,7 @@ typedef short PRInt16;
** DESCRIPTION:
** The int32 types are known to be 32 bits each.
************************************************************************/
-#ifdef _PR_HAVE_STDINT_H
-typedef uint32_t PRUint32;
-typedef int32_t PRInt32;
-#define PR_INT32(x) INT32_C(x)
-#define PR_UINT32(x) UINT32_C(x)
-#elif PR_BYTES_PER_INT == 4
+#if PR_BYTES_PER_INT == 4
typedef unsigned int PRUint32;
typedef int PRInt32;
#define PR_INT32(x) x
@@ -358,12 +331,12 @@ typedef long PRInt32;
************************************************************************/
#ifdef HAVE_LONG_LONG
/* Keep this in sync with prlong.h. */
-#ifdef _PR_HAVE_STDINT_H
-typedef int64_t PRInt64;
-typedef uint64_t PRUint64;
-#define PR_INT64(x) INT64_C(x)
-#define PR_UINT64(x) UINT64_C(x)
-#elif PR_BYTES_PER_LONG == 8
+/*
+ * On 64-bit Mac OS X, uint64 needs to be defined as unsigned long long to
+ * match uint64_t, otherwise our uint64 typedef conflicts with the uint64
+ * typedef in cssmconfig.h, which CoreServices.h includes indirectly.
+ */
+#if PR_BYTES_PER_LONG == 8 && !defined(__APPLE__)
typedef long PRInt64;
typedef unsigned long PRUint64;
#define PR_INT64(x) x ## L
@@ -378,7 +351,7 @@ typedef long long PRInt64;
typedef unsigned long long PRUint64;
#define PR_INT64(x) x ## LL
#define PR_UINT64(x) x ## ULL
-#endif /* _PR_HAVE_STDINT_H */
+#endif /* PR_BYTES_PER_LONG == 8 */
#define PR_INT64_MAX PR_INT64(0x7fffffffffffffff)
#define PR_INT64_MIN (-PR_INT64_MAX - 1)