httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis Daly <d...@daoine.org>
Subject Re: [PATCH] distinguishing 64-bit vs. 32-bit in httpd -v
Date Tue, 04 Dec 2001 14:52:54 GMT
On Tue, Dec 04, 2001 at 09:46:21AM -0500, Jeff Trawick wrote:
> Brian Pane <bpane@pacbell.net> writes:
> 
> > >+    printf("Pointer size:   %d\n", sizeof(void *));
> > 
> > How about
> >        printf("Pointer size:   %d bits\n", 8*sizeof(void*)); ?
> > to make it a bit less subtle?
> 
> Yessir, that is a big improvement.  If nobody comes up with a better
> scheme or expresses a preference for an APR symbol then I'll go with
> that.

8 is a magic number.  How about

       printf("Pointer size:   %d bits\n", CHAR_BIT*sizeof(void*)); ?

to allow for any machine which has some other number of bits in a
(C-)byte.

#include <limits.h>
would be needed somewhere too, if it's not already there.

	f
-- 
Francis Daly        deva@daoine.org

Mime
View raw message