| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 "vm/globals.h" | 5 #include "vm/globals.h" |
| 6 #if defined(TARGET_OS_FUCHSIA) | 6 #if defined(TARGET_OS_FUCHSIA) |
| 7 | 7 |
| 8 #include "vm/os.h" | 8 #include "vm/os.h" |
| 9 | 9 |
| 10 #include <errno.h> | 10 #include <errno.h> |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 UNIMPLEMENTED(); | 160 UNIMPLEMENTED(); |
| 161 } | 161 } |
| 162 | 162 |
| 163 | 163 |
| 164 void OS::DebugBreak() { | 164 void OS::DebugBreak() { |
| 165 UNIMPLEMENTED(); | 165 UNIMPLEMENTED(); |
| 166 } | 166 } |
| 167 | 167 |
| 168 | 168 |
| 169 char* OS::StrNDup(const char* s, intptr_t n) { | 169 char* OS::StrNDup(const char* s, intptr_t n) { |
| 170 UNIMPLEMENTED(); | 170 return strndup(s, n); |
| 171 return NULL; | |
| 172 } | 171 } |
| 173 | 172 |
| 174 | 173 |
| 175 intptr_t OS::StrNLen(const char* s, intptr_t n) { | 174 intptr_t OS::StrNLen(const char* s, intptr_t n) { |
| 176 UNIMPLEMENTED(); | 175 return strnlen(s, n); |
| 177 return 0; | |
| 178 } | 176 } |
| 179 | 177 |
| 180 | 178 |
| 181 void OS::Print(const char* format, ...) { | 179 void OS::Print(const char* format, ...) { |
| 182 UNIMPLEMENTED(); | 180 va_list args; |
| 181 va_start(args, format); |
| 182 VFPrint(stdout, format, args); |
| 183 va_end(args); |
| 183 } | 184 } |
| 184 | 185 |
| 185 | 186 |
| 186 void OS::VFPrint(FILE* stream, const char* format, va_list args) { | 187 void OS::VFPrint(FILE* stream, const char* format, va_list args) { |
| 187 vfprintf(stream, format, args); | 188 vfprintf(stream, format, args); |
| 188 fflush(stream); | 189 fflush(stream); |
| 189 } | 190 } |
| 190 | 191 |
| 191 | 192 |
| 192 int OS::SNPrint(char* str, size_t size, const char* format, ...) { | 193 int OS::SNPrint(char* str, size_t size, const char* format, ...) { |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 295 } | 296 } |
| 296 | 297 |
| 297 | 298 |
| 298 void OS::Exit(int code) { | 299 void OS::Exit(int code) { |
| 299 UNIMPLEMENTED(); | 300 UNIMPLEMENTED(); |
| 300 } | 301 } |
| 301 | 302 |
| 302 } // namespace dart | 303 } // namespace dart |
| 303 | 304 |
| 304 #endif // defined(TARGET_OS_FUCHSIA) | 305 #endif // defined(TARGET_OS_FUCHSIA) |
| OLD | NEW |