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

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: Created 4 years, 12 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_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..3db59c019fe81eb76dc8862e7a48c1ed2ed9e929 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() {
+ // FIXME: This won't work on OpenBSD the way it is now
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)

Powered by Google App Engine
This is Rietveld 408576698