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

Side by Side Diff: runtime/bin/extensions_openbsd.cc

Issue 1559053002: Refs #10260 OpenBSD support #25327 Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Replace // FIXME with // TODO(mulander) 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(TARGET_OS_LINUX) 6 #if defined(TARGET_OS_OPENBSD)
7 7
8 #include "bin/extensions.h" 8 #include "bin/extensions.h"
9 #include <dlfcn.h> // NOLINT 9 #include <dlfcn.h> // NOLINT
10 10
11 11
12 namespace dart { 12 namespace dart {
13 namespace bin { 13 namespace bin {
14 14
15 const char* kPrecompiledLibraryName = "libprecompiled.so"; 15 const char* kPrecompiledLibraryName = "libprecompiled.so";
16 const char* kPrecompiledSymbolName = "_kInstructionsSnapshot"; 16 const char* kPrecompiledSymbolName = "_kInstructionsSnapshot";
17 17
18 void* Extensions::LoadExtensionLibrary(const char* library_file) { 18 void* Extensions::LoadExtensionLibrary(const char* library_file) {
19 return dlopen(library_file, RTLD_LAZY); 19 return dlopen(library_file, RTLD_LAZY);
20 } 20 }
21 21
22 void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) { 22 void* Extensions::ResolveSymbol(void* lib_handle, const char* symbol) {
23 dlerror(); 23 dlerror();
24 return dlsym(lib_handle, symbol); 24 return dlsym(lib_handle, symbol);
25 } 25 }
26 26
27 Dart_Handle Extensions::GetError() { 27 Dart_Handle Extensions::GetError() {
28 const char* err_str = dlerror(); 28 const char* err_str = dlerror();
29 if (err_str != NULL) { 29 if (err_str != NULL) {
30 return Dart_NewApiError(err_str); 30 return Dart_NewApiError(err_str);
31 } 31 }
32 return Dart_Null(); 32 return Dart_Null();
33 } 33 }
34 34
35
Ivan Posva 2016/01/11 23:58:40 Please remove whitespace change.
mulander 2016/01/12 00:22:45 Acknowledged.
35 } // namespace bin 36 } // namespace bin
36 } // namespace dart 37 } // namespace dart
37 38
38 #endif // defined(TARGET_OS_LINUX) 39 #endif // defined(TARGET_OS_OPENBSD)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698