Re: svn commit: r294809 - in /httpd/httpd/trunk: acinclude.m4 configure.in
On 10/04/2005 10:06 PM, Jim Jagielski wrote: > Colm MacCarthaigh wrote: > [..cut..] > > I thought the containers were integral types, not void*. If the containers > themselves are void*, then the problem is reversed from what I thought, > but still a valid problem. I think we have both problems in the code as we cast void* to integral types and vice versa. Regards Rüdiger
Re: svn commit: r294809 - in /httpd/httpd/trunk: acinclude.m4 configure.in
Colm MacCarthaigh wrote: > > It makes sure that a void * container can store the largest of the types > we ocasionally place in such a container. It validates the assumption > made by code which is in httpd right now. > I thought the containers were integral types, not void*. If the containers themselves are void*, then the problem is reversed from what I thought, but still a valid problem. -- === Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ "If you can dodge a wrench, you can dodge a ball."
Re: svn commit: r294809 - in /httpd/httpd/trunk: acinclude.m4 configure.in
On Tue, Oct 04, 2005 at 02:16:16PM -0500, William A. Rowe, Jr. wrote: > Actually I'm also confused, not by the fact that we resolve this test, > but exactly what it nets us. It makes sure that a void * container can store the largest of the types we ocasionally place in such a container. It validates the assumption made by code which is in httpd right now. It should be taken out if/when the code making those assumptions are removed. In the meantime; if someone somehow managed to wheel out a rusty copy of TurboC for Dos, with the forever-brilliant "near", "far" and "huge" pointer-model, and then somehow again managed to get a configure script to use this compiler, it would fail here (a 16-bit pointer would be less than the 32-bit long) instead of probably about 20 lines further along the configure script ;) > Much more useful would be, as I mentioned before, a test with results > if sizeof int == sizeof void* then typedef ap_intptr_t int, > if sizeof long == sizeof void* then typedef ap_intptr_t long, > and we could have unsigned (ap_uintptr_t) of the same if anyone > supposes that's useful. This would be much better, though it's not just longs that we place in these pointer types, chars and ints get placed in them too. It's just all a lot more work, tracking down all of the instances, and adding new conditional typedef's for each one. Adreas' original patch just fixed the compiler warnings, these assignments have been in quite a while, and there are more to be found, no doubt. Does anyone have a tool which will But it is an utterly tedious near-pointless task, so it's kind of hard to be motivated to do it ;) -- Colm MacCárthaighPublic Key: [EMAIL PROTECTED]
Re: svn commit: r294809 - in /httpd/httpd/trunk: acinclude.m4 configure.in
Rüdiger Plüm wrote: On 10/04/2005 06:18 PM, [EMAIL PROTECTED] wrote: Author: colm Date: Tue Oct 4 09:18:24 2005 New Revision: 294809 +AC_CACHE_CHECK([for void pointer length], [ap_void_ptr_lt_long], Sorry for being confused by this, but I read your variable name ap_void_ptr_lt_long as "(size of) void ptr is less than (size of) long", but the assignment of "yes" and "no" is exactly the opposite. What about AC_CACHE_CHECK([for void pointer length], [ap_void_ptr_lt_long], Actually I'm also confused, not by the fact that we resolve this test, but exactly what it nets us. Much more useful would be, as I mentioned before, a test with results if sizeof int == sizeof void* then typedef ap_intptr_t int, if sizeof long == sizeof void* then typedef ap_intptr_t long, and we could have unsigned (ap_uintptr_t) of the same if anyone supposes that's useful.
Re: svn commit: r294809 - in /httpd/httpd/trunk: acinclude.m4 configure.in
On 10/04/2005 06:18 PM, [EMAIL PROTECTED] wrote: > Author: colm > Date: Tue Oct 4 09:18:24 2005 > New Revision: 294809 [..cut..] > > + > +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 > +]) > [..cut..] Sorry for being confused by this, but I read your variable name ap_void_ptr_lt_long as "(size of) void ptr is less than (size of) long", but the assignment of "yes" and "no" is exactly the opposite. What about 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=no], [ap_void_ptr_lt_long=yes], [ap_void_ptr_lt_long=yes])]) if test "$ap_void_ptr_lt_long" = "yes"; then AC_MSG_ERROR([Size of "void *" is less than size of "long"]) fi ]) No functional change, but seems clearer to me. Regards Rüdiger