From: tpeters@... Date: 2002-10-27T06:43:29+09:00 Subject: mingw compilation: Here's how I tried to build ruby-1.6.7 with Mingw-2.0.0-3 and MSYS-1.0.8-2002.09.07-1 on a "windows me" system. I had to make these changes to the ruby source code: diff -ur orig/ruby-1.6.7/ext/socket/extconf.rb mingw/ruby-1.6.7/ext/socket/extconf.rb --- orig/ruby-1.6.7/ext/socket/extconf.rb 2001-12-03 10:04:46.000000000 +0000 +++ mingw/ruby-1.6.7/ext/socket/extconf.rb 2002-10-26 19:44:54.000000000 +0100 @@ -139,10 +139,14 @@ end if try_link(< +#else #include #include #include #include +#endif int main() { diff -ur orig/ruby-1.6.7/win32/win32.c mingw/ruby-1.6.7/win32/win32.c --- orig/ruby-1.6.7/win32/win32.c 2001-11-13 08:35:06.000000000 +0000 +++ mingw/ruby-1.6.7/win32/win32.c 2002-10-25 23:16:02.000000000 +0100 @@ -24,6 +24,11 @@ #include #include #include + +#ifdef __MINGW32__ +#include +#endif + #include "win32.h" #include "dir.h" #ifndef index diff -ur orig/ruby-1.6.7/win32/win32.h mingw/ruby-1.6.7/win32/win32.h --- orig/ruby-1.6.7/win32/win32.h 2001-11-13 08:35:06.000000000 +0000 +++ mingw/ruby-1.6.7/win32/win32.h 2002-10-25 21:14:00.000000000 +0100 @@ -223,8 +223,12 @@ extern pid_t waitpid (pid_t, int *, int); extern int do_spawn(char *); extern int kill(int, int); +#ifndef isinf extern int isinf(double); +#endif +#ifndef isnan extern int isnan(double); +#endif // When configuring, use a prefix argument with a drive letter, and use forward slashes as path delimiters, like this: ./configure --prefix=c:/PROGRA~1/Ruby after that, run "make", "make test" and "make install". "make install" will pause for some 30 seconds right at the beginning, don't interrupt, it will continue! I also checked that this patch does not harm the cygwin, msvc6, or linux builds. Tobias