Changeset: d07634d1e4e1 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d07634d1e4e1
Modified Files:
        NT/monetdb_config.h.in
        configure.ag
Branch: int128
Log Message:

first step towards 128-bit integer (and thus 38-digit decimal) support:

Refine/extend configure checks for 128-bit integer type(s),
for now only __int128 / _int128_t as provided by GNU gcc,
and define HAVE_HGE & SIZEOF_HGE in case we find a
128-bit integer type.


diffs (57 lines):

diff --git a/NT/monetdb_config.h.in b/NT/monetdb_config.h.in
--- a/NT/monetdb_config.h.in
+++ b/NT/monetdb_config.h.in
@@ -677,6 +677,12 @@
 /* Define to 1 if the system has the type `__int128'. */
 /* #undef HAVE___INT128 */
 
+/* Define to 1 if the system has the type `__int128_t'. */
+/* #undef HAVE___INT128_T */
+
+/* Define to 1 if the system has a 128-bit integer type. */
+/* #undef HAVE_HGE */
+
 /* Define to 1 if the system has the type `__int64'. */
 #define HAVE___INT64 1
 
diff --git a/configure.ag b/configure.ag
--- a/configure.ag
+++ b/configure.ag
@@ -2590,7 +2590,7 @@ AC_TYPE_SSIZE_T
 AC_TYPE_PID_T
 AC_TYPE_OFF_T
 
-AC_CHECK_TYPES([__int64, long long, __int128])
+AC_CHECK_TYPES([__int64, long long, __int128, __int128_t])
 AC_CHECK_TYPES([ptrdiff_t],,,[#include <stddef.h>
 #include <sys/types.h>])
 AC_CHECK_TYPES(bool)
@@ -2606,6 +2606,8 @@ AC_CHECK_SIZEOF(ptrdiff_t,,[#include <st
 #include <sys/types.h>])
 AC_CHECK_SIZEOF(long long)
 AC_CHECK_SIZEOF(__int64)
+AC_CHECK_SIZEOF(__int128)
+AC_CHECK_SIZEOF(__int128_t)
 AC_C_CHAR_UNSIGNED
 
 case $host_os in
@@ -3113,6 +3115,19 @@ typedef __int64 lng;
 # endif
 #endif
 
+#ifdef HAVE___INT128
+typedef __int128 hge;
+# define HAVE_HGE 1
+# define SIZEOF_HGE SIZEOF___INT128
+#else
+# ifdef HAVE___INT128_T
+typedef __int128_t hge;
+#  define HAVE_HGE 1
+#  define SIZEOF_HGE SIZEOF___INT128_T
+# endif
+#endif
+
+
 #ifndef HAVE_PTRDIFF_T
 # if SIZEOF_SIZE_T == SIZEOF_INT
 typedef int ptrdiff_t;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to