Module Name: xsrc
Committed By: bouyer
Date: Thu May 26 07:59:26 UTC 2016
Modified Files:
xsrc/external/mit/glu/dist/include/GL: glu.h
Log Message:
Changing GLU_TESS_MAX_COORD to DBL_MAX causes internal constants derived
from GLU_TESS_MAX_COORD used in libtess to be +/-inf, leading to
logic errors. See
http://mail-index.netbsd.org/tech-x11/2016/05/25/msg001733.html
and
http://willkamp.com/opencpn/flyspray/index.php?do=details&task_id=2076
for details.
Change back GLU_TESS_MAX_COORD to its upstream value if it fits
in a double, or 1e15 if DBL_MAX_10_EXP is not large enough
(fix proposed by christos@)
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 xsrc/external/mit/glu/dist/include/GL/glu.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: xsrc/external/mit/glu/dist/include/GL/glu.h
diff -u xsrc/external/mit/glu/dist/include/GL/glu.h:1.2 xsrc/external/mit/glu/dist/include/GL/glu.h:1.3
--- xsrc/external/mit/glu/dist/include/GL/glu.h:1.2 Fri Dec 19 19:07:46 2014
+++ xsrc/external/mit/glu/dist/include/GL/glu.h Thu May 26 07:59:26 2016
@@ -281,12 +281,12 @@ typedef GLUquadric GLUquadricObj;
typedef GLUtesselator GLUtesselatorObj;
typedef GLUtesselator GLUtriangulatorObj;
-/* GLdouble is double in gl.h so we are DBL_MAX */
-#include <limits.h> /* Not a good place to do that, but... */
-#ifndef DBL_MAX
-#define GLU_TESS_MAX_COORD 1.0e150
+/* GLdouble is double in gl.h */
+#include <float.h> /* Not a good place to do that, but... */
+#if DBL_MAX_10_EXP < 40
+#define GLU_TESS_MAX_COORD 1e15
#else
-#define GLU_TESS_MAX_COORD DBL_MAX
+#define GLU_TESS_MAX_COORD 1e150
#endif
/* Internal convenience typedefs */