diff options
author | Kevin Matulef <matulef@gmail.com> | 2012-05-09 12:41:23 -0400 |
---|---|---|
committer | Kevin Matulef <matulef@gmail.com> | 2012-05-09 13:02:15 -0400 |
commit | 8e80bc36e29cdb47eb07e13d14ae0a0af6cd3084 (patch) | |
tree | 5dc08813f18daab93ba13f7f8999e768012391cd /src/mongo/bson/bsonelement.h | |
parent | 9752fd84d5bf78b9f8ee8fdfb2276090e015311f (diff) | |
download | mongo-8e80bc36e29cdb47eb07e13d14ae0a0af6cd3084.tar.gz |
fixed isnan compilation on solaris
Diffstat (limited to 'src/mongo/bson/bsonelement.h')
-rw-r--r-- | src/mongo/bson/bsonelement.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/bson/bsonelement.h b/src/mongo/bson/bsonelement.h index e7ea3d8dc77..e898d7d4d76 100644 --- a/src/mongo/bson/bsonelement.h +++ b/src/mongo/bson/bsonelement.h @@ -18,7 +18,7 @@ #pragma once #include <vector> -#include <cmath> +#include <math.h> #include <string.h> #include "util/builder.h" #include "bsontypes.h" @@ -261,14 +261,14 @@ namespace mongo { /** Get javascript code of a CodeWScope data element. */ const char * codeWScopeCode() const { - massert( 16177 , "not codeWScope" , type() == CodeWScope ); + massert( 16225 , "not codeWScope" , type() == CodeWScope ); return value() + 4 + 4; //two ints precede code (see BSON spec) } /** Get length of the code part of the CodeWScope object * This INCLUDES the null char at the end */ int codeWScopeCodeLen() const { - massert( 16178 , "not codeWScope" , type() == CodeWScope ); + massert( 16226 , "not codeWScope" , type() == CodeWScope ); return *(int *)( value() + 4 ); } @@ -607,7 +607,7 @@ namespace mongo { switch( type() ) { case NumberDouble: d = numberDouble(); - if ( std::isnan( d ) ){ + if ( isnan( d ) ){ return 0; } if ( d > (double) std::numeric_limits<long long>::max() ){ |