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

Unified Diff: ppapi/c/pp_macros.h

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
« ppapi/api/pp_macros.idl ('K') | « ppapi/c/DEPS ('k') | ppapi/cpp/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/c/pp_macros.h
diff --git a/ppapi/c/pp_macros.h b/ppapi/c/pp_macros.h
index e5cd7dd0d5da0ff6f73cd8858ef5271f12ba9ce9..d5e0d75503c7c241a1fd4bcc0d82b458f9442d08 100644
--- a/ppapi/c/pp_macros.h
+++ b/ppapi/c/pp_macros.h
@@ -3,7 +3,7 @@
* found in the LICENSE file.
*/
-/* From pp_macros.idl modified Sat Jul 16 16:50:26 2011. */
+/* From pp_macros.idl modified Wed Nov 30 23:01:17 2011. */
#ifndef PPAPI_C_PP_MACROS_H_
#define PPAPI_C_PP_MACROS_H_
@@ -21,6 +21,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__)
+#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
« ppapi/api/pp_macros.idl ('K') | « ppapi/c/DEPS ('k') | ppapi/cpp/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698