[Rubyinstaller-devel] 1.9.1 FFI Gem

Luis Lavena luislavena at gmail.com
Tue Aug 4 14:07:24 EDT 2009


2009/8/4 Matt Hulse <matt.hulse at gmail.com>:
> Hello all.

Hello Matt!

> I'm somewhat new at this so I appreciate your patience with me.
> I have been testing some gems on WinXP SP2, Ruby 1.9.1-p129 mingw32
> installer and devkit from rubyinstaller.org.  The following output is from
> an attempt to install FFI:
> [...]
>
> Apparently Ruby 1.9.1 redefines ftruncate in win32.h:341 which conflicts
> with mingw32.  I can get the gem to compile by wrapping line 341 in win32.h
> with the following:

Ruby has the tendency to define their own functions without checking
they existed on the compiler headers.

> I post this here in the hopes that it will be useful to someone else but I'd
> also like to try something new.  I'd like to try and give back to Ruby.  I'm
> not really sure how to proceed.  Any tips from those who have contributed
> patches to Ruby?
>

Please post this exact same thing to Redmine here:

http://redmine.ruby-lang.org/

Indeed is a Ruby overlook that needs to be fixed.

Perhaps #if !defined(ftruncate) could possible work, since maybe older
versions of MinGW missed that.

Thank you for reporting this.
-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry


More information about the Rubyinstaller-devel mailing list