mirror of
				https://github.com/libsdl-org/SDL.git
				synced 2025-10-26 12:27:44 +00:00 
			
		
		
		
	Removed memset_pattern4() from SDL headers
This requires including string.h, which isn't always done, so this commit simplifies dependencies on macOS Fixes https://github.com/libsdl-org/SDL/issues/3657
This commit is contained in:
		| @@ -30,12 +30,6 @@ | |||||||
|  |  | ||||||
| #include "SDL_config.h" | #include "SDL_config.h" | ||||||
|  |  | ||||||
| #ifdef __APPLE__ |  | ||||||
| #ifndef _DARWIN_C_SOURCE |  | ||||||
| #define _DARWIN_C_SOURCE 1 /* for memset_pattern4() */ |  | ||||||
| #endif |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| #ifdef HAVE_SYS_TYPES_H | #ifdef HAVE_SYS_TYPES_H | ||||||
| #include <sys/types.h> | #include <sys/types.h> | ||||||
| #endif | #endif | ||||||
| @@ -530,9 +524,7 @@ extern DECLSPEC void *SDLCALL SDL_memset(SDL_OUT_BYTECAP(len) void *dst, int c, | |||||||
| /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ | /* Note that memset() is a byte assignment and this is a 32-bit assignment, so they're not directly equivalent. */ | ||||||
| SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords) | SDL_FORCE_INLINE void SDL_memset4(void *dst, Uint32 val, size_t dwords) | ||||||
| { | { | ||||||
| #ifdef __APPLE__ | #if defined(__GNUC__) && defined(__i386__) | ||||||
|     memset_pattern4(dst, &val, dwords * 4); |  | ||||||
| #elif defined(__GNUC__) && defined(__i386__) |  | ||||||
|     int u0, u1, u2; |     int u0, u1, u2; | ||||||
|     __asm__ __volatile__ ( |     __asm__ __volatile__ ( | ||||||
|         "cld \n\t" |         "cld \n\t" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Sam Lantinga
					Sam Lantinga