freebsd-ports/www/mod_pagespeed/files/patch-stack_trace_posix.cc
Steve Wills f5d41ab53d mod_pagespeed is an open-source Apache module that automatically optimizes web
pages and resources on them. It does this by rewriting the resources using
filters that implement web performance best practices. Webmasters and web
developers can use mod_pagespeed to improve the performance of their web pages
when serving content with the Apache HTTP Server.

WWW:	http://code.google.com/speed/page-speed/docs/module.html
2011-10-08 21:13:18 +00:00

26 lines
744 B
C++

--- third_party/chromium/src/base/debug/stack_trace_posix.cc.orig
+++ third_party/chromium/src/base/debug/stack_trace_posix.cc
@@ -126,7 +126,7 @@
trace_strings->push_back(base::StringPrintf("%p", trace[i]));
}
}
-#else
+#elif defined(OS_LINUX)
scoped_ptr_malloc<char*> trace_symbols(backtrace_symbols(trace, size));
if (trace_symbols.get()) {
for (int i = 0; i < size; ++i) {
@@ -155,10 +155,13 @@
count_ = 0;
return;
}
-#endif
+#elif defined(OS_LINUX)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
count_ = std::max(backtrace(trace_, arraysize(trace_)), 0);
+#else
+ count_ = 0;
+#endif
}
void StackTrace::PrintBacktrace() {