Chromium Code Reviews| 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; |
| } |