aboutsummaryrefslogtreecommitdiff
path: root/src/include/c.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/c.h')
-rw-r--r--src/include/c.h24
1 files changed, 17 insertions, 7 deletions
diff --git a/src/include/c.h b/src/include/c.h
index e00ee1e1eb8..d4a67aa69f0 100644
--- a/src/include/c.h
+++ b/src/include/c.h
@@ -12,7 +12,7 @@
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Id: c.h,v 1.109 2001/11/12 01:52:46 momjian Exp $
+ * $Id: c.h,v 1.110 2001/11/15 16:09:34 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -205,11 +205,11 @@ typedef char *Pointer;
* used for numerical computations and the
* frontend/backend protocol.
*/
-#ifndef __BEOS__ /* this shouldn't be required, but is is! */
+#if SIZEOF_INT8 == 0
typedef signed char int8; /* == 8 bits */
typedef signed short int16; /* == 16 bits */
typedef signed int int32; /* == 32 bits */
-#endif /* __BEOS__ */
+#endif /* SIZEOF_INT8 == 0 */
/*
* uintN
@@ -218,11 +218,11 @@ typedef signed int int32; /* == 32 bits */
* frontend/backend protocol.
*/
/* Also defined in interfaces/odbc/md5.h */
-#ifndef __BEOS__ /* this shouldn't be required, but is is! */
+#if SIZEOF_UINT8 == 0
typedef unsigned char uint8; /* == 8 bits */
typedef unsigned short uint16; /* == 16 bits */
typedef unsigned int uint32; /* == 32 bits */
-#endif /* __BEOS__ */
+#endif /* SIZEOF_UINT8 == 0 */
/*
* boolN
@@ -268,27 +268,37 @@ typedef double *float64;
/*
* 64-bit integers
*/
-#ifndef __BEOS__ /* this is already defined on BeOS */
#ifdef HAVE_LONG_INT_64
/* Plain "long int" fits, use it */
+#if SIZEOF_INT8 == 0
typedef long int int64;
+#endif
+#if SIZEOF_UINT8 == 0
typedef unsigned long int uint64;
+#endif
#else
#ifdef HAVE_LONG_LONG_INT_64
/* We have working support for "long long int", use that */
+#if SIZEOF_INT8 == 0
typedef long long int int64;
+#endif
+#if SIZEOF_UINT8 == 0
typedef unsigned long long int uint64;
+#endif
#else
/* Won't actually work, but fall back to long int so that code compiles */
+#if SIZEOF_INT8 == 0
typedef long int int64;
+#endif
+#if SIZEOF_UINT8 == 0
typedef unsigned long int uint64;
+#endif
#define INT64_IS_BUSTED
#endif
#endif
-#endif /* __BEOS__ */
/*
* Size