summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--byterun/config.h18
-rwxr-xr-xconfigure13
2 files changed, 10 insertions, 21 deletions
diff --git a/byterun/config.h b/byterun/config.h
index b8d457818..f77598850 100644
--- a/byterun/config.h
+++ b/byterun/config.h
@@ -44,20 +44,22 @@ typedef unsigned short uint32;
#error "No 32-bit integer type available"
#endif
-#if defined(ARCH_INT64_TYPE)
-typedef ARCH_INT64_TYPE int64;
-typedef ARCH_UINT64_TYPE uint64;
-#elif SIZEOF_LONGLONG == 8
-typedef long long int64;
-typedef unsigned long long uint64;
+#ifndef ARCH_INT64_TYPE
+#if SIZEOF_LONGLONG == 8
+#define ARCH_INT64_TYPE long long
+#define ARCH_UINT64_TYPE unsigned long long
#define ARCH_INT64_PRINTF_FORMAT "ll"
#elif SIZEOF_LONG == 8
-typedef long int64;
-typedef unsigned long uint64;
+#define ARCH_INT64_TYPE long
+#define ARCH_UINT64_TYPE unsigned long
#define ARCH_INT64_PRINTF_FORMAT "l"
#else
#error "No 64-bit integer type available"
#endif
+#endif
+
+typedef ARCH_INT64_TYPE int64;
+typedef ARCH_UINT64_TYPE uint64;
#if SIZEOF_PTR == SIZEOF_LONG
/* Standard models: ILP32 or I32LP64 */
diff --git a/configure b/configure
index 995b43a54..f2d312d55 100755
--- a/configure
+++ b/configure
@@ -529,19 +529,6 @@ echo "#define SIZEOF_PTR $3" >> m.h
echo "#define SIZEOF_SHORT $4" >> m.h
echo "#define SIZEOF_LONGLONG $5" >> m.h
-# Temporary fix: some OCaml programs, e.g. Coq, assume that
-# ARCH_INT64_TYPE is defined in config/m.h. Put a definition
-# there, even if it duplicates the logic present in config.h
-if test $5 = 8; then
- echo '#define ARCH_INT64_TYPE long long' >> m.h
- echo '#define ARCH_UINT64_TYPE unsigned long long' >> m.h
- echo '#define ARCH_INT64_PRINTF_FORMAT "ll"' >> m.h
-else
- echo '#define ARCH_INT64_TYPE long' >> m.h
- echo '#define ARCH_UINT64_TYPE unsigned long' >> m.h
- echo '#define ARCH_INT64_PRINTF_FORMAT "l"' >> m.h
-fi
-
# Determine endianness
sh ./runtest endian.c