ruby-changes:11158
From: nobu <ko1@a...>
Date: Wed, 4 Mar 2009 19:35:41 +0900 (JST)
Subject: [ruby-changes:11158] Ruby:r22763 (trunk): * include/ruby/win32.h (WIN95): moved to config.h
nobu 2009-03-04 19:35:28 +0900 (Wed, 04 Mar 2009) New Revision: 22763 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=22763 Log: * include/ruby/win32.h (WIN95): moved to config.h * win32/Makefile.sub (config.h): defines WIN95 only if unicows.lib is available. * win32/setup.mak (-unicows-): checks if unicows.lib is available. Modified files: trunk/ChangeLog trunk/include/ruby/win32.h trunk/win32/Makefile.sub trunk/win32/setup.mak Index: include/ruby/win32.h =================================================================== --- include/ruby/win32.h (revision 22762) +++ include/ruby/win32.h (revision 22763) @@ -89,12 +89,6 @@ # define mode_t int #endif -#ifdef _M_IX86 -# define WIN95 1 -#else -# undef WIN95 -#endif - #ifdef WIN95 extern DWORD rb_w32_osid(void); #define rb_w32_iswinnt() (rb_w32_osid() == VER_PLATFORM_WIN32_NT) Index: ChangeLog =================================================================== --- ChangeLog (revision 22762) +++ ChangeLog (revision 22763) @@ -1,3 +1,12 @@ +Wed Mar 4 19:35:26 2009 Nobuyoshi Nakada <nobu@r...> + + * include/ruby/win32.h (WIN95): moved to config.h + + * win32/Makefile.sub (config.h): defines WIN95 only if unicows.lib + is available. + + * win32/setup.mak (-unicows-): checks if unicows.lib is available. + Wed Mar 4 05:19:27 2009 James Edward Gray II <jeg2@r...> * lib/csv.rb: Some minor documentation fixes from Gregory Brown. Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 22762) +++ win32/Makefile.sub (revision 22763) @@ -332,6 +332,9 @@ #if _MSC_VER != $(MSC_VER) #error MSC version unmatch: _MSC_VER: $(MSC_VER) is expected. #endif +!if defined(HAVE_UNICOWS) && "$(MACHINE)" == "x86" +#define WIN95 1 +!endif #define STDC_HEADERS 1 #define HAVE_SYS_TYPES_H 1 #define HAVE_SYS_STAT_H 1 @@ -483,7 +486,7 @@ #define RUBY_JMP_BUF jmp_buf #define inline __inline #define NEED_IO_SEEK_BETWEEN_RW 1 -!if "$(PROCESSOR_ARCHITECTURE)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64" +!if "$(MACHINE)" == "x86" || "$(ARCH)" == "x64" || "$(ARCH)" == "ia64" #define STACK_GROW_DIRECTION -1 !endif #define CANONICALIZATION_FOR_MATHN 1 Index: win32/setup.mak =================================================================== --- win32/setup.mak (revision 22762) +++ win32/setup.mak (revision 22763) @@ -60,9 +60,9 @@ @for %I in (ruby.exe) do @echo BASERUBY = %~s$$PATH:I >> $(MAKEFILE) !endif --system-vars-: -runtime- +-system-vars-: -runtime- -unicows- --system-vars32-: -osname32- -runtime- +-system-vars32-: -osname32- -runtime- -unicows- -system-vars64-: -osname64- -runtime- @@ -141,6 +141,17 @@ @.\rtname >>$(MAKEFILE) @del rtname.* +-unicows-: nul + @echo Checking unicows.lib + @$(CC) -MD <<conftest.c unicows.lib user32.lib > nul && echo>>$(MAKEFILE) HAVE_UNICOWS = 1 || rem +#include <windows.h> +int main() +{ + return GetEnvironmentVariableW(0, 0, 0) == 0; +} +<< + @del conftest.* + -version-: nul @$(APPEND) @$(CPP) -I$(srcdir) <<"Creating $(MAKEFILE)" | find "=" >>$(MAKEFILE) @@ -213,7 +224,7 @@ -epilogue-: nul !if exist(confargs.c) @$(APPEND) - @$(CPP) confargs.c | find "=" >> $(MAKEFILE) + @$(CPP) confargs.c 2>&1 | findstr "! =" >> $(MAKEFILE) @del confargs.c !endif @type << >>$(MAKEFILE) @@ -231,4 +242,4 @@ $(BANG)include $$(srcdir)/win32/Makefile.sub << @$(COMSPEC) /C $(srcdir:/=\)\win32\rm.bat config.h config.status - @echo type `$(MAKE)' to make ruby. + @echo "type `nmake' to make ruby." -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/