]> Pileus Git - ~andy/gtk/blobdiff - gtk/fallback-c89.c
filechooserbutton: whitespace fixes
[~andy/gtk] / gtk / fallback-c89.c
index eb713b8b352d297fa8eebb6d36275e27c8d56f32..aaccd9d0ce12859268d2839d51712965ad45af02 100644 (file)
@@ -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