I just received and installed my copy of Windows 7 Ultimate. Pretty slick. I went with the 64 bit version. It seems to be what most people out there have installed. Plus, I figured it would be the most problematic, so I may as well get ready to deal with the potential bugs. So far I''ve had 1 bug with sys-uname (already fixed). I decided to give win32-api a shot: win32/api.c:565: warning: cast to pointer from integer of different size default: rb_raise(cAPIProtoError, "Illegal prototype ''%s''", RSTRING_PTR(a_proto[i]) ); I''m not sure I understand the warning in this case. Anything I need to be worried about? The larger problem so far is that rm.exe (of all things) from msys is stackdumping. Regards, Dan
Hi, 2010/1/30 Daniel Berger <djberg96 at gmail.com>:> I just received and installed my copy of Windows 7 Ultimate. Pretty slick. > > I went with the 64 bit version. It seems to be what most people out > there have installed. Plus, I figured it would be the most > problematic, so I may as well get ready to deal with the potential > bugs. > > So far I''ve had 1 bug with sys-uname (already fixed). > > I decided to give win32-api a shot: > > win32/api.c:565: warning: cast to pointer from integer of different size > > default: > ? rb_raise(cAPIProtoError, "Illegal prototype ''%s''", > ? ? ?RSTRING_PTR(a_proto[i]) > ? ); > > I''m not sure I understand the warning in this case. Anything I need to > be worried about? >The real problem is that sizeof(long) != sizeof(void*) on Windows 64 bit. On Windows 64bit, data size is: sizeof(char) = 1 sizeof(short) = 2 sizeof(int) = 4 sizeof(long) = 4 sizeof(float) = 4 sizeof(double) = 8 sizeof(void*) = 8 sizeof(size_t) = 8 For detail, refer to http://msdn.microsoft.com/en-us/library/aa505945.aspx The whole win32utils assumed sizeof(long) = sizeof(void*) = 4. Thus, win32utils package is compatible with 32 bit. Another win64utils is required for 64 bit :) Regards, Park Heesob
On Fri, Jan 29, 2010 at 9:54 PM, Heesob Park <phasis at gmail.com> wrote:> Hi, > > 2010/1/30 Daniel Berger <djberg96 at gmail.com>: >> I just received and installed my copy of Windows 7 Ultimate. Pretty slick. >> >> I went with the 64 bit version. It seems to be what most people out >> there have installed. Plus, I figured it would be the most >> problematic, so I may as well get ready to deal with the potential >> bugs. >> >> So far I''ve had 1 bug with sys-uname (already fixed). >> >> I decided to give win32-api a shot: >> >> win32/api.c:565: warning: cast to pointer from integer of different size >> >> default: >> ? rb_raise(cAPIProtoError, "Illegal prototype ''%s''", >> ? ? ?RSTRING_PTR(a_proto[i]) >> ? ); >> >> I''m not sure I understand the warning in this case. Anything I need to >> be worried about? >> > The real problem is that sizeof(long) != sizeof(void*) on Windows 64 bit. > On Windows 64bit, data size is: > > sizeof(char) = 1 > sizeof(short) = 2 > sizeof(int) = 4 > sizeof(long) = 4 > sizeof(float) = 4 > sizeof(double) = 8 > sizeof(void*) = 8 > sizeof(size_t) = 8 > > For detail, refer to http://msdn.microsoft.com/en-us/library/aa505945.aspx > > The whole win32utils assumed sizeof(long) = sizeof(void*) = 4. > Thus, win32utils package is compatible with 32 bit. > Another win64utils is required for 64 bit :)Forgive me if I''m being dumb: // gcc 3.4.5 on Win7 #include <stdio.h> int main(){ printf("Size of void* : %i\n", sizeof(void*)); // 4 printf("Size of long: %i\n", sizeof(long)); // 4 return 0; } They both show 4 for me. Is there anything we can do to make win32-api work on 64 bit windows? There is check_sizeof in mkmf.rb, if that helps at all. Regards, Dan
On Sat, Jan 30, 2010 at 4:10 PM, Daniel Berger <djberg96 at gmail.com> wrote:> > Forgive me if I''m being dumb: > > // gcc 3.4.5 on Win7 > #include <stdio.h> > > int main(){ > ?printf("Size of void* : %i\n", sizeof(void*)); // 4 > ?printf("Size of long: %i\n", sizeof(long)); // 4 > ?return 0; > } > > They both show 4 for me. > > Is there anything we can do to make win32-api work on 64 bit windows? > > There is check_sizeof in mkmf.rb, if that helps at all. >GCC 3.4.5 is 32bits application, even when running on 64bits OS. (yeah, the joys of WOW64) I think mkmf one will work for you, since will use the same compiler used by Ruby in the same compilation mode, so will generate the expected sizeof. Cheers, -- 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
On Sat, Jan 30, 2010 at 12:06 PM, Luis Lavena <luislavena at gmail.com> wrote:> On Sat, Jan 30, 2010 at 4:10 PM, Daniel Berger <djberg96 at gmail.com> wrote: >> >> Forgive me if I''m being dumb: >> >> // gcc 3.4.5 on Win7 >> #include <stdio.h> >> >> int main(){ >> ?printf("Size of void* : %i\n", sizeof(void*)); // 4 >> ?printf("Size of long: %i\n", sizeof(long)); // 4 >> ?return 0; >> } >> >> They both show 4 for me. >> >> Is there anything we can do to make win32-api work on 64 bit windows? >> >> There is check_sizeof in mkmf.rb, if that helps at all. >> > > GCC 3.4.5 is 32bits application, even when running on 64bits OS. > (yeah, the joys of WOW64) > > I think mkmf one will work for you, since will use the same compiler > used by Ruby in the same compilation mode, so will generate the > expected sizeof.Actually, I''m seeing this on my XP VM as well, so I don''t think it''s a 64 bit issue. And I''m seeing rm.exe segfault there as well. Can you confirm? Regards, Dan PS - What''s happened to mingw.org?
Hi, 2010/2/3 Daniel Berger <djberg96 at gmail.com>:> On Sat, Jan 30, 2010 at 12:06 PM, Luis Lavena <luislavena at gmail.com> wrote: >> On Sat, Jan 30, 2010 at 4:10 PM, Daniel Berger <djberg96 at gmail.com> wrote: >>> >>> Forgive me if I''m being dumb: >>> >>> // gcc 3.4.5 on Win7 >>> #include <stdio.h> >>> >>> int main(){ >>> ?printf("Size of void* : %i\n", sizeof(void*)); // 4 >>> ?printf("Size of long: %i\n", sizeof(long)); // 4 >>> ?return 0; >>> } >>> >>> They both show 4 for me. >>> >>> Is there anything we can do to make win32-api work on 64 bit windows? >>> >>> There is check_sizeof in mkmf.rb, if that helps at all. >>> >> >> GCC 3.4.5 is 32bits application, even when running on 64bits OS. >> (yeah, the joys of WOW64) >> >> I think mkmf one will work for you, since will use the same compiler >> used by Ruby in the same compilation mode, so will generate the >> expected sizeof. > > Actually, I''m seeing this on my XP VM as well, so I don''t think it''s a > 64 bit issue. > > And I''m seeing rm.exe segfault there as well. > > Can you confirm? >I cannot confirm. The rm.exe works fine.> PS - What''s happened to mingw.org?"The domain name mingw.org was bought by some idiot." Refer to http://sourceforge.net/projects/mingw/ Regards, Park Heesob