On Mon, Oct 03, 2005 at 08:38:02AM -0400, Jim Jagielski wrote:
> At the very last, if we are "assuming" behavior which is specifically
> implementation dependent, then a test during configure time that
> ensures sizeof(void *) <= sizeof(long) makes sense.
>
> There is no room, IMO, for silent hidden assumptions in httpd.
How about;
Index: configure.in
===================================================================
--- configure.in (revision 293579)
+++ configure.in (working copy)
@@ -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)
Index: acinclude.m4
===================================================================
--- acinclude.m4 (revision 293579)
+++ acinclude.m4 (working copy)
@@ -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 "int"])
+fi
+])
--
Colm MacCárthaigh Public Key: [EMAIL PROTECTED]