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

Unified Diff: runtime/platform/globals.h

Issue 10826233: Add _android files for building DartVM on Android (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Incorporate reviewer's feedback (asiva, Soren Gjesse) Created 8 years, 4 months 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 | « runtime/bin/utils_android.cc ('k') | runtime/platform/platform_sources.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/platform/globals.h
diff --git a/runtime/platform/globals.h b/runtime/platform/globals.h
index 8ca5065ac611dbb17eca14bf79e35bcd4d00e33d..a3de44667dad95d1a3dd5244f19fd96054677007 100644
--- a/runtime/platform/globals.h
+++ b/runtime/platform/globals.h
@@ -52,7 +52,9 @@
// for more information on predefined macros:
// - http://msdn.microsoft.com/en-us/library/b0084kay.aspx
// - with gcc, run: "echo | gcc -E -dM -"
-#if defined(__linux__) || defined(__FreeBSD__)
+#if defined(__ANDROID__)
+#define TARGET_OS_ANDROID
+#elif defined(__linux__) || defined(__FreeBSD__)
#define TARGET_OS_LINUX 1
#elif defined(__APPLE__)
#define TARGET_OS_MACOS 1
@@ -325,12 +327,13 @@ inline D bit_copy(const S& source) {
// to be used in error quite often. To avoid problems we disallow the direct
// use of memcpy here.
//
-// On Windows the basic libraries use memcpy and therefore compilation will
-// fail if memcpy is overwritten even if user code does not use memcpy.
+// On Android and Windows the basic libraries use memcpy and therefore
+// compilation will fail if memcpy is overwritten even if user code does not
+// use memcpy.
#if defined(memcpy)
#undef memcpy
#endif
-#if !defined(TARGET_OS_WINDOWS)
+#if !( defined(TARGET_OS_ANDROID) || defined(TARGET_OS_WINDOWS) )
#define memcpy "Please use memmove instead of memcpy."
#endif
« no previous file with comments | « runtime/bin/utils_android.cc ('k') | runtime/platform/platform_sources.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698