X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Ffallback-c89.c;h=aaccd9d0ce12859268d2839d51712965ad45af02;hb=d84f5ae17e5b891b30dd54ddc10fd22c2a609e0e;hp=eb713b8b352d297fa8eebb6d36275e27c8d56f32;hpb=9d0febc9a64a5bfb0fcfc3a88de4757f6c1ff090;p=~andy%2Fgtk diff --git a/gtk/fallback-c89.c b/gtk/fallback-c89.c index eb713b8b3..aaccd9d0c 100644 --- a/gtk/fallback-c89.c +++ b/gtk/fallback-c89.c @@ -53,4 +53,15 @@ rint (double x) return ceil (x - 0.5); } } -#endif \ No newline at end of file +#endif + +#ifndef HAVE_NEARBYINT +/* Workaround for nearbyint() for non-GCC/non-C99 compilers */ +/* This is quite similar to rint() in most respects */ + +static inline double +nearbyint (double x) +{ + return floor (x + 0.5); +} +#endif