[Win32utils-devel] ffi and msvc

Heesob Park phasis at gmail.com
Mon Jan 9 20:52:33 EST 2012


Hi,

2012/1/10 Daniel Berger <djberg96 at gmail.com>

> Hi,
>
> > My test compiler is MSVC++ 10 and it has stdint.h
> > It seems MSVC++ 9 don't have stdint.h
> >
> > Could you try replacing
> >
> > #if defined(_MSC_VER) && !defined(INT8_MIN)
> > #  include <stdint.h>
> > #endif
> >
> > to
> >
> > #if (_MSC_VER >= 16) && !defined(INT8_MIN)
> > #  include <stdint.h>
> > #endif
> > ?
>
> I suspect you meant 1600. I tried that but then it leads to other
> errors because it doesn't understand some of the data types. I think
> the lack of stdint.h in MSVC 9 is considered a bug by many.
>
> Yes, you are right.


> I think the best thing to do is to put stdint.h directly into your ffi
> repo, and use that file if _MSV_VER < 1600. Just copy the one out of
> MSVC 10.
>
>
OK, I just copied the stdint.h out of MSVC 10.
And I confirmd it's working on MSVC 9 compiled ruby 1.8.7 and 1.9.3.

Regards,

Park Heesob
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/win32utils-devel/attachments/20120110/d83f9ddf/attachment.html>


More information about the win32utils-devel mailing list