michael@0: Only use lround in C99 programs. michael@0: michael@0: diff --git a/gfx/cairo/cairo/src/cairo-misc.c b/gfx/cairo/cairo/src/cairo-misc.c michael@0: --- a/gfx/cairo/cairo/src/cairo-misc.c michael@0: +++ b/gfx/cairo/cairo/src/cairo-misc.c michael@0: @@ -478,17 +478,17 @@ _cairo_operator_bounded_by_either (cairo michael@0: case CAIRO_OPERATOR_IN: michael@0: case CAIRO_OPERATOR_DEST_IN: michael@0: case CAIRO_OPERATOR_DEST_ATOP: michael@0: return 0; michael@0: } michael@0: michael@0: } michael@0: michael@0: -#if DISABLE_SOME_FLOATING_POINT michael@0: +#if DISABLE_SOME_FLOATING_POINT || __STDC_VERSION__ < 199901L michael@0: /* This function is identical to the C99 function lround(), except that it michael@0: * performs arithmetic rounding (floor(d + .5) instead of away-from-zero rounding) and michael@0: * has a valid input range of (INT_MIN, INT_MAX] instead of michael@0: * [INT_MIN, INT_MAX]. It is much faster on both x86 and FPU-less systems michael@0: * than other commonly used methods for rounding (lround, round, rint, lrint michael@0: * or float (d + 0.5)). michael@0: * michael@0: * The reason why this function is much faster on x86 than other michael@0: diff --git a/gfx/cairo/cairo/src/cairoint.h b/gfx/cairo/cairo/src/cairoint.h michael@0: --- a/gfx/cairo/cairo/src/cairoint.h michael@0: +++ b/gfx/cairo/cairo/src/cairoint.h michael@0: @@ -969,17 +969,17 @@ _cairo_restrict_value (double value, dou michael@0: * away from 0. _cairo_round rounds halfway cases toward negative infinity. michael@0: * This matches the rounding behaviour of _cairo_lround. */ michael@0: static inline double cairo_const michael@0: _cairo_round (double r) michael@0: { michael@0: return floor (r + .5); michael@0: } michael@0: michael@0: -#if DISABLE_SOME_FLOATING_POINT michael@0: +#if DISABLE_SOME_FLOATING_POINT || __STDC_VERSION__ < 199901L michael@0: cairo_private int michael@0: _cairo_lround (double d) cairo_const; michael@0: #else michael@0: #define _cairo_lround lround michael@0: #endif michael@0: michael@0: cairo_private uint16_t michael@0: _cairo_half_from_float (float f) cairo_const;