<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><br><div>Begin forwarded message:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>From: </b></span><span style="font-family:'Helvetica'; font-size:medium;">Art Haas &lt;<a href="mailto:ahaas@impactweather.com">ahaas@impactweather.com</a>&gt;<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>Date: </b></span><span style="font-family:'Helvetica'; font-size:medium;">March 7, 2011 1:35:05 PM PST<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>To: </b></span><span style="font-family:'Helvetica'; font-size:medium;">&lt;<a href="mailto:geos-devel-owner@lists.osgeo.org">geos-devel-owner@lists.osgeo.org</a>&gt;<br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span style="font-family:'Helvetica'; font-size:medium; color:rgba(0, 0, 0, 1);"><b>Subject: </b></span><span style="font-family:'Helvetica'; font-size:medium;"><b>[PATCH] Several fixes for building GEOS on Solaris with GCC</b><br></span></div><br><div><br>Hi.<br><br>My initial mail to &lt;<a href="mailto:geos-devel@lists.osgeo.org">geos-devel@lists.osgeo.org</a>&gt; was rejected<br>with a message to send to this address, so here's my second<br>attempt in submitting these changes ...<br><br>The patches below fix several build problems I encountered<br>while trying to build GEOS on Solaris 10 (x86) with my<br>GCC-4.6 buids and 'cmake' for configuration:<br><br>platform.h.cmake - add definitions for ISNAN(x) and FINITE(x)<br>platform.h.in - untested but similar patches<br>TaggedLineString.h - prefix several 'size_t' uses with 'std::'<br>valid/SimpleNestedRingTester.h - include &lt;cstring&gt; for 'NULL'<br><br>These patches allow the build to get about 20% complete before the<br>build fails with this error:<br><br>/export/home/arth/src/geos/src/operation/overlay/OverlayNodeFactory.cpp:31:33: error: uninitialized const 'geos::operation::overlay::onf' [-fpermissive]<br>/export/home/arth/src/geos/include/geos/operation/overlay/OverlayNodeFactory.h:47:16: note: 'const class geos::operation::overlay::OverlayNodeFactory' has no user-provided default constructor<br>make[2]: *** [src/CMakeFiles/geos.dir/operation/overlay/OverlayNodeFactory.cpp.o] Error 1<br>make[1]: *** [src/CMakeFiles/geos.dir/all] Error 2<br>make: *** [all] Error 2<br><br>Building GEOS on a current Fedora 14 system and GCC-4.6 results<br>in a similar error message; a build with the system GCC-4.5 compiler<br>completes without problem and passes 'make check'.<br><br>I'll work on the constructor problem as time permits; possibly others<br>could try to install GCC-4.6 development builds and see what other<br>changes the new compiler will require.<br><br>Thanks for your work on GEOS.<br><br>Art Haas<br><br>Index: include/geos/platform.h.cmake<br>===================================================================<br>--- include/geos/platform.h.cmake<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 3266)<br>+++ include/geos/platform.h.cmake<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)<br>@@ -130,6 +130,8 @@<br> # define ISNAN(x) __inline_isnand(static_cast&lt;double&gt;(x))<br> #elif defined(HAVE_ISNAND_XCODE)<br> # define ISNAN(x) __isnand(static_cast&lt;double&gt;(x))<br>+#elif defined(__GNUC__) &amp;&amp; (__GNUC__ &gt; 3)<br>+# define ISNAN(x) (__builtin_isnan(x))<br> #elif defined(HAVE_ISNAN)<br> # if defined(_MSC_VER)<br> # &nbsp;define ISNAN(x) _isnan(static_cast&lt;double&gt;(x))<br>@@ -146,6 +148,8 @@<br> # define FINITE(x) isfinite(x)<br> #elif defined(HAVE_FINITE)<br> # define FINITE(x) _finite(static_cast&lt;double&gt;(x))<br>+#elif defined(__GNUC__) &amp;&amp; (__GNUC__ &gt; 3)<br>+# define FINITE(x) (__builtin_isfinite(x))<br> #else<br> # error "Could not find finite or isfinite function or macro!"<br> #endif<br>Index: include/geos/platform.h.in<br>===================================================================<br>--- include/geos/platform.h.in<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 3266)<br>+++ include/geos/platform.h.in<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)<br>@@ -78,6 +78,8 @@<br> #else<br> # if defined(_MSC_VER)<br> # &nbsp;define FINITE(x) _finite(static_cast&lt;double&gt;(x)) &nbsp;&nbsp;&nbsp;<br>+# elif defined(__GNUC__) &amp;&amp; (__GNUC__ &gt; 3)<br>+# &nbsp;define FINITE(x) (__builtin_isfinite(x))<br> # else<br> # &nbsp;define FINITE(x) (isfinite(x))<br> # endif<br>@@ -95,6 +97,8 @@<br> &nbsp;&nbsp;&nbsp;// Hack for OS/X &lt;cmath&gt; incorrectly re-defining isnan() into oblivion.<br> &nbsp;&nbsp;&nbsp;// It does leave a version in std.<br> # &nbsp;define ISNAN(x) (std::isnan(x))<br>+# elif defined(__GNUC__) &amp;&amp; (__GNUC__ &gt; 3)<br>+# &nbsp;define ISNAN(x) (__builtin_isnan(x))<br> # endif<br> #endif<br><br>Index: include/geos/simplify/TaggedLineString.h<br>===================================================================<br>--- include/geos/simplify/TaggedLineString.h<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 3266)<br>+++ include/geos/simplify/TaggedLineString.h<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)<br>@@ -71,11 +71,11 @@<br> <span class="Apple-tab-span" style="white-space:pre">        </span>typedef std::auto_ptr&lt;geom::CoordinateSequence&gt; CoordSeqPtr;<br><br> <span class="Apple-tab-span" style="white-space:pre">        </span>TaggedLineString(const geom::LineString* nParentLine,<br>-<span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>size_t minimumSize=2);<br>+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::size_t minimumSize=2);<br><br> <span class="Apple-tab-span" style="white-space:pre">        </span>~TaggedLineString();<br><br>-<span class="Apple-tab-span" style="white-space:pre">        </span>size_t getMinimumSize() const;<br>+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::size_t getMinimumSize() const;<br><br> <span class="Apple-tab-span" style="white-space:pre">        </span>const geom::LineString* getParent() const;<br><br>@@ -83,7 +83,7 @@<br><br> <span class="Apple-tab-span" style="white-space:pre">        </span>CoordSeqPtr getResultCoordinates() const;<br><br>-<span class="Apple-tab-span" style="white-space:pre">        </span>size_t getResultSize() const;<br>+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::size_t getResultSize() const;<br><br> <span class="Apple-tab-span" style="white-space:pre">        </span>TaggedLineSegment* getSegment(std::size_t);<br><br>@@ -109,7 +109,7 @@<br> <span class="Apple-tab-span" style="white-space:pre">        </span>// TaggedLineSegments owned by this object<br> <span class="Apple-tab-span" style="white-space:pre">        </span>std::vector&lt;TaggedLineSegment*&gt; resultSegs;<br><br>-<span class="Apple-tab-span" style="white-space:pre">        </span>size_t minimumSize;<br>+ &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;std::size_t minimumSize;<br><br> <span class="Apple-tab-span" style="white-space:pre">        </span>void init();<br><br>Index: include/geos/operation/valid/SimpleNestedRingTester.h<br>===================================================================<br>--- include/geos/operation/valid/SimpleNestedRingTester.h<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 3266)<br>+++ include/geos/operation/valid/SimpleNestedRingTester.h<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)<br>@@ -22,7 +22,7 @@<br> #define GEOS_OP_SIMPLENESTEDRINGTESTER_H<br><br> #include &lt;geos/export.h&gt;<br>-<br>+#include &lt;cstring&gt;<br> #include &lt;vector&gt;<br><br> #ifdef _MSC_VER<br></div></blockquote></div><br></body></html>