mirror of https://github.com/encounter/SDL.git
Don't define memcpy(), memset() when using static VC runtime.
The linker will complain about duplicated symbols otherwise (see #3662, #5156).
This commit is contained in:
parent
8cd908e0b9
commit
0e63b514d5
|
@ -549,8 +549,9 @@ int SDL_isblank(int x) { return ((x) == ' ') || ((x) == '\t'); }
|
||||||
__declspec(selectany) int _fltused = 1;
|
__declspec(selectany) int _fltused = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* The optimizer on Visual Studio 2005 and later generates memcpy() and memset() calls */
|
/* The optimizer on Visual Studio 2005 and later generates memcpy() and memset() calls.
|
||||||
#if _MSC_VER >= 1400
|
Always provide it for the SDL2 DLL, but skip it when building static lib w/ static runtime. */
|
||||||
|
#if (_MSC_VER >= 1400) && (!defined(_MT) || defined(DLL_EXPORT))
|
||||||
extern void *memcpy(void* dst, const void* src, size_t len);
|
extern void *memcpy(void* dst, const void* src, size_t len);
|
||||||
#pragma intrinsic(memcpy)
|
#pragma intrinsic(memcpy)
|
||||||
|
|
||||||
|
@ -570,7 +571,7 @@ memset(void *dst, int c, size_t len)
|
||||||
{
|
{
|
||||||
return SDL_memset(dst, c, len);
|
return SDL_memset(dst, c, len);
|
||||||
}
|
}
|
||||||
#endif /* _MSC_VER >= 1400 */
|
#endif /* (_MSC_VER >= 1400) && (!defined(_MT) || defined(DLL_EXPORT)) */
|
||||||
|
|
||||||
#ifdef _M_IX86
|
#ifdef _M_IX86
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue