error: Size of "void *" is less than size of "long"
Jeremie Le Hen
jeremie at le-hen.org
Wed Feb 10 10:15:07 UTC 2010
Hi Philip,
On Tue, Feb 09, 2010 at 09:12:33PM -0500, Philip M. Gollucci wrote:
> On 2/9/2010 5:21 PM, Jeremie Le Hen wrote:
> > Forgot the attachments :).
>
> Your system is confused!! The problem isn't the port is something local
> in your system or config or some odd cross compile foobar.
>
> $ ./size
> sizeof(long) = 4
> sizeof(void*) = 4
>
> Can you run this please and post your output ?
>
> #include <stdio.h>
>
> int main (int argc, char **argv) {
>
> (void)fprintf(stdout, "sizeof(long) = %d\n", sizeof(long));
> (void)fprintf(stdout, "sizeof(void*) = %d\n", sizeof(void*));
>
> return 0;
> }
>
> If either of them are '8' I'd look towards cross compile foobars.
Actually, I had already extracted the guilty test from the configure
script and it didn't return an error when run manually:
axl# cat /tmp/test.c
int main(void)
{
return sizeof(void *) < sizeof(long);
}
axl# gcc -o /tmp/test /tmp/test.c
axl# /tmp/test ; echo $?
0
Here is your test program:
axl# cat > /tmp/test2.c
#include <stdio.h>
int main (int argc, char **argv) {
(void)fprintf(stdout, "sizeof(long) = %d\n", sizeof(long));
(void)fprintf(stdout, "sizeof(void*) = %d\n", sizeof(void*));
return 0;
}
^Daxl# gcc -o /tmp/test2 /tmp/test2.c
axl# /tmp/test2
sizeof(long) = 4
sizeof(void*) = 4
I am utterly puzzled. I don't have any local change.
Regards,
--
Jeremie Le Hen
Humans are born free and equal. But some are more equal than the others.
Coluche
More information about the freebsd-apache
mailing list