]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/libc-extension.cc
2003 -> 2004
[lilypond.git] / flower / libc-extension.cc
index 4d42ce44b3940f661257abdb5ca9521695847e24..e072826d302f3bfdce97239e5629c02d95337bbc 100644 (file)
@@ -4,10 +4,12 @@
 
   source file of the flowerlib
 
-  (c)  1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
          Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
+#include <math.h>
+
 #include <stdio.h>
 #include <string.h>
 #include <ctype.h>
@@ -35,8 +37,16 @@ strnupr (char* start, int n)
   return start;
 }
 
+/*
+  There are some strange problems with round() on early glibcs.
+ */
+double
+my_round (double x)
+{
+  return floor (x -0.5)+ 1.0 ;
+}
 
-
+#ifndef isinf
 #if !HAVE_ISINF
 int
 isinf (double x)
@@ -44,7 +54,7 @@ isinf (double x)
   return x && ( x == x/ 2) ;
 }
 #endif
-
+#endif
 
 #if !HAVE_MEMMEM