Patched to compile on Mac OS X (I think).
authorRyan C. Gordon <icculus@icculus.org>
Sun, 02 Oct 2011 00:49:52 -0400
changeset 59728b7f8d297943
parent 5971 ca2d4b8e9e40
child 5973 9392717808aa
Patched to compile on Mac OS X (I think).
src/thread/pthread/SDL_systhread.c
     1.1 --- a/src/thread/pthread/SDL_systhread.c	Sun Oct 02 00:43:56 2011 -0400
     1.2 +++ b/src/thread/pthread/SDL_systhread.c	Sun Oct 02 00:49:52 2011 -0400
     1.3 @@ -73,20 +73,14 @@
     1.4      return (0);
     1.5  }
     1.6  
     1.7 -/* make pthread_setname_np() a weak reference even without SDK support. */
     1.8 -#if __MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED < 1060)
     1.9 -int pthread_setname_np(const char*) __attribute__((weak_import,visibility("default")));
    1.10 -#elif __IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED < 30200)
    1.11 -int pthread_setname_np(const char*) __attribute__((weak_import));
    1.12 -#endif
    1.13 -
    1.14  void
    1.15  SDL_SYS_SetupThread(const char *name)
    1.16  {
    1.17      int i;
    1.18      sigset_t mask;
    1.19  
    1.20 -#if __MACOSX__ || __IPHONEOS__
    1.21 +#if ( (__MACOSX__ && (MAC_OS_X_VERSION_MAX_ALLOWED >= 1060)) || \
    1.22 +      (__IPHONEOS__ && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 30200)) )
    1.23      if (pthread_setname_np != NULL) { pthread_setname_np(name); }
    1.24  #elif HAVE_PTHREAD_SETNAME_NP
    1.25      pthread_setname_np(pthread_self(), name);