From: Yukihiro Matsumoto Date: 2005-07-26T17:45:09+09:00 Subject: Re: Ruby on LLP64 In message "Re: Ruby on LLP64" on Tue, 26 Jul 2005 12:40:59 +0900, "aquammles22f" writes: |The source of my concern is that Win64 is based on LLP64, where sizeof(long) |is 4, while sizeof(void*) is 8. Here and there I find statements that say |size of long and void* has to be the same for ruby to run correctly because |of the way VALUE is used, but I just do not know how serious this constraint |is. For example, just defining | |#define VALUE long long | |will solve the problem or are there more fundamental problems regarding this |issue? Maybe. The following patch would solve your concern, if I haven't misunderstand the problem. Can you try? matz. --- ruby.h 7 Jun 2005 23:33:51 -0000 1.97.2.5 +++ ruby.h 26 Jul 2005 08:43:18 -0000 @@ -72,7 +72,14 @@ extern "C" { -#if SIZEOF_LONG != SIZEOF_VOIDP -# error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<---- -#endif +#if SIZEOF_LONG == SIZEOF_VOIDP typedef unsigned long VALUE; typedef unsigned long ID; +#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP +typedef unsigned long long VALUE; +typedef unsigned long long ID; +#elif SIZEOF___INT64 == SIZEOF_VOIDP +typedef unsigned __int64 VALUE; +typedef unsigned __int64 ID; +#else +# error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<---- +#endif