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

Unified Diff: runtime/bin/platform_android.cc

Issue 10823209: Add support for building the Dart VM for Android OS. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
Index: runtime/bin/platform_android.cc
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_android.cc
similarity index 90%
copy from runtime/bin/platform_macos.cc
copy to runtime/bin/platform_android.cc
index 81455ba3d3988ae7348433d517836d4b83fb96ed..f5f961b35b0f0fd954dfdb1c921736147d71af81 100644
--- a/runtime/bin/platform_macos.cc
+++ b/runtime/bin/platform_android.cc
@@ -4,7 +4,6 @@
#include "bin/platform.h"
-#include <crt_externs.h>
#include <signal.h>
#include <string.h>
#include <unistd.h>
@@ -31,7 +30,7 @@ int Platform::NumberOfProcessors() {
const char* Platform::OperatingSystem() {
- return "macos";
+ return "linux";
cshapiro 2012/08/07 20:56:54 Why isn't this "android"?
jackpal 2012/08/07 21:43:26 Done.
}
@@ -43,9 +42,6 @@ bool Platform::LocalHostname(char *buffer, intptr_t buffer_length) {
char** Platform::Environment(intptr_t* count) {
// Using environ directly is only safe as long as we do not
// provide access to modifying environment variables.
- // On MacOS you have to do a bit of magic to get to the
- // environment strings.
- char** environ = *(_NSGetEnviron());
intptr_t i = 0;
char** tmp = environ;
while (*(tmp++) != NULL) i++;
@@ -62,6 +58,7 @@ char* Platform::StrError(int error_code) {
static const int kBufferSize = 1024;
char* error = static_cast<char*>(malloc(kBufferSize));
error[0] = '\0';
+ // Android has a XSI-compliant version of strerror_r.
cshapiro 2012/08/07 20:56:54 This comment does not provide much useful informat
jackpal 2012/08/07 21:43:26 Removed...
strerror_r(error_code, error, kBufferSize);
return error;
}

Powered by Google App Engine
This is Rietveld 408576698