httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r294809 - in /httpd/httpd/trunk: acinclude.m4 configure.in
Date Tue, 04 Oct 2005 16:18:29 GMT
Author: colm
Date: Tue Oct  4 09:18:24 2005
New Revision: 294809

URL: http://svn.apache.org/viewcvs?rev=294809&view=rev
Log:
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. 

Modified:
    httpd/httpd/trunk/acinclude.m4
    httpd/httpd/trunk/configure.in

Modified: httpd/httpd/trunk/acinclude.m4
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/acinclude.m4?rev=294809&r1=294808&r2=294809&view=diff
==============================================================================
--- httpd/httpd/trunk/acinclude.m4 (original)
+++ httpd/httpd/trunk/acinclude.m4 Tue Oct  4 09:18:24 2005
@@ -570,3 +570,24 @@
 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
+])

Modified: httpd/httpd/trunk/configure.in
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/configure.in?rev=294809&r1=294808&r2=294809&view=diff
==============================================================================
--- httpd/httpd/trunk/configure.in (original)
+++ httpd/httpd/trunk/configure.in Tue Oct  4 09:18:24 2005
@@ -32,6 +32,9 @@
 dnl export expanded and relative configure argument variables
 APACHE_EXPORT_ARGUMENTS
 
+dnl confirm that a void pointer is large enough to store a long integer
+APACHE_CHECK_VOID_PTR_LEN
+
 dnl Save user-defined environment settings for later restoration
 dnl
 APR_SAVE_THE_ENVIRONMENT(CPPFLAGS)



Mime
View raw message