Navigation Menu

Skip to content

Commit

Permalink
- fixed drand48() on windows so spatial index doesn't crash anymore
Browse files Browse the repository at this point in the history
- debug message in OGR changed from QgsLogger::warning to QgsDebugMsg


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6733 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
wonder committed Feb 28, 2007
1 parent f2cdb3c commit 9fac1f5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Expand Up @@ -27,7 +27,11 @@
#include "RandomEvictionsBuffer.h"

#ifdef WIN32
double drand48(void) { return (double) rand() / (double) RAND_MAX; }
// following two functions don't exist natively on windows so we'll emulate them
// drand48() returns real number x where 0 <= x < 1
// srand48() initializes generator

double drand48(void) { return (double) rand() / (double) (RAND_MAX+1); }
void srand48(long seed) { srand(seed); }
#endif

Expand Down
2 changes: 1 addition & 1 deletion src/providers/ogr/qgsogrprovider.cpp
Expand Up @@ -1492,7 +1492,7 @@ QgsSpatialRefSys QgsOgrProvider::getSRS()
OGRSpatialReference * mySpatialRefSys = ogrLayer->GetSpatialRef();
if (mySpatialRefSys == NULL)
{
QgsLogger::warning("no spatial reference found");
QgsDebugMsg("no spatial reference found");
}
else
{
Expand Down

0 comments on commit 9fac1f5

Please sign in to comment.