--- src/gnm-so-path.c.orig	2013-02-13 23:07:34.000000000 -0500
+++ src/gnm-so-path.c	2013-02-13 23:16:40.000000000 -0500
@@ -30,7 +30,7 @@
 #include <goffice/goffice.h>
 #include <gsf/gsf-impl-utils.h>
 #include <glib/gi18n-lib.h>
-#include <values.h>
+#include <float.h>
 
 #define CXML2C(s) ((char const *)(s))
 
@@ -105,8 +105,8 @@
 			else {
 				unsigned i;
 				double mx, my, Mx, My;
-				x0 = y0 = MAXDOUBLE;
-				x1 = y1 = -MAXDOUBLE;
+				x0 = y0 = DBL_MAX;
+				x1 = y1 = -DBL_MAX;
 				for (i = 0; i < spv->paths->len; i++) {
 					goc_item_get_bounds (GOC_ITEM (g_ptr_array_index (spv->paths, i)), &mx, &my, &Mx, &My);
 					if (mx < x0)
