* ruby.c: don't call VirtualQuery in ruby_init_loadpath()
on mswince. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3714 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
aede0cf378
commit
a16fc220ca
@ -1,3 +1,8 @@
|
|||||||
|
Tue Apr 22 20:58:00 2003 Takaaki Uematsu <uema2x@jcom.home.ne.jp>
|
||||||
|
|
||||||
|
* ruby.c: don't call VirtualQuery in ruby_init_loadpath()
|
||||||
|
on mswince.
|
||||||
|
|
||||||
Tue Apr 22 19:08:53 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
Tue Apr 22 19:08:53 2003 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||||
|
|
||||||
* marshal.c (save_mantissa, load_mantissa): for interoperability
|
* marshal.c (save_mantissa, load_mantissa): for interoperability
|
||||||
|
3
ruby.c
3
ruby.c
@ -17,6 +17,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#ifdef _WIN32_WCE
|
#ifdef _WIN32_WCE
|
||||||
#include <winsock.h>
|
#include <winsock.h>
|
||||||
|
#include "wince.h"
|
||||||
#endif
|
#endif
|
||||||
#include "ruby.h"
|
#include "ruby.h"
|
||||||
#include "dln.h"
|
#include "dln.h"
|
||||||
@ -241,9 +242,11 @@ ruby_init_loadpath()
|
|||||||
HMODULE libruby = NULL;
|
HMODULE libruby = NULL;
|
||||||
MEMORY_BASIC_INFORMATION m;
|
MEMORY_BASIC_INFORMATION m;
|
||||||
|
|
||||||
|
#ifndef _WIN32_WCE
|
||||||
memset(&m, 0, sizeof(m));
|
memset(&m, 0, sizeof(m));
|
||||||
if (VirtualQuery(ruby_init_loadpath, &m, sizeof(m)) && m.State == MEM_COMMIT)
|
if (VirtualQuery(ruby_init_loadpath, &m, sizeof(m)) && m.State == MEM_COMMIT)
|
||||||
libruby = (HMODULE)m.AllocationBase;
|
libruby = (HMODULE)m.AllocationBase;
|
||||||
|
#endif
|
||||||
GetModuleFileName(libruby, libpath, sizeof libpath);
|
GetModuleFileName(libruby, libpath, sizeof libpath);
|
||||||
#elif defined(DJGPP)
|
#elif defined(DJGPP)
|
||||||
extern char *__dos_argv0;
|
extern char *__dos_argv0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user