round() is not portable. Use rint().

This commit is contained in:
Tom Lane 2011-09-08 16:37:40 -04:00
parent 295e7dc929
commit d63de337f3
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,8 @@
*/
#include "postgres.h"
#include <math.h>
#include "access/genam.h"
#include "access/gist_private.h"
#include "catalog/index.h"
@ -420,7 +422,7 @@ calculatePagesPerBuffer(GISTBuildState *buildstate, int levelStep)
*/
pagesPerBuffer = 2 * pow(avgIndexTuplesPerPage, levelStep);
return round(pagesPerBuffer);
return (int) rint(pagesPerBuffer);
}
/*