summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-04 10:35:28 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-04 10:35:28 +0000
commit6e7d7bf5dd4af81ad71fba0be1346f14acafe201 (patch)
tree18289b494f7ff636d515b1958f780c2ea506b236 /win32
parentf45caa14f6e239afac1eb66910a2d1f6fd59abf2 (diff)
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/Makefile.sub5
-rw-r--r--win32/setup.mak19
2 files changed, 19 insertions, 5 deletions
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index d469cb1243..b79c351db9 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -332,6 +332,9 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
#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 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
#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
diff --git a/win32/setup.mak b/win32/setup.mak
index 39a00e8fae..0ddf401bff 100644
--- a/win32/setup.mak
+++ b/win32/setup.mak
@@ -60,9 +60,9 @@ BASERUBY = $(BASERUBY)
@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 @@ int main(int argc, char **argv)
@.\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 @@ $(CPU) = $(PROCESSOR_LEVEL)
-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 @@ $(CPU) = $(PROCESSOR_LEVEL)
$(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."