postgres.git / summary / log / commit / refs
commit d63de337f3e235f02d79a1df79dddbb002e9fd4e
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Thu Sep 08 20:37:40 2011 +0000
First released in: 9.2.0
round() is not portable. Use rint().
src/backend/access/gist/gistbuild.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/backend/access/gist/gistbuild.c b/src/backend/access/gist/gistbuild.c
index 83192385106..58f1ef221e1 100644
--- a/src/backend/access/gist/gistbuild.c
+++ b/src/backend/access/gist/gistbuild.c
@@ -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);
}
/*
[parent: 295e7dc929c3]