Issue #4564 has been reported by Luis Lavena.

----------------------------------------
Bug #4564: mingw-w64, truncate, ftruncate and ftello -- properly evalute it's existence
http://redmine.ruby-lang.org/issues/4564

Author: Luis Lavena
Status: Open
Priority: Normal
Assignee: Nobuyoshi Nakada
Category: core
Target version: 1.9.x
ruby -v: ruby 1.9.3dev (2011-04-10 trunk 31255) [i386-mingw32]


Hello,

I'm using latest mingw-w64 builds that target in a experimental way GCC 4.7.0 codebase (gcc trunk)

mingw-w64 also combines improved CRT and headers support, which in this case included truncate, ftruncate and ftello support.

Ruby's trunk for win32 currently redefines those blindly, and even forces these functions presence to be used.

The attached patch proposes rely on configure's ability to detect these functions presence, conditionally define the missing functions and rename these functions to avoid redefinitions.

Assigning to Mr. Nobuyoshi Nakada and Mr. Usaku Nakamura for review and approval.

I've tested this against GCC 3.4.5, 4.5.1, 4.5.2 and 4.7.0, all on Windows. These patches should not affect any Linux version, however could affect Visual Studio builds.

Thank you for your time looking into this.



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