fix some bugs in linux

This commit is contained in:
kalenhaha
2014-05-02 00:16:12 +08:00
parent b836b1123e
commit f17d400fd3
4 changed files with 33 additions and 16 deletions

View File

@@ -136,7 +136,10 @@ namespace xgboost{
}
/*! \brief return a real number uniform in [0,1) */
inline double RandDouble( void ){
return static_cast<double>( rand_r( &rseed ) ) / (static_cast<double>( RAND_MAX )+1.0);
// return static_cast<double>( rand_( &rseed ) ) / (static_cast<double>( RAND_MAX )+1.0);
return static_cast<double>(rand()) / (static_cast<double>(RAND_MAX)+1.0);
}
// random number seed
unsigned rseed;