summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2012-03-22 22:03:02 +0100
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2012-03-22 22:05:07 +0100
commit3ce217675c7cb986de7b711d8c5c7880d7a077da (patch)
treefb611ea0ad752a3e2674a44b55a4e1b540853ab8 /m4
parent207230b72a2c9df950ef53a1b8c469a823749830 (diff)
downloadgnutls-3ce217675c7cb986de7b711d8c5c7880d7a077da.tar.gz
Do not assume sizeof(unsigned long)==sizeof(void*).
Based on patch by B. Scott Michel.
Diffstat (limited to 'm4')
-rw-r--r--m4/hooks.m45
1 files changed, 5 insertions, 0 deletions
diff --git a/m4/hooks.m4 b/m4/hooks.m4
index 7e51acbce8..f070238d01 100644
--- a/m4/hooks.m4
+++ b/m4/hooks.m4
@@ -221,9 +221,14 @@ fi
# For storing integers in pointers without warnings
# http://developer.gnome.org/doc/API/2.0/glib/glib-Type-Conversion-Macros.html#desc
AC_CHECK_SIZEOF(void *)
+ AC_CHECK_SIZEOF(long long)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(int)
case $ac_cv_sizeof_void_p in
+ $ac_cv_sizeof_long_long)
+ AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], [(long long)],
+ [Additional cast to bring void* to a type castable to int.])
+ ;;
$ac_cv_sizeof_long)
AC_DEFINE([GNUTLS_POINTER_TO_INT_CAST], [(long)],
[Additional cast to bring void* to a type castable to int.])