diff options
author | Adam Megacz <adam@xwt.org> | 2002-03-12 19:06:36 +0000 |
---|---|---|
committer | Adam Megacz <megacz@gcc.gnu.org> | 2002-03-12 19:06:36 +0000 |
commit | 916c46b5ab32a7cc6deb435c8f2a9451edd39208 (patch) | |
tree | ba69ee2014e9ab9f0759258ec9d82f1ac809d901 /boehm-gc/os_dep.c | |
parent | 089c8f976485ea1a57ca4d6590cea48782c51140 (diff) | |
download | gcc-916c46b5ab32a7cc6deb435c8f2a9451edd39208.tar.gz |
dyn_load.c: Renamed GC_win32s to GC_no_win32_dlls.
2002-03-12 Adam Megacz <adam@xwt.org>
* dyn_load.c: Renamed GC_win32s to GC_no_win32_dlls.
* misc.c: Renamed GC_is_win32s() to GC_no_win32_dlls
* os_dep.c: Renamed GC_win32s to GC_no_win32_dlls and
statically initialized it to TRUE if compiling with GCC.
* win32_threads.c (thread_start): We no longer use SEH if
compiling with GCC.
* mark.c (GC_mark_some): We no longer use SEH if
compiling with GCC.
From-SVN: r50671
Diffstat (limited to 'boehm-gc/os_dep.c')
-rw-r--r-- | boehm-gc/os_dep.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/boehm-gc/os_dep.c b/boehm-gc/os_dep.c index ae1125664e3..b8f4cf84c3c 100644 --- a/boehm-gc/os_dep.c +++ b/boehm-gc/os_dep.c @@ -928,19 +928,17 @@ void GC_register_data_segments() /* all real work is done by GC_register_dynamic_libraries. Under */ /* win32s, we cannot find the data segments associated with dll's. */ /* We rgister the main data segment here. */ - GC_bool GC_win32s = FALSE; /* We're running under win32s. */ - - GC_bool GC_is_win32s() - { - DWORD v = GetVersion(); - - /* Check that this is not NT, and Windows major version <= 3 */ - return ((v & 0x80000000) && (v & 0xff) <= 3); - } +# ifdef __GCC__ + GC_bool GC_no_win32_dlls = TRUE; /* GCC can't do SEH, so we can't use VirtualQuery */ +# else + GC_bool GC_no_win32_dlls = FALSE; +# endif void GC_init_win32() { - GC_win32s = GC_is_win32s(); + /* if we're running under win32s, assume that no DLLs will be loaded */ + DWORD v = GetVersion(); + GC_no_win32_dlls |= ((v & 0x80000000) && (v & 0xff) <= 3); } /* Return the smallest address a such that VirtualQuery */ @@ -1008,7 +1006,7 @@ void GC_register_data_segments() char * base; char * limit, * new_limit; - if (!GC_win32s) return; + if (!GC_no_win32_dlls) return; p = base = limit = GC_least_described_address(static_root); while (p < GC_sysinfo.lpMaximumApplicationAddress) { result = VirtualQuery(p, &buf, sizeof(buf)); @@ -1307,7 +1305,7 @@ SYSTEM_INFO GC_sysinfo; # ifdef USE_GLOBAL_ALLOC # define GLOBAL_ALLOC_TEST 1 # else -# define GLOBAL_ALLOC_TEST GC_win32s +# define GLOBAL_ALLOC_TEST GC_no_win32_dlls # endif word GC_n_heap_bases = 0; @@ -1338,7 +1336,7 @@ word bytes; void GC_win32_free_heap () { - if (GC_win32s) { + if (GC_no_win32_dlls) { while (GC_n_heap_bases > 0) { GlobalFree (GC_heap_bases[--GC_n_heap_bases]); GC_heap_bases[GC_n_heap_bases] = 0; |