X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Ffallback-c89.c;h=aaccd9d0ce12859268d2839d51712965ad45af02;hb=3c8e1c92a85b2e41161698f141747ced2c574f32;hp=8297e27d479f0c683768ef8d6d3c79c2e7709661;hpb=db3fecc5b9a06af7b015b241b8ee735b65f786ea;p=~andy%2Fgtk diff --git a/gtk/fallback-c89.c b/gtk/fallback-c89.c index 8297e27d4..aaccd9d0c 100644 --- a/gtk/fallback-c89.c +++ b/gtk/fallback-c89.c @@ -14,9 +14,7 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ #include @@ -55,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