diff options
author | Colm MacCarthaigh <colm@apache.org> | 2005-10-04 18:18:24 +0200 |
---|---|---|
committer | Colm MacCarthaigh <colm@apache.org> | 2005-10-04 18:18:24 +0200 |
commit | 4674da2cc71a116b0277db071b069bf15342cfe8 (patch) | |
tree | 90dcd90e65da7eb9b1bd52bfbdc457ccfb80b3a3 /acinclude.m4 | |
parent | Initialise a variable, to avoid a gcc warning. (diff) | |
download | apache2-4674da2cc71a116b0277db071b069bf15342cfe8.tar.xz apache2-4674da2cc71a116b0277db071b069bf15342cfe8.zip |
One way or another, whether we leave the casts in or out, right now we are
using "void *" containers to store long integers; Add a configure-time check to
ensure that it is valid to assume that a "void *" container is large enough to
store a long int. See <200510031150.j93Boh700945@devsys.jaguNET.com> and
ensuing discussion on httpd-dev.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@294809 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'acinclude.m4')
-rw-r--r-- | acinclude.m4 | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4 index 0998bf9f6b..313d7150d6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -570,3 +570,24 @@ undefine([ap_ckver_minor]) undefine([ap_ckver_cvar]) undefine([ap_ckver_name]) ]) + +dnl +dnl APACHE_CHECK_VOID_PTR_LEN +dnl +dnl Checks if the size of a void pointer is at least as big as a "long" +dnl integer type. +dnl +AC_DEFUN([APACHE_CHECK_VOID_PTR_LEN], [ + +AC_CACHE_CHECK([for void pointer length], [ap_void_ptr_lt_long], +[AC_TRY_RUN([ +int main(void) +{ + return sizeof(void *) < sizeof(long); +}], [ap_void_ptr_lt_long=yes], [ap_void_ptr_lt_long=no], + [ap_void_ptr_lt_long=no])]) + +if test "$ap_void_ptr_lt_long" = "no"; then + AC_MSG_ERROR([Size of "void *" is less than size of "long"]) +fi +]) |