diff --git a/desmume/src/libretro-common/include/retro_common.h b/desmume/src/libretro-common/include/retro_common.h index 32ff1a861..d84cafb58 100644 --- a/desmume/src/libretro-common/include/retro_common.h +++ b/desmume/src/libretro-common/include/retro_common.h @@ -23,10 +23,14 @@ #ifndef _LIBRETRO_COMMON_RETRO_COMMON_H #define _LIBRETRO_COMMON_RETRO_COMMON_H -//This file is designed to normalize the libretro-common compiling environment. -//It is not to be used in public API headers, as they should be designed as leanly as possible. +/* +This file is designed to normalize the libretro-common compiling environment. +It is not to be used in public API headers, as they should be designed as leanly as possible. +Nonetheless.. in the meantime, if you do something like use ssize_t, which is not fully portable, +in a public API, you may need this. +*/ -//conditional compilation is handled inside here +/* conditional compilation is handled inside here */ #include #endif \ No newline at end of file diff --git a/desmume/src/lua-engine.cpp b/desmume/src/lua-engine.cpp index d14ebb3ee..1d1409423 100644 --- a/desmume/src/lua-engine.cpp +++ b/desmume/src/lua-engine.cpp @@ -178,7 +178,9 @@ static std::map s_cFuncInfoMap; static int name(lua_State* L) #ifdef _MSC_VER - #define snprintf _snprintf + #ifndef snprintf + #define snprintf _snprintf + #endif #define vscprintf _vscprintf #else #define stricmp strcasecmp diff --git a/desmume/src/types.h b/desmume/src/types.h index f7afee1b2..b13660d74 100644 --- a/desmume/src/types.h +++ b/desmume/src/types.h @@ -97,9 +97,6 @@ #ifdef _MSC_VER #include - #if _MSC_VER < 1900 - #define snprintf _snprintf - #endif #else #define WINAPI #endif diff --git a/desmume/src/utils/AsmJit/core/apibegin.h b/desmume/src/utils/AsmJit/core/apibegin.h index f34fee134..c7c52955a 100644 --- a/desmume/src/utils/AsmJit/core/apibegin.h +++ b/desmume/src/utils/AsmJit/core/apibegin.h @@ -18,8 +18,12 @@ #pragma warning(disable: 4800) // forcing value to bool 'true' or 'false' // Rename symbols. +#ifndef vsnprintf #define vsnprintf _vsnprintf +#endif +#ifndef snprintf #define snprintf _snprintf +#endif #endif // _MSC_VER diff --git a/desmume/src/windows/DeSmuME_2010.vcxproj b/desmume/src/windows/DeSmuME_2010.vcxproj index c78da0fa3..d80853934 100644 --- a/desmume/src/windows/DeSmuME_2010.vcxproj +++ b/desmume/src/windows/DeSmuME_2010.vcxproj @@ -540,6 +540,7 @@ + diff --git a/desmume/src/windows/DeSmuME_2010.vcxproj.filters b/desmume/src/windows/DeSmuME_2010.vcxproj.filters index d4b43a2eb..e80389c4a 100644 --- a/desmume/src/windows/DeSmuME_2010.vcxproj.filters +++ b/desmume/src/windows/DeSmuME_2010.vcxproj.filters @@ -960,6 +960,9 @@ Core\libretro-common\rthreads + + Core\libretro-common\compat +