[#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:

off_t weirdness

From: Nikolai Weibull <mailing-lists.ruby-core@...>
Date: 2005-03-13 16:31:55 UTC
List: ruby-core #4560
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

#include <ruby.h>
#include <assert.h>
#include <sys/types.h>

int
main(void)
{
	return sizeof(off_t);
}

instead, the result is 8.  This "bug" set me back about an hour of
work, which kind of sucked.  This behavior worries me a bit, as there
may be places where ruby.h isn't included and the sizeof(off_t) will be
4 and others where it is included and the sizeof(off_t) will be 8,
causing all weird kinds of behavior.  Is there a reason for why this is
so, or is it simply a problem in how my system has set up its headers?,
	nikolai

-- 
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}

In This Thread

Prev Next