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

Unified Diff: runtime/bin/platform_openbsd.cc

Issue 1559053002: Refs #10260 OpenBSD support #25327 Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Address code review issues Created 4 years, 11 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/log_openbsd.cc ('k') | runtime/bin/process_openbsd.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/platform_openbsd.cc
diff --git a/runtime/bin/platform_linux.cc b/runtime/bin/platform_openbsd.cc
similarity index 91%
copy from runtime/bin/platform_linux.cc
copy to runtime/bin/platform_openbsd.cc
index 24cbfd3ebf58bd840cfffdfb17784544ffb332c7..3c01ae0f0cd3e735c2ae666e8b8790bdc566c193 100644
--- a/runtime/bin/platform_linux.cc
+++ b/runtime/bin/platform_openbsd.cc
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
#include "platform/globals.h"
-#if defined(TARGET_OS_LINUX)
+#if defined(TARGET_OS_OPENBSD)
#include "bin/file.h"
#include "bin/platform.h"
@@ -14,6 +14,7 @@
#include "bin/fdutils.h"
+extern char **environ;
namespace dart {
namespace bin {
@@ -39,7 +40,7 @@ int Platform::NumberOfProcessors() {
const char* Platform::OperatingSystem() {
- return "linux";
+ return "openbsd";
}
@@ -74,6 +75,7 @@ void Platform::FreeEnvironment(char** env, intptr_t count) {
char* Platform::ResolveExecutablePath() {
+ // TODO(mulander): There is no procfs on OpenBSD - find a workaround
return File::LinkTarget("/proc/self/exe");
}
@@ -84,4 +86,4 @@ void Platform::Exit(int exit_code) {
} // namespace bin
} // namespace dart
-#endif // defined(TARGET_OS_LINUX)
+#endif // defined(TARGET_OS_OPENBSD)
« no previous file with comments | « runtime/bin/log_openbsd.cc ('k') | runtime/bin/process_openbsd.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698