summaryrefslogtreecommitdiffstats
path: root/ruby.c
diff options
context:
space:
mode:
authoruema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-22 11:58:08 +0000
committeruema2 <uema2@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-04-22 11:58:08 +0000
commitf99274adab4b86983c8259c98655613eca504ae1 (patch)
tree6a296f3fbf61cc69775340688db44b42fae12041 /ruby.c
parent52f9ec5f3c053247cfbd6fbf4de660cb5621e604 (diff)
downloadruby-f99274adab4b86983c8259c98655613eca504ae1.tar.gz
ruby-f99274adab4b86983c8259c98655613eca504ae1.tar.xz
ruby-f99274adab4b86983c8259c98655613eca504ae1.zip
* ruby.c: don't call VirtualQuery in ruby_init_loadpath()
on mswince. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.c')
-rw-r--r--ruby.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/ruby.c b/ruby.c
index 4f25fc49c..b7529b09b 100644
--- a/ruby.c
+++ b/ruby.c
@@ -17,6 +17,7 @@
#endif
#ifdef _WIN32_WCE
#include <winsock.h>
+#include "wince.h"
#endif
#include "ruby.h"
#include "dln.h"
@@ -241,9 +242,11 @@ ruby_init_loadpath()
HMODULE libruby = NULL;
MEMORY_BASIC_INFORMATION m;
+#ifndef _WIN32_WCE
memset(&m, 0, sizeof(m));
if (VirtualQuery(ruby_init_loadpath, &m, sizeof(m)) && m.State == MEM_COMMIT)
libruby = (HMODULE)m.AllocationBase;
+#endif
GetModuleFileName(libruby, libpath, sizeof libpath);
#elif defined(DJGPP)
extern char *__dos_argv0;