Skip to content

Commit

Permalink
Rename round function to avoid conflict
Browse files Browse the repository at this point in the history
Rename round function to roundtoint to avoid conflict with standard canditates.
Compilation fails on Solaris 11.4
  • Loading branch information
peter-kutak committed Oct 18, 2018
1 parent d871f2c commit 0b2d6f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/lib/bsnprintf.cc
Expand Up @@ -618,7 +618,7 @@ static LDOUBLE pow10(int exp)
return result;
}

static int64_t round(LDOUBLE value)
static int64_t roundtoint(LDOUBLE value)
{
int64_t intpart;

Expand Down Expand Up @@ -685,7 +685,7 @@ static int32_t fmtfp(char *buffer, int32_t currlen, int32_t maxlen,
/* We "cheat" by converting the fractional part to integer by
* multiplying by a factor of 10
*/
fracpart = round((pow10(max)) * (ufvalue - intpart));
fracpart = roundtoint((pow10(max)) * (ufvalue - intpart));

if (fracpart >= pow10(max)) {
intpart++;
Expand Down

0 comments on commit 0b2d6f8

Please sign in to comment.