Page 1 of 1

Re: [Nagios-devel] macro_x madness heads up

Posted: Fri Nov 05, 2010 10:12 am
by Guest

On 5 Nov 2010, at 09:45, Andreas Ericsson wrote:

> Using this completely untested program, what output do you get?
>
> #include
> #include
> #include
> #define psize(type) printf("sizeof(" #type ") = %d\n", sizeof(type))
>
> int main(int argc, char **argv)
> {
> psize(time_t);
> psize(__darwin_suseconds_t);
> psize(int);
> psize(long);
> psize(off_t);
> psize(void *);
> psize(long long);
> return 0;
> }

I get:

$ ./a.out
sizeof(time_t) = 4
sizeof(__darwin_suseconds_t) = 4
sizeof(int) = 4
sizeof(long) = 4
sizeof(off_t) = 8
sizeof(void *) = 4
sizeof(long long) = 8

macbook 10.5, 32bit.

Ton






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]