From: Charles Mills Date: 2005-03-14T07:46:48+09:00 Subject: Re: off_t weirdness On Mar 13, 2005, at 8:31 AM, Nikolai Weibull wrote: > Try this on a Linux+glibc+GCC system: > > #include > #include > #include > > int > main(void) > { > return sizeof(off_t); > } > > on my system the result is 4. Now, if I write this as > In this case /usr/include/features.h is included (by assert.h) before the ruby source file 'defines.h'. > #include > #include > #include > > int > main(void) > { > return sizeof(off_t); > } In this case features.h is included after defines.h. defines.h defines a constant (I forget which one) which tells glibc to use 8 byte offsets. (If this constant is not defined when features.h is included then 4 byte offsets are used.) > > instead, the result is 8. This "bug" set me back about an hour of > work, which kind of sucked. I had the same experience once... it also sucked. -Charlie