diff options
-rw-r--r-- | src/Native/Bootstrap/common.h | 2 | ||||
-rw-r--r-- | src/Native/CMakeLists.txt | 12 | ||||
-rw-r--r-- | src/Native/Runtime/CommonMacros.h | 2 | ||||
-rw-r--r-- | src/Native/Runtime/portable.cpp | 2 | ||||
-rw-r--r-- | src/Native/gc/gc.cpp | 6 |
5 files changed, 8 insertions, 16 deletions
diff --git a/src/Native/Bootstrap/common.h b/src/Native/Bootstrap/common.h index fb3a8fa08..8e4631169 100644 --- a/src/Native/Bootstrap/common.h +++ b/src/Native/Bootstrap/common.h @@ -23,7 +23,7 @@ #include <new> -#ifndef WIN32 +#ifndef _WIN32 #include <pthread.h> #endif diff --git a/src/Native/CMakeLists.txt b/src/Native/CMakeLists.txt index 3ac29f6a4..83ccad224 100644 --- a/src/Native/CMakeLists.txt +++ b/src/Native/CMakeLists.txt @@ -152,7 +152,6 @@ endfunction(get_compile_definitions) if(CLR_CMAKE_PLATFORM_ARCH_AMD64) add_definitions(-D_TARGET_AMD64_=1) add_definitions(-D_AMD64_) - add_definitions(-DAMD64) elseif(CLR_CMAKE_PLATFORM_ARCH_I386) add_definitions(-D_TARGET_X86_=1) add_definitions(-D_X86_) @@ -173,23 +172,16 @@ function(convert_to_absolute_path RetSources) set(Sources ${ARGN}) foreach(Source IN LISTS Sources) list(APPEND AbsolutePathSources ${CMAKE_CURRENT_SOURCE_DIR}/${Source}) - endforeach() + endforeach() set(${RetSources} ${AbsolutePathSources} PARENT_SCOPE) endfunction(convert_to_absolute_path) if(WIN32) - add_definitions(-DWIN32) - add_definitions(-D_WIN32=1) - if(IS_64BIT_BUILD) - add_definitions(-D_WIN64=1) - endif() add_definitions(-DUNICODE=1) add_compile_options($<$<CONFIG:Debug>:-DDEBUG>) - add_compile_options(/Zi) # enable debugging information add_compile_options($<$<CONFIG:Debug>:/MTd>) add_compile_options($<$<CONFIG:Release>:/MT>) - add_compile_options($<$<CONFIG:RelWithDefInfo>:/MT>) - set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /PDBCOMPRESS") #shrink pdb size + add_compile_options(/Zi) # enable debugging information set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG") else(WIN32) string(TOUPPER ${CMAKE_BUILD_TYPE} UPPERCASE_CMAKE_BUILD_TYPE) diff --git a/src/Native/Runtime/CommonMacros.h b/src/Native/Runtime/CommonMacros.h index a36833e25..73d9a9e3e 100644 --- a/src/Native/Runtime/CommonMacros.h +++ b/src/Native/Runtime/CommonMacros.h @@ -208,7 +208,7 @@ bool inline FitsInI4(__int64 val) #ifndef GCENV_INCLUDED #if !defined(_INC_WINDOWS) && !defined(BINDER) -#ifdef WIN32 +#ifdef _WIN32 // this must exactly match the typedef used by windows.h typedef long HRESULT; #else diff --git a/src/Native/Runtime/portable.cpp b/src/Native/Runtime/portable.cpp index 1723a5403..19eaabbe4 100644 --- a/src/Native/Runtime/portable.cpp +++ b/src/Native/Runtime/portable.cpp @@ -294,7 +294,7 @@ COOP_PINVOKE_HELPER(void, RhpInterfaceDispatch64, ()) } #endif -#if defined(USE_PORTABLE_HELPERS) || !defined(WIN32) +#if defined(USE_PORTABLE_HELPERS) || !defined(_WIN32) typedef UIntTarget (*TargetFunc2)(UIntTarget, UIntTarget); COOP_PINVOKE_HELPER(UIntTarget, ManagedCallout2, (UIntTarget argument1, UIntTarget argument2, void *pTargetMethod, void *pPreviousManagedFrame)) { diff --git a/src/Native/gc/gc.cpp b/src/Native/gc/gc.cpp index 31acbb3dc..1fda07f98 100644 --- a/src/Native/gc/gc.cpp +++ b/src/Native/gc/gc.cpp @@ -5665,7 +5665,7 @@ void gc_heap::fix_large_allocation_area (BOOL for_gc_p) #ifdef _DEBUG alloc_context* acontext = -#endif // DEBUG +#endif // _DEBUG generation_alloc_context (large_object_generation); assert (acontext->alloc_ptr == 0); assert (acontext->alloc_limit == 0); @@ -6559,11 +6559,11 @@ uint32_t*& card_table_mark_array (uint32_t* c_table) return ((card_table_info*)((uint8_t*)c_table - sizeof (card_table_info)))->mark_array; } -#if defined (_TARGET_AMD64_) +#ifdef BIT64 #define mark_bit_pitch ((size_t)16) #else #define mark_bit_pitch ((size_t)8) -#endif //AMD64 +#endif // BIT64 #define mark_word_width ((size_t)32) #define mark_word_size (mark_word_width * mark_bit_pitch) |