include/SDL_stdinc.h
changeset 8337 4a67a3cca43d
parent 8316 88f011703f39
parent 6627 23b7cef164ae
child 8439 14d94a8a9fb6
     1.1 --- a/include/SDL_stdinc.h	Sun Nov 04 09:02:58 2012 -0500
     1.2 +++ b/include/SDL_stdinc.h	Sun Nov 04 09:46:59 2012 -0500
     1.3 @@ -347,7 +347,7 @@
     1.4  /* We can count on memcpy existing on Mac OS X and being well-tuned. */
     1.5  #if defined(__MACOSX__)
     1.6  #define SDL_memcpy      memcpy
     1.7 -#elif defined(__GNUC__) && defined(i386)
     1.8 +#elif defined(__GNUC__) && defined(i386) && !defined(__WIN32__)
     1.9  #define SDL_memcpy(dst, src, len)					  \
    1.10  do {									  \
    1.11  	int u0, u1, u2;						  	  \
    1.12 @@ -640,8 +640,10 @@
    1.13  #endif
    1.14  
    1.15  #ifndef HAVE_M_PI
    1.16 +#ifndef M_PI
    1.17  #define M_PI    3.14159265358979323846264338327950288   /* pi */
    1.18  #endif
    1.19 +#endif
    1.20  
    1.21  #ifdef HAVE_ATAN
    1.22  #define SDL_atan        atan
    1.23 @@ -755,8 +757,8 @@
    1.24                                                 const char *inbuf,
    1.25                                                 size_t inbytesleft);
    1.26  #define SDL_iconv_utf8_locale(S)	SDL_iconv_string("", "UTF-8", S, SDL_strlen(S)+1)
    1.27 -#define SDL_iconv_utf8_ucs2(S)		(Uint16 *)SDL_iconv_string("UCS-2", "UTF-8", S, SDL_strlen(S)+1)
    1.28 -#define SDL_iconv_utf8_ucs4(S)		(Uint32 *)SDL_iconv_string("UCS-4", "UTF-8", S, SDL_strlen(S)+1)
    1.29 +#define SDL_iconv_utf8_ucs2(S)		(Uint16 *)SDL_iconv_string("UCS-2-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
    1.30 +#define SDL_iconv_utf8_ucs4(S)		(Uint32 *)SDL_iconv_string("UCS-4-INTERNAL", "UTF-8", S, SDL_strlen(S)+1)
    1.31  
    1.32  /* Ends C function definitions when using C++ */
    1.33  #ifdef __cplusplus