Chromium Code Reviews| Index: ppapi/api/pp_macros.idl |
| diff --git a/ppapi/api/pp_macros.idl b/ppapi/api/pp_macros.idl |
| index f189d4a9361939972cd8bcc43b3cb59ca0480ab2..0801fc639893735bf30c74e6f72fdb06298f0a9c 100644 |
| --- a/ppapi/api/pp_macros.idl |
| +++ b/ppapi/api/pp_macros.idl |
| @@ -14,6 +14,38 @@ |
| * @{ |
| */ |
| +/* These precompiler names were copied from chromium's build_config.h. */ |
| + |
| +/* |
| + * A set of macros to use for platform detection. These were largely copied |
| + * from chromium's build_config.h. |
| + */ |
| +#if defined(__APPLE__) |
|
brettw
2011/12/01 18:29:22
It doesn't seem like all this code should be at th
dmichael (off chromium)
2011/12/01 18:40:53
Good point. Done.
|
| +#define PPAPI_OS_MACOSX 1 |
| +#elif defined(ANDROID) |
| +#define PPAPI_OS_ANDROID 1 |
| +#elif defined(__native_client__) |
| +#define PPAPI_OS_NACL 1 |
| +#elif defined(__linux__) |
| +#define PPAPI_OS_LINUX 1 |
| +#elif defined(_WIN32) |
| +#define PPAPI_OS_WIN 1 |
| +#elif defined(__FreeBSD__) |
| +#define PPAPI_OS_FREEBSD 1 |
| +#elif defined(__OpenBSD__) |
| +#define PPAPI_OS_OPENBSD 1 |
| +#elif defined(__sun) |
| +#define PPAPI_OS_SOLARIS 1 |
| +#else |
| +#error Please add support for your platform in ppapi/c/pp_macros.h. |
| +#endif |
| + |
| +/* These are used to determine POSIX-like implementations vs Windows. */ |
| +#if defined(__linux__) || defined(__APPLE__) || defined(__FreeBSD__) || \ |
| + defined(__OpenBSD__) || defined(__sun) || defined(__native_client__) |
| +#define PPAPI_POSIX 1 |
| +#endif |
| + |
| /* Use PP_INLINE to tell the compiler to inline functions. The main purpose of |
| * inline functions in ppapi is to allow us to define convenience functions in |
| * the ppapi header files, without requiring clients or implementers to link a |