Fix glibc presence checks that are incorrectly triggered in some cases.

This allows compilation of V8 using uClibc.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9702067
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11242 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
danno@chromium.org 2012-04-05 15:22:51 +00:00
parent a897e6e229
commit 581e9368d3

View File

@ -46,9 +46,9 @@
#include <sys/stat.h> // open
#include <fcntl.h> // open
#include <unistd.h> // sysconf
#ifdef __GLIBC__
#if defined(__GLIBC__) && !defined(__UCLIBC__)
#include <execinfo.h> // backtrace, backtrace_symbols
#endif // def __GLIBC__
#endif // defined(__GLIBC__) && !defined(__UCLIBC__)
#include <strings.h> // index
#include <errno.h>
#include <stdarg.h>
@ -535,7 +535,7 @@ void OS::SignalCodeMovingGC() {
int OS::StackWalk(Vector<OS::StackFrame> frames) {
// backtrace is a glibc extension.
#ifdef __GLIBC__
#if defined(__GLIBC__) && !defined(__UCLIBC__)
int frames_size = frames.length();
ScopedVector<void*> addresses(frames_size);
@ -560,9 +560,9 @@ int OS::StackWalk(Vector<OS::StackFrame> frames) {
free(symbols);
return frames_count;
#else // ndef __GLIBC__
#else // defined(__GLIBC__) && !defined(__UCLIBC__)
return 0;
#endif // ndef __GLIBC__
#endif // defined(__GLIBC__) && !defined(__UCLIBC__)
}