[#4595] New block syntax — Daniel Amelang <daniel.amelang@...>

I'm really sorry if this isn't the place to talk about this. I've

25 messages 2005/03/21
[#4606] Re: New block syntax — "David A. Black" <dblack@...> 2005/03/21

Hi --

[#4629] Re: New block syntax — "Sean E. Russell" <ser@...> 2005/03/30

On Monday 21 March 2005 16:17, David A. Black wrote:

[#4648] about REXML::Encoding — speakillof <speakillof@...>

Hi.

15 messages 2005/03/31
[#4659] Re: about REXML::Encoding — "Sean E. Russell" <ser@...> 2005/04/04

On Thursday 31 March 2005 09:44, speakillof wrote:

Re: off_t weirdness

From: Charles Mills <cmills@...>
Date: 2005-03-13 22:53:25 UTC
List: ruby-core #4563
On Mar 13, 2005, at 2:46 PM, Charles Mills wrote:

> On Mar 13, 2005, at 8:31 AM, Nikolai Weibull wrote:
>
>> Try this on a Linux+glibc+GCC system:
>>
>> #include <assert.h>
>> #include <ruby.h>
>> #include <sys/types.h>
>>
>> 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 <ruby.h>
>> #include <assert.h>
>> #include <sys/types.h>
>>
>> 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.)
>
Oopps.  I guess the constant is probably in config.h, not defines.h...
It is probably '_FILE_OFFSET_BITS', '_LARGEFILE_SOURCE', or 
'_LARGEFILE64_SOURCE', but I am on a mac so I can't check.

>>
>> 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
>
>


In This Thread

Prev Next