include/SDL_stdinc.h
changeset 2111 874162355be5
parent 2077 8bfba7ec379a
child 2135 0313af081a84
     1.1 --- a/include/SDL_stdinc.h	Thu May 31 14:46:01 2007 +0000
     1.2 +++ b/include/SDL_stdinc.h	Sun Jun 03 08:39:23 2007 +0000
     1.3 @@ -279,7 +279,10 @@
     1.4  #define SDL_zero(x)	SDL_memset(&(x), 0, sizeof((x)))
     1.5  #define SDL_zerop(x)	SDL_memset((x), 0, sizeof(*(x)))
     1.6  
     1.7 -#if defined(__GNUC__) && defined(i386)
     1.8 +/* We can count on memset existing on Mac OS X and being well-tuned. */
     1.9 +#if defined(__MACH__) && defined(__APPLE__)
    1.10 +#define SDL_memset4(dst, val, len) memset(dst, val, (len)*4)
    1.11 +#elif defined(__GNUC__) && defined(i386)
    1.12  #define SDL_memset4(dst, val, len)				\
    1.13  do {								\
    1.14  	int u0, u1, u2;						\
    1.15 @@ -308,7 +311,10 @@
    1.16  } while(0)
    1.17  #endif
    1.18  
    1.19 -#if defined(__GNUC__) && defined(i386)
    1.20 +/* We can count on memcpy existing on Mac OS X and being well-tuned. */
    1.21 +#if defined(__MACH__) && defined(__APPLE__)
    1.22 +#define SDL_memcpy(dst, src, len) memcpy(dst, src, len)
    1.23 +#elif defined(__GNUC__) && defined(i386)
    1.24  #define SDL_memcpy(dst, src, len)					  \
    1.25  do {									  \
    1.26  	int u0, u1, u2;						  	  \
    1.27 @@ -338,7 +344,10 @@
    1.28  #endif
    1.29  #endif
    1.30  
    1.31 -#if defined(__GNUC__) && defined(i386)
    1.32 +/* We can count on memcpy existing on Mac OS X and being well-tuned. */
    1.33 +#if defined(__MACH__) && defined(__APPLE__)
    1.34 +#define SDL_memcpy4(dst, src, len) memcpy(dst, src, (len)*4)
    1.35 +#elif defined(__GNUC__) && defined(i386)
    1.36  #define SDL_memcpy4(dst, src, len)				\
    1.37  do {								\
    1.38  	int ecx, edi, esi;					\