Content-Length: 271849 | pFad | http://github.com/postgrespro/postgres/commit/d63de337f3e235f02d79a1df79dddbb002e9fd4e

E1 round() is not portable. Use rint(). · postgrespro/postgres@d63de33 · GitHub
Skip to content

Commit d63de33

Browse files
committed
round() is not portable. Use rint().
1 parent 295e7dc commit d63de33

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/backend/access/gist/gistbuild.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414
*/
1515
#include "postgres.h"
1616

17+
#include <math.h>
18+
1719
#include "access/genam.h"
1820
#include "access/gist_private.h"
1921
#include "catalog/index.h"
@@ -420,7 +422,7 @@ calculatePagesPerBuffer(GISTBuildState *buildstate, int levelStep)
420422
*/
421423
pagesPerBuffer = 2 * pow(avgIndexTuplesPerPage, levelStep);
422424

423-
return round(pagesPerBuffer);
425+
return (int) rint(pagesPerBuffer);
424426
}
425427

426428
/*

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/d63de337f3e235f02d79a1df79dddbb002e9fd4e

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy