summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-12-10 18:18:53 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-12-10 18:18:53 -0800
commit009266215ff514a005c766d7d6fcfe8bb31dddd5 (patch)
treeed93ce3f69e4d45d776059dce5d5951971d352d3
parentb5b4ad71a0775c9c9e30edfc4758ebc34631282b (diff)
downloadtxr-009266215ff514a005c766d7d6fcfe8bb31dddd5.tar.gz
txr-009266215ff514a005c766d7d6fcfe8bb31dddd5.tar.bz2
txr-009266215ff514a005c766d7d6fcfe8bb31dddd5.zip
* configure: add to config.h the type double_intptr_t, which
is twice the size of intptr_t. It may not be available, so there is a HAVE_ macro to detect it.
-rw-r--r--ChangeLog6
-rwxr-xr-xconfigure12
2 files changed, 18 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e9380e95..ef62f3a7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2011-12-10 Kaz Kylheku <kaz@kylheku.com>
+ * configure: add to config.h the type double_intptr_t, which
+ is twice the size of intptr_t. It may not be available, so
+ there is a HAVE_ macro to detect it.
+
+2011-12-10 Kaz Kylheku <kaz@kylheku.com>
+
* eval.c (eval_init): New functions added as intrinsics.
* hash.c (hash_eql, hash_equal): New external functions.
diff --git a/configure b/configure
index 45804f50..3520af2b 100755
--- a/configure
+++ b/configure
@@ -769,6 +769,18 @@ intptr_max_expr="((((($intptr) 1 << $((SIZEOF_PTR * 8 - 2))) - 1) << 1) + 1)"
printf "#define INT_PTR_MAX %s\n" "$intptr_max_expr" >> config.h
printf "#define INT_PTR_MIN (-INT_PTR_MAX)\n" >> config.h
+if [ -n "$longlong" ] && [ $SIZEOF_LONGLONG_T -eq $(( 2 * $SIZEOF_PTR )) ]
+then
+ printf "#define HAVE_DOUBLE_INTPTR_T 1\n" >> config.h
+ printf "typedef longlong_t double_intptr_t;\n" >> config.h
+elif [ -n "$superlong" ] && [ $SIZEOF_SUPERLONG_T -eq $(( 2 * $SIZEOF_PTR )) ]
+then
+ printf "#define HAVE_DOUBLE_INTPTR_T 1\n" >> config.h
+ printf "typedef superlong_t double_intptr_t;\n" >> config.h
+fi
+
+#if HAVE_LONGLONG_T &&
+
#
# Alignment of wchar_t
#