Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1607)

Unified Diff: ppapi/api/pp_macros.idl

Issue 8764004: Add DEPS include rules so we don't accidentally use base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add forgotten DEPS files, fix use of WIN macro Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ppapi/c/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | ppapi/c/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698