include/SDL_stdinc.h
changeset 9306 817656bd36ec
parent 9262 b3df9db209b0
child 9376 0495816fec54
     1.1 --- a/include/SDL_stdinc.h	Mon Jan 05 01:07:36 2015 -0500
     1.2 +++ b/include/SDL_stdinc.h	Mon Jan 05 01:41:42 2015 -0500
     1.3 @@ -379,11 +379,6 @@
     1.4  
     1.5  extern DECLSPEC void *SDLCALL SDL_memcpy(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
     1.6  
     1.7 -SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
     1.8 -{
     1.9 -    return SDL_memcpy(dst, src, dwords * 4);
    1.10 -}
    1.11 -
    1.12  extern DECLSPEC void *SDLCALL SDL_memmove(SDL_OUT_BYTECAP(len) void *dst, SDL_IN_BYTECAP(len) const void *src, size_t len);
    1.13  extern DECLSPEC int SDLCALL SDL_memcmp(const void *s1, const void *s2, size_t len);
    1.14  
    1.15 @@ -480,6 +475,39 @@
    1.16  #define SDL_iconv_utf8_ucs2(S)      (Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
    1.17  #define SDL_iconv_utf8_ucs4(S)      (Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
    1.18  
    1.19 +/* force builds using Clang's static analysis tools to use literal C runtime
    1.20 +   here, since there are possibly tests that are ineffective otherwise. */
    1.21 +#if defined(__clang_analyzer__) && !defined(SDL_DISABLE_ANALYZE_MACROS)
    1.22 +#define SDL_malloc malloc
    1.23 +#define SDL_calloc calloc
    1.24 +#define SDL_realloc realloc
    1.25 +#define SDL_free free
    1.26 +#define SDL_memset memset
    1.27 +#define SDL_memcpy memcpy
    1.28 +#define SDL_memmove memmove
    1.29 +#define SDL_memcmp memcmp
    1.30 +#define SDL_strlen strlen
    1.31 +#define SDL_strlcpy strlcpy
    1.32 +#define SDL_strlcat strlcat
    1.33 +#define SDL_strdup strdup
    1.34 +#define SDL_strchr strchr
    1.35 +#define SDL_strrchr strrchr
    1.36 +#define SDL_strstr strstr
    1.37 +#define SDL_strcmp strcmp
    1.38 +#define SDL_strncmp strncmp
    1.39 +#define SDL_strcasecmp strcasecmp
    1.40 +#define SDL_strncasecmp strncasecmp
    1.41 +#define SDL_sscanf sscanf
    1.42 +#define SDL_vsscanf vsscanf
    1.43 +#define SDL_snprintf snprintf
    1.44 +#define SDL_vsnprintf vsnprintf
    1.45 +#endif
    1.46 +
    1.47 +SDL_FORCE_INLINE void *SDL_memcpy4(SDL_OUT_BYTECAP(dwords*4) void *dst, SDL_IN_BYTECAP(dwords*4) const void *src, size_t dwords)
    1.48 +{
    1.49 +    return SDL_memcpy(dst, src, dwords * 4);
    1.50 +}
    1.51 +
    1.52  /* Ends C function definitions when using C++ */
    1.53  #ifdef __cplusplus
    1.54  }