Skip to content

Commit

Permalink
Updated MacOS X support
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 7, 2006
1 parent b6b1f75 commit d907a38
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 4 deletions.
31 changes: 31 additions & 0 deletions include/SDL_config_macosx.h
Expand Up @@ -28,11 +28,15 @@
#define SDL_HAS_64BIT_TYPE 1

/* Useful headers */
#define HAVE_ALLOCA_H 1
#define HAVE_SYS_TYPES_H 1
#define HAVE_STDIO_H 1
#define STDC_HEADERS 1
#define HAVE_STRING_H 1
#define HAVE_INTTYPES_H 1
#define HAVE_STDINT_H 1
#define HAVE_CTYPE_H 1
#define HAVE_MATH_H 1
#define HAVE_SIGNAL_H 1

/* C library functions */
Expand All @@ -43,10 +47,37 @@
#define HAVE_ALLOCA 1
#define HAVE_GETENV 1
#define HAVE_PUTENV 1
#define HAVE_UNSETENV 1
#define HAVE_QSORT 1
#define HAVE_ABS 1
#define HAVE_BCOPY 1
#define HAVE_MEMSET 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMCMP 1
#define HAVE_STRLEN 1
#define HAVE_STRLCPY 1
#define HAVE_STRLCAT 1
#define HAVE_STRDUP 1
#define HAVE_STRCHR 1
#define HAVE_STRRCHR 1
#define HAVE_STRSTR 1
#define HAVE_STRTOL 1
#define HAVE_STRTOUL 1
#define HAVE_STRTOLL 1
#define HAVE_STRTOULL 1
#define HAVE_STRTOD 1
#define HAVE_ATOI 1
#define HAVE_ATOF 1
#define HAVE_STRCMP 1
#define HAVE_STRNCMP 1
#define HAVE_STRCASECMP 1
#define HAVE_SSCANF 1
#define HAVE_SNPRINTF 1
#define HAVE_VSNPRINTF 1
#define HAVE_SIGACTION 1
#define HAVE_SETJMP 1
#define HAVE_NANOSLEEP 1

/* Enable various audio drivers */
#define SDL_AUDIO_DRIVER_COREAUDIO 1
Expand Down
5 changes: 5 additions & 0 deletions include/SDL_platform.h
Expand Up @@ -64,11 +64,16 @@
#if defined(macintosh)
#undef __MACOS__
#define __MACOS__ 1
#define TARGET_API_MAC_OS8 1
#define TARGET_API_MAC_CARBON 0
#define TARGET_API_MAC_OSX 0
#endif
#if defined(__GNUC__) && (defined(__APPLE_CC__) || defined(__APPLE_CPP__))
#undef __MACOSX__
#define __MACOSX__ 1
#define TARGET_API_MAC_OS8 0
#define TARGET_API_MAC_CARBON 1
#define TARGET_API_MAC_OSX 1
#endif
#if defined(__NetBSD__)
#undef __NETBSD__
Expand Down
2 changes: 1 addition & 1 deletion src/loadso/macosx/SDL_sysloadso.c
Expand Up @@ -621,7 +621,7 @@ static NSSymbol *search_linked_libs(const struct mach_header * mh, const char *s
}

/* Up to the caller to SDL_free() returned string */
static inline char *dyld_error_str()
static inline const char *dyld_error_str()
{
NSLinkEditErrors dylder;
int dylderno;
Expand Down
4 changes: 1 addition & 3 deletions src/video/quartz/SDL_QuartzVideo.h
Expand Up @@ -49,9 +49,6 @@
*/

#include <Cocoa/Cocoa.h>
#include <OpenGL/OpenGL.h>
#include <OpenGL/gl.h>
#include <OpenGL/glext.h>
#include <Carbon/Carbon.h>
#include <QuickTime/QuickTime.h>
#include <IOKit/IOKitLib.h> /* For powersave handling */
Expand All @@ -62,6 +59,7 @@
#include "SDL_error.h"
#include "SDL_timer.h"
#include "SDL_loadso.h"
#include "SDL_opengl.h"
#include "SDL_syswm.h"
#include "../SDL_sysvideo.h"
#include "../SDL_pixels_c.h"
Expand Down

0 comments on commit d907a38

Please sign in to comment.