Max Horn to SDL
authorSam Lantinga <slouken@libsdl.org>
Tue, 10 Nov 2009 03:22:08 +0000
changeset 47507da7472a2f0
parent 474 a2c238c0c4b2
child 476 cae99938821c
Max Horn to SDL

Unfortunately, this release does not compile on Mac OS X 10.5 anymore, due to using AudioComponentDescription, which is 10.6 only; yet the #ifdef's introduced recently (in revision 5190) assume it is available on 10.5, too.

To make it work right, one would have to check whether compiling for 10.6 *and* whether one is compiling using the 10.6 SDK. Note that
#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5
would not fix this, either, since MAC_OS_X_VERSION_MIN_REQUIRED can be e.g. 1058 (the actual value on my system); you'd want something like
#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060
instead (since MAC_OS_X_VERSION_10_6 is not defined on older systems).

With the attached patch, it compiles again on my 10.5/intel/32bit system.
native_midi/native_midi_macosx.c
     1.1 --- a/native_midi/native_midi_macosx.c	Sun Nov 08 18:40:07 2009 +0000
     1.2 +++ b/native_midi/native_midi_macosx.c	Tue Nov 10 03:22:08 2009 +0000
     1.3 @@ -107,7 +107,7 @@
     1.4          if (AUGraphGetIndNode(graph, i, &node) != noErr)
     1.5              continue;  /* better luck next time. */
     1.6  
     1.7 -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 /* this is deprecated, but works back to 10.0 */
     1.8 +#if MAC_OS_X_VERSION_MIN_REQUIRED < 1060 /* this is deprecated, but works back to 10.0 */
     1.9          {
    1.10              struct ComponentDescription desc;
    1.11              UInt32 classdatasize = 0;