On Thursday, 10 June 2004 at 11:12:00 +0900, Nobuyoshi Nakada wrote:
> Hi,
> 
> At Thu, 10 Jun 2004 08:43:39 +0900,
> Tim Hunter wrote in [ruby-talk:103007]:
> > > Should this be fixed in ruby.h?
> > 
> > Offhand, it seems to me that nothing is broken (except for the C language
> > itself, of course :-). Now that I have access to the Ruby sources, I see
> > that VALUE is a typedef for a long. I guess longs are 64 bits on the
> > Opteron. Without a prototype or other declaration in scope, the compiler
> > assumes that rb_reg_regcomp returns an int. Including the right header
> > file is the fix.
> 
> IMHO, It would be the only reasonable solution.  If you use
> regexp engine stuffs you should include re.h, I guess, since
> ruby.h doesn't cover them.
 
 I understand the problem now.
 Should ruby.h include re.h?

 I'm trying to find a solution that works on both 32bit and 64bit
 machines without code changes. And it would be best if I didn't
 have to have it fail on a 64bit machine to find out.

 Also, there is no problem with Solaris. Do the C compilers on sun
 assume 32bit longs on the 64bit machines...maybe  I should go look.

-- 
Jim Freeze
fortune: cpu time/usefulness ratio too high -- core dumped.