diff --git a/CMakeLists.txt b/CMakeLists.txt index 1afca94..9004842 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -202,7 +202,7 @@ else() if(${PROJECT_NAME}_NOSTDLIB_FLAGS STREQUAL "Auto") if(MSVC) - target_compile_definitions(${PROJECT_NAME} PRIVATE Z80_WITH_WINDOWS_DLL_MAIN_CRT_STARTUP) + target_compile_definitions(${PROJECT_NAME} PRIVATE Z80_WITH_DLL_MAIN_CRT_STARTUP) target_link_options(${PROJECT_NAME} PRIVATE "/NODEFAULTLIB") elseif(APPLE) if(CMAKE_C_COMPILER_ID MATCHES "^(AppleClang|Clang|GNU)$") diff --git a/sources/Z80.c b/sources/Z80.c index 7187694..69542d1 100644 --- a/sources/Z80.c +++ b/sources/Z80.c @@ -2932,7 +2932,7 @@ Z80_API zusize z80_run(Z80 *self, zusize cycles) } -#ifdef Z80_WITH_WINDOWS_DLL_MAIN_CRT_STARTUP +#ifdef Z80_WITH_DLL_MAIN_CRT_STARTUP int Z_MICROSOFT_STD_CALL _DllMainCRTStartup(void *hDllHandle, unsigned long dwReason, void *lpReserved) {return 1;} #endif