OLD | NEW |
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 #ifndef RUNTIME_BIN_PLATFORM_H_ | 5 #ifndef RUNTIME_BIN_PLATFORM_H_ |
6 #define RUNTIME_BIN_PLATFORM_H_ | 6 #define RUNTIME_BIN_PLATFORM_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 #include "platform/globals.h" | 9 #include "platform/globals.h" |
10 | 10 |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 static const char* LibraryPrefix(); | 45 static const char* LibraryPrefix(); |
46 | 46 |
47 // Returns a string representing the operating system's shared library | 47 // Returns a string representing the operating system's shared library |
48 // extension (e.g. 'so', 'dll', ...). The returned string should not be | 48 // extension (e.g. 'so', 'dll', ...). The returned string should not be |
49 // deallocated by the caller. | 49 // deallocated by the caller. |
50 static const char* LibraryExtension(); | 50 static const char* LibraryExtension(); |
51 | 51 |
52 // Extracts the local hostname. | 52 // Extracts the local hostname. |
53 static bool LocalHostname(char* buffer, intptr_t buffer_length); | 53 static bool LocalHostname(char* buffer, intptr_t buffer_length); |
54 | 54 |
55 static const char* LocaleName(); | |
56 | |
57 // Extracts the environment variables for the current process. The array of | 55 // Extracts the environment variables for the current process. The array of |
58 // strings is Dart_ScopeAllocated. The number of elements in the array is | 56 // strings is Dart_ScopeAllocated. The number of elements in the array is |
59 // returned in the count argument. | 57 // returned in the count argument. |
60 static char** Environment(intptr_t* count); | 58 static char** Environment(intptr_t* count); |
61 | 59 |
62 static const char* ResolveExecutablePath(); | 60 static const char* ResolveExecutablePath(); |
63 | 61 |
64 // Stores the executable name. | 62 // Stores the executable name. |
65 static void SetExecutableName(const char* executable_name) { | 63 static void SetExecutableName(const char* executable_name) { |
66 executable_name_ = executable_name; | 64 executable_name_ = executable_name; |
(...skipping 30 matching lines...) Expand all Loading... |
97 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] | 95 static char** argv_; // VM flags are argv_[1 ... script_index_ - 1] |
98 | 96 |
99 DISALLOW_ALLOCATION(); | 97 DISALLOW_ALLOCATION(); |
100 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); | 98 DISALLOW_IMPLICIT_CONSTRUCTORS(Platform); |
101 }; | 99 }; |
102 | 100 |
103 } // namespace bin | 101 } // namespace bin |
104 } // namespace dart | 102 } // namespace dart |
105 | 103 |
106 #endif // RUNTIME_BIN_PLATFORM_H_ | 104 #endif // RUNTIME_BIN_PLATFORM_H_ |
OLD | NEW |