From b773a592d3dfea4525c852a1d98540aa86bc0e43 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 10 Jan 2006 18:11:32 +0000 Subject: * dcrt0.cc (dll_crt0_0): Remove call to wincap.init. * init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker. Call wincap.init here before doing anything else. Use wincap.is_wow64 to determine if we're running in a WOW64 emulator. * mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's apparently not supported. (mmap64): Don't create mappings beyond EOF, which would need to use AT_ROUND_TO_PAGE, on WOW64. * wincap.cc (wincap): Throw into the .cygwin_dll_common section. (wincapc::init): Determine if running in WOW64 and set wow_64 flag. * wincap.h (class wincapc): Add wow64 member. (wincapc::is_wow64): New method. --- winsup/cygwin/wincap.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/wincap.cc') diff --git a/winsup/cygwin/wincap.cc b/winsup/cygwin/wincap.cc index 898f098c6..329cfec69 100644 --- a/winsup/cygwin/wincap.cc +++ b/winsup/cygwin/wincap.cc @@ -713,7 +713,7 @@ static NO_COPY wincaps wincap_vista = { has_working_virtual_lock:true }; -wincapc wincap; +wincapc wincap __attribute__((section (".cygwin_dll_common"), shared)); void wincapc::init () @@ -820,6 +820,10 @@ wincapc::init () ((wincaps *)this->caps)->is_server = true; } + BOOL is_wow64_proc = FALSE; + if (IsWow64Process (GetCurrentProcess (), &is_wow64_proc)) + wow64 = is_wow64_proc; + __small_sprintf (osnam, "%s-%d.%d", os, version.dwMajorVersion, version.dwMinorVersion); } -- cgit v1.2.3