mirror of
https://github.com/postgres/postgres.git
synced 2025-06-11 20:28:21 +03:00
round() is not portable. Use rint().
This commit is contained in:
@ -14,6 +14,8 @@
|
|||||||
*/
|
*/
|
||||||
#include "postgres.h"
|
#include "postgres.h"
|
||||||
|
|
||||||
|
#include <math.h>
|
||||||
|
|
||||||
#include "access/genam.h"
|
#include "access/genam.h"
|
||||||
#include "access/gist_private.h"
|
#include "access/gist_private.h"
|
||||||
#include "catalog/index.h"
|
#include "catalog/index.h"
|
||||||
@ -420,7 +422,7 @@ calculatePagesPerBuffer(GISTBuildState *buildstate, int levelStep)
|
|||||||
*/
|
*/
|
||||||
pagesPerBuffer = 2 * pow(avgIndexTuplesPerPage, levelStep);
|
pagesPerBuffer = 2 * pow(avgIndexTuplesPerPage, levelStep);
|
||||||
|
|
||||||
return round(pagesPerBuffer);
|
return (int) rint(pagesPerBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user