include/SDL_platform.h
changeset 8833 ae720d61d14d
parent 8630 e217ed463f25
child 8979 1e283b7a1580
     1.1 --- a/include/SDL_platform.h	Thu Jun 05 15:37:33 2014 -0700
     1.2 +++ b/include/SDL_platform.h	Fri Jun 06 15:45:59 2014 -0300
     1.3 @@ -56,7 +56,7 @@
     1.4  #undef __IRIX__
     1.5  #define __IRIX__    1
     1.6  #endif
     1.7 -#if defined(linux) || defined(__linux) || defined(__linux__)
     1.8 +#if (defined(linux) || defined(__linux) || defined(__linux__))
     1.9  #undef __LINUX__
    1.10  #define __LINUX__   1
    1.11  #endif
    1.12 @@ -142,6 +142,23 @@
    1.13  #define __PSP__ 1
    1.14  #endif
    1.15  
    1.16 +/* The NACL compiler defines __native_client__ and __pnacl__
    1.17 + * Ref: http://www.chromium.org/nativeclient/pnacl/stability-of-the-pnacl-bitcode-abi
    1.18 + */
    1.19 +#if defined(__native_client__)
    1.20 +#undef __LINUX__
    1.21 +#undef __NACL__
    1.22 +#define __NACL__ 1
    1.23 +#endif
    1.24 +#if defined(__pnacl__)
    1.25 +#undef __LINUX__
    1.26 +#undef __PNACL__
    1.27 +#define __PNACL__ 1
    1.28 +/* PNACL with newlib supports static linking only */
    1.29 +#define __SDL_NOGETPROCADDR__
    1.30 +#endif
    1.31 +
    1.32 +
    1.33  #include "begin_code.h"
    1.34  /* Set up for C function definitions, even when using C++ */
    1.35  #ifdef __cplusplus