summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'src/include')
-rw-r--r--src/include/config.h.in6
-rw-r--r--src/include/utils/int8.h23
2 files changed, 14 insertions, 15 deletions
diff --git a/src/include/config.h.in b/src/include/config.h.in
index c849b078325..f8836576cfe 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -219,6 +219,12 @@ extern void srandom(int seed);
/* Set to 1 if your DBL_MIN is problematic */
#undef HAVE_DBL_MIN_PROBLEM
+/* Set to 1 if type "long int" works and is 64 bits */
+#undef HAVE_LONG_INT_64
+
+/* Set to 1 if type "long long int" works and is 64 bits */
+#undef HAVE_LONG_LONG_INT_64
+
/*
* Code below this point should not require changes
*/
diff --git a/src/include/utils/int8.h b/src/include/utils/int8.h
index e285754d2ee..dff02b71206 100644
--- a/src/include/utils/int8.h
+++ b/src/include/utils/int8.h
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: int8.h,v 1.1 1998/07/08 14:10:30 thomas Exp $
+ * $Id: int8.h,v 1.2 1998/08/23 22:25:54 momjian Exp $
*
* NOTES
* These data types are supported on all 64-bit architectures, and may
@@ -23,29 +23,22 @@
#ifndef INT8_H
#define INT8_H
-#if defined(__alpha) || defined(PPC)
+#ifdef HAVE_LONG_INT_64
+/* Plain "long int" fits, use it */
typedef long int int64;
-
#define INT64_FORMAT "%ld"
-
-#elif defined(__GNUC__) && defined(i386)
+#else
+#ifdef HAVE_LONG_LONG_INT_64
+/* We have working support for "long long int", use that */
typedef long long int int64;
-
#define INT64_FORMAT "%Ld"
-
#else
+/* Won't actually work, but fall back to long int so that int8.c compiles */
typedef long int int64;
-
#define INT64_FORMAT "%ld"
+#define INT64_IS_BUSTED
#endif
-
-
-/*
-#if sizeof(int64) == 8
-#define HAVE_64BIT_INTS 1
#endif
-*/
-
extern int64 *int8in(char *str);
extern char *int8out(int64 * val);