Updated MacOS X support
authorSam Lantinga <slouken@libsdl.org>
Tue, 07 Mar 2006 04:58:30 +0000
changeset 1479993ef9ff4688
parent 1478 fc308f08b5f7
child 1480 0a2bd6507477
Updated MacOS X support
include/SDL_config_macosx.h
include/SDL_platform.h
src/loadso/macosx/SDL_sysloadso.c
src/video/quartz/SDL_QuartzVideo.h
     1.1 --- a/include/SDL_config_macosx.h	Mon Mar 06 19:20:38 2006 +0000
     1.2 +++ b/include/SDL_config_macosx.h	Tue Mar 07 04:58:30 2006 +0000
     1.3 @@ -28,11 +28,15 @@
     1.4  #define SDL_HAS_64BIT_TYPE	1
     1.5  
     1.6  /* Useful headers */
     1.7 +#define HAVE_ALLOCA_H		1
     1.8  #define HAVE_SYS_TYPES_H	1
     1.9  #define HAVE_STDIO_H	1
    1.10  #define STDC_HEADERS	1
    1.11  #define HAVE_STRING_H	1
    1.12  #define HAVE_INTTYPES_H	1
    1.13 +#define HAVE_STDINT_H	1
    1.14 +#define HAVE_CTYPE_H	1
    1.15 +#define HAVE_MATH_H	1
    1.16  #define HAVE_SIGNAL_H	1
    1.17  
    1.18  /* C library functions */
    1.19 @@ -43,10 +47,37 @@
    1.20  #define HAVE_ALLOCA	1
    1.21  #define HAVE_GETENV	1
    1.22  #define HAVE_PUTENV	1
    1.23 +#define HAVE_UNSETENV	1
    1.24 +#define HAVE_QSORT	1
    1.25 +#define HAVE_ABS	1
    1.26 +#define HAVE_BCOPY	1
    1.27  #define HAVE_MEMSET	1
    1.28  #define HAVE_MEMCPY	1
    1.29  #define HAVE_MEMMOVE	1
    1.30  #define HAVE_MEMCMP	1
    1.31 +#define HAVE_STRLEN	1
    1.32 +#define HAVE_STRLCPY	1
    1.33 +#define HAVE_STRLCAT	1
    1.34 +#define HAVE_STRDUP	1
    1.35 +#define HAVE_STRCHR	1
    1.36 +#define HAVE_STRRCHR	1
    1.37 +#define HAVE_STRSTR	1
    1.38 +#define HAVE_STRTOL	1
    1.39 +#define HAVE_STRTOUL	1
    1.40 +#define HAVE_STRTOLL	1
    1.41 +#define HAVE_STRTOULL	1
    1.42 +#define HAVE_STRTOD	1
    1.43 +#define HAVE_ATOI	1
    1.44 +#define HAVE_ATOF	1
    1.45 +#define HAVE_STRCMP	1
    1.46 +#define HAVE_STRNCMP	1
    1.47 +#define HAVE_STRCASECMP	1
    1.48 +#define HAVE_SSCANF	1
    1.49 +#define HAVE_SNPRINTF	1
    1.50 +#define HAVE_VSNPRINTF	1
    1.51 +#define HAVE_SIGACTION	1
    1.52 +#define HAVE_SETJMP	1
    1.53 +#define HAVE_NANOSLEEP	1
    1.54  
    1.55  /* Enable various audio drivers */
    1.56  #define SDL_AUDIO_DRIVER_COREAUDIO	1
     2.1 --- a/include/SDL_platform.h	Mon Mar 06 19:20:38 2006 +0000
     2.2 +++ b/include/SDL_platform.h	Tue Mar 07 04:58:30 2006 +0000
     2.3 @@ -64,11 +64,16 @@
     2.4  #if defined(macintosh)
     2.5  #undef __MACOS__
     2.6  #define __MACOS__	1
     2.7 +#define TARGET_API_MAC_OS8	1
     2.8 +#define TARGET_API_MAC_CARBON	0
     2.9 +#define TARGET_API_MAC_OSX	0
    2.10  #endif
    2.11  #if defined(__GNUC__) && (defined(__APPLE_CC__) || defined(__APPLE_CPP__))
    2.12  #undef __MACOSX__
    2.13  #define __MACOSX__	1
    2.14 +#define TARGET_API_MAC_OS8	0
    2.15  #define TARGET_API_MAC_CARBON	1
    2.16 +#define TARGET_API_MAC_OSX	1
    2.17  #endif
    2.18  #if defined(__NetBSD__)
    2.19  #undef __NETBSD__
     3.1 --- a/src/loadso/macosx/SDL_sysloadso.c	Mon Mar 06 19:20:38 2006 +0000
     3.2 +++ b/src/loadso/macosx/SDL_sysloadso.c	Tue Mar 07 04:58:30 2006 +0000
     3.3 @@ -621,7 +621,7 @@
     3.4  }
     3.5  
     3.6  /* Up to the caller to SDL_free() returned string */
     3.7 -static inline char *dyld_error_str()
     3.8 +static inline const char *dyld_error_str()
     3.9  {
    3.10  	NSLinkEditErrors dylder;
    3.11  	int dylderno;
     4.1 --- a/src/video/quartz/SDL_QuartzVideo.h	Mon Mar 06 19:20:38 2006 +0000
     4.2 +++ b/src/video/quartz/SDL_QuartzVideo.h	Tue Mar 07 04:58:30 2006 +0000
     4.3 @@ -49,9 +49,6 @@
     4.4  */
     4.5  
     4.6  #include <Cocoa/Cocoa.h>
     4.7 -#include <OpenGL/OpenGL.h>
     4.8 -#include <OpenGL/gl.h>
     4.9 -#include <OpenGL/glext.h>
    4.10  #include <Carbon/Carbon.h>
    4.11  #include <QuickTime/QuickTime.h>
    4.12  #include <IOKit/IOKitLib.h> /* For powersave handling */
    4.13 @@ -62,6 +59,7 @@
    4.14  #include "SDL_error.h"
    4.15  #include "SDL_timer.h"
    4.16  #include "SDL_loadso.h"
    4.17 +#include "SDL_opengl.h"
    4.18  #include "SDL_syswm.h"
    4.19  #include "../SDL_sysvideo.h"
    4.20  #include "../SDL_pixels_c.h"