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

Side by Side Diff: runtime/vm/os.h

Issue 1989513002: strnlen is not always available. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 7 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
« no previous file with comments | « no previous file | runtime/vm/os_android.cc » ('j') | runtime/vm/os_win.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 VM_OS_H_ 5 #ifndef VM_OS_H_
6 #define VM_OS_H_ 6 #define VM_OS_H_
7 7
8 #include "vm/globals.h" 8 #include "vm/globals.h"
9 9
10 // Forward declarations. 10 // Forward declarations.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 static void Sleep(int64_t millis); 103 static void Sleep(int64_t millis);
104 104
105 // Sleep the currently executing thread for micros microseconds. 105 // Sleep the currently executing thread for micros microseconds.
106 static void SleepMicros(int64_t micros); 106 static void SleepMicros(int64_t micros);
107 107
108 // Debug break. 108 // Debug break.
109 static void DebugBreak(); 109 static void DebugBreak();
110 110
111 // Not all platform support strndup. 111 // Not all platform support strndup.
112 static char* StrNDup(const char* s, intptr_t n); 112 static char* StrNDup(const char* s, intptr_t n);
113 static intptr_t StrNLen(const char* s, intptr_t n);
113 114
114 // Print formatted output to stdout/stderr for debugging. 115 // Print formatted output to stdout/stderr for debugging.
115 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); 116 static void Print(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
116 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); 117 static void PrintErr(const char* format, ...) PRINTF_ATTRIBUTE(1, 2);
117 static void VFPrint(FILE* stream, const char* format, va_list args); 118 static void VFPrint(FILE* stream, const char* format, va_list args);
118 // Print formatted output info a buffer. 119 // Print formatted output info a buffer.
119 // 120 //
120 // Does not write more than size characters (including the trailing '\0'). 121 // Does not write more than size characters (including the trailing '\0').
121 // 122 //
122 // Returns the number of characters (excluding the trailing '\0') 123 // Returns the number of characters (excluding the trailing '\0')
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 static void Shutdown(); 163 static void Shutdown();
163 164
164 static void Abort(); 165 static void Abort();
165 166
166 static void Exit(int code); 167 static void Exit(int code);
167 }; 168 };
168 169
169 } // namespace dart 170 } // namespace dart
170 171
171 #endif // VM_OS_H_ 172 #endif // VM_OS_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/os_android.cc » ('j') | runtime/vm/os_win.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698