gdk/fallback-c89.c: Add fallback for round()
This is essentially done by simply copying from gtk/fallback-c89.c https://bugzilla.gnome.org/show_bug.cgi?id=694339
This commit is contained in:
parent
5e2c232145
commit
9b7c7ae614
@ -42,3 +42,15 @@ isinf (double x)
|
|||||||
return (!_finite (x) && !_isnan (x));
|
return (!_finite (x) && !_isnan (x));
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Workaround for round() for non-GCC/non-C99 compilers */
|
||||||
|
#ifndef HAVE_ROUND
|
||||||
|
static inline double
|
||||||
|
round (double x)
|
||||||
|
{
|
||||||
|
if (x >= 0)
|
||||||
|
return floor (x + 0.5);
|
||||||
|
else
|
||||||
|
return ceil (x - 0.5);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user