Yasuhiro Matsumoto wrote: > I checked again. and The patch may not have every compiler. > > > That sounds like a problem in the Ruby include file. > > The system must define off_t, not the library. > > Of course, I think so. > > > Is there an #ifdef around this define of off_t? > > Yes, but it is awkward. > I get the distribution archive from following URL: > > ftp://ftp.ruby-lang.org/pub/ruby/binaries/mswin32/ > ruby-1.9.2-p0-i386-mswin32.zip > > This include windows binary and header files. > ----------------- > |+ include > | ruby.h > | + i386-msvcrt > | + ruby > | config.h > | + ruby > | ruby.h > | win32.h > ----------------- > > 1. 'ruby/win32.h' define 'off_t'. > > #if SIZEOF_OFF_T =3D=3D 8 > #define off_t __int64 > ... > > 2. And 'i386-msvcrt/ruby/config.h' define 'SIZEOF_OFF_T'. > > #define SIZEOF_OFF_T 8 > > this macro don't block any #ifdef > > > Is that why including sys/types.h first helps? > > If we include this patch there at least needs to be a comment exlaining w= > hy it's needed. > > Some compiler don't fix this problem. I tested MSVC. > We may have to re-define off_t . > > ------------------------- > > #include <ruby.h> > #ifdef RUBY19_OR_LATER > # include <ruby/encoding.h> > #endif > > #undef off_t > typedef long off_t; // perhaps, this will be same as it in other > sources. > > ------------------------- > But too tricky... :(
The problem appears to be that the config config.h file you are using is for another compiler. I recall we had a similar problem before. You could manually change the config.h file, but that's a hack. I suggest discussing this in the Ruby maillist. They should use off_t from the compiler supplied header files, there is no reason to define it in the ruby header files. -- hundred-and-one symptoms of being an internet addict: 249. You've forgotten what the outside looks like. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
