Skip to content

Commit 51c7c00

Browse files
committed
adjust ifdefs
1 parent d4837ce commit 51c7c00

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/gc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ typedef struct {
4343
};
4444
// Work around a bug affecting gcc up to (at least) version 4.4.7
4545
// https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36839
46-
#ifndef _MSC_VER
46+
#if !defined(_COMPILER_MICROSOFT_)
4747
int _dummy[0];
4848
#endif
4949
char data[];
@@ -84,7 +84,7 @@ typedef struct _gcpage_t {
8484

8585
// contiguous storage for up to REGION_PG_COUNT naturally aligned GC_PAGE_SZ blocks
8686
// uses a very naive allocator (see malloc_page & free_page)
87-
#if defined(_P64) && !defined(_MSC_VER)
87+
#if defined(_P64) && !defined(_COMPILER_MICROSOFT_)
8888
#define REGION_PG_COUNT 16*8*4096 // 8G because virtual memory is cheap
8989
#else
9090
#define REGION_PG_COUNT 8*4096 // 512M
@@ -515,9 +515,9 @@ static NOINLINE void *malloc_page(void)
515515
if (heaps_ub[heap_i] < i)
516516
heaps_ub[heap_i] = i;
517517

518-
#ifdef __MINGW32__
518+
#if defined(_COMPILER_MINGW_)
519519
int j = __builtin_ffs(heap->freemap[i]) - 1;
520-
#elif _MSC_VER
520+
#elif defined(_COMPILER_MICROSOFT_)
521521
unsigned long j;
522522
_BitScanForward(&j, heap->freemap[i]);
523523
#else

0 commit comments

Comments
 (0)