]> Pileus Git - ~andy/gtk/blobdiff - gtk/fallback-c89.c
docs: Typo fix
[~andy/gtk] / gtk / fallback-c89.c
index 8297e27d479f0c683768ef8d6d3c79c2e7709661..aaccd9d0ce12859268d2839d51712965ad45af02 100644 (file)
@@ -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 <http://www.gnu.org/licenses/>.
  */
 
 #include <math.h>
@@ -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