Index: base/debug/stack_trace.h |
diff --git a/base/debug/stack_trace.h b/base/debug/stack_trace.h |
index 60d5821a7094293ad576bee730ed0569759c5272..4da065bb55220b5a23f7e95cf05de31c2b9431db 100644 |
--- a/base/debug/stack_trace.h |
+++ b/base/debug/stack_trace.h |
@@ -73,6 +73,20 @@ class BASE_EXPORT StackTrace { |
size_t count_; |
}; |
+namespace internal { |
+ |
+#if defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_IOS) |
+// POSIX doesn't define any async-signal safe function for converting |
+// an integer to ASCII. We'll have to define our own version. |
+// itoa_r() converts a (signed) integer to ASCII. It returns "buf", if the |
+// conversion was successful or NULL otherwise. It never writes more than "sz" |
+// bytes. Output will be truncated as needed, and a NUL character is always |
+// appended. |
+BASE_EXPORT char *itoa_r(intptr_t i, char *buf, size_t sz, int base); |
+#endif // defined(OS_POSIX) && !defined(OS_ANDROID) && !defined(OS_IOS) |
+ |
+} // namespace internal |
+ |
} // namespace debug |
} // namespace base |