platform: fix build on SmartOS
With -std=g++0x, `signbit` is no longer a define, and is an actual function declared in C++-specific headers. Thus checking it's presence with ifdef will no longer work. Considering that g++0x implies newer compiler, there should not be the case where it won't be present anymore. BUG= R=bmeurer@chromium.org, danno Review URL: https://codereview.chromium.org/642203003 Patch from Fedor Indutny <fedor.indutny@gmail.com>. git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24730 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
cc60a45d78
commit
778b0926ea
@ -31,26 +31,6 @@
|
||||
#include "src/base/platform/platform.h"
|
||||
|
||||
|
||||
// It seems there is a bug in some Solaris distributions (experienced in
|
||||
// SunOS 5.10 Generic_141445-09) which make it difficult or impossible to
|
||||
// access signbit() despite the availability of other C99 math functions.
|
||||
#ifndef signbit
|
||||
namespace std {
|
||||
// Test sign - usually defined in math.h
|
||||
int signbit(double x) {
|
||||
// We need to take care of the special case of both positive and negative
|
||||
// versions of zero.
|
||||
if (x == 0) {
|
||||
return fpclass(x) & FP_NZERO;
|
||||
} else {
|
||||
// This won't detect negative NaN but that should be okay since we don't
|
||||
// assume that behavior.
|
||||
return x < 0;
|
||||
}
|
||||
}
|
||||
} // namespace std
|
||||
#endif // signbit
|
||||
|
||||
namespace v8 {
|
||||
namespace base {
|
||||
|
||||
|
@ -29,14 +29,6 @@
|
||||
#include "src/base/platform/mutex.h"
|
||||
#include "src/base/platform/semaphore.h"
|
||||
|
||||
#ifdef __sun
|
||||
# ifndef signbit
|
||||
namespace std {
|
||||
int signbit(double x);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if V8_OS_QNX
|
||||
#include "src/base/qnx-math.h"
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user