[mapguide-commits] r8798 - in sandbox/jng/diet_vs2015/Oem: DWFTK/develop/global/src/dwf/package dbxml/dbxml/src/dbxml/nodeStore geos/src/algorithm geos/src/geom geos/src/io geos/src/operation/buffer

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Oct 29 04:10:50 PDT 2015


Author: jng
Date: 2015-10-29 04:10:50 -0700 (Thu, 29 Oct 2015)
New Revision: 8798

Modified:
   sandbox/jng/diet_vs2015/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp
   sandbox/jng/diet_vs2015/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp
   sandbox/jng/diet_vs2015/Oem/geos/src/algorithm/LineIntersector.cpp
   sandbox/jng/diet_vs2015/Oem/geos/src/geom/LineSegment.cpp
   sandbox/jng/diet_vs2015/Oem/geos/src/io/WKTWriter.cpp
   sandbox/jng/diet_vs2015/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp
Log:
Experimental linux build fixes. Basically we #ifdef back in the old code for Linux

Modified: sandbox/jng/diet_vs2015/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp
===================================================================
--- sandbox/jng/diet_vs2015/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp	2015-10-27 07:34:59 UTC (rev 8797)
+++ sandbox/jng/diet_vs2015/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp	2015-10-29 11:10:50 UTC (rev 8798)
@@ -490,7 +490,11 @@
         //
         // convert the instance pointer address as a string, and set to the instance id.
         //
+#ifdef WIN32
         LONG_PTR nId = (LONG_PTR)(this);
+#else
+        long nId = (long)(this);
+#endif
         int nBufferSize = 32;
         DWFPointer<wchar_t> zBuffer( DWFCORE_ALLOC_MEMORY(wchar_t, nBufferSize), true );
         int nBytes = sizeof(wchar_t) * _DWFCORE_SWPRINTF( zBuffer, nBufferSize, L"%d", nId );

Modified: sandbox/jng/diet_vs2015/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp
===================================================================
--- sandbox/jng/diet_vs2015/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp	2015-10-27 07:34:59 UTC (rev 8797)
+++ sandbox/jng/diet_vs2015/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp	2015-10-29 11:10:50 UTC (rev 8798)
@@ -206,7 +206,11 @@
 	bool needsEscape = false;
 	if (!len)
 		len = NsUtil::nsStringLen(characters);
+#ifdef WIN32
 	enum checkType ttype = (isCDATA || ignorable) ? checkType::ignore : isCharacters;
+#else
+	enum checkType ttype = (isCDATA || ignorable) ? ignore : isCharacters;
+#endif
 	NsDonator chars(characters, len, ttype);
 	uint32_t textType;
 	if (isCDATA)

Modified: sandbox/jng/diet_vs2015/Oem/geos/src/algorithm/LineIntersector.cpp
===================================================================
--- sandbox/jng/diet_vs2015/Oem/geos/src/algorithm/LineIntersector.cpp	2015-10-27 07:34:59 UTC (rev 8797)
+++ sandbox/jng/diet_vs2015/Oem/geos/src/algorithm/LineIntersector.cpp	2015-10-29 11:10:50 UTC (rev 8798)
@@ -125,7 +125,11 @@
 		// <FIX>
 		// hack to ensure that non-endpoints always have a non-zero distance
 		if (dist == 0.0 && !(p==p0)) {
-			dist=std::fmax(pdx,pdy);
+#if WIN32
+			dist=std::fmax(pdx,pdy)
+#else
+			dist=std::max(pdx,pdy);
+#endif
 		}
 	}
 	assert(!(dist == 0.0 && !(p==p0))); // Bad distance calculation

Modified: sandbox/jng/diet_vs2015/Oem/geos/src/geom/LineSegment.cpp
===================================================================
--- sandbox/jng/diet_vs2015/Oem/geos/src/geom/LineSegment.cpp	2015-10-27 07:34:59 UTC (rev 8797)
+++ sandbox/jng/diet_vs2015/Oem/geos/src/geom/LineSegment.cpp	2015-10-29 11:10:50 UTC (rev 8798)
@@ -168,10 +168,22 @@
 	int orient1 = algorithm::CGAlgorithms::orientationIndex(p0, p1, seg.p1);
 	// this handles the case where the points are L or collinear
 	if (orient0 >= 0 && orient1 >= 0)
+	{
+#ifdef WIN32
 		return std::fmax(orient0, orient1);
+#else
+		return std::max(orient0, orient1);
+#endif
+	}
 	// this handles the case where the points are R or collinear
 	if (orient0 <= 0 && orient1 <= 0)
+	{
+#ifdef WIN32
 		return std::fmax(orient0, orient1);
+#else
+		return std::max(orient0, orient1);
+#endif
+	}
 	// points lie on opposite sides ==> indeterminate orientation
 	return 0;
 }

Modified: sandbox/jng/diet_vs2015/Oem/geos/src/io/WKTWriter.cpp
===================================================================
--- sandbox/jng/diet_vs2015/Oem/geos/src/io/WKTWriter.cpp	2015-10-27 07:34:59 UTC (rev 8797)
+++ sandbox/jng/diet_vs2015/Oem/geos/src/io/WKTWriter.cpp	2015-10-29 11:10:50 UTC (rev 8798)
@@ -179,8 +179,13 @@
 WKTWriter::appendGeometryTaggedText(const Geometry *geometry, int level,
 		Writer *writer)
 {
+#ifdef WIN32
   outputDimension = std::fmin( defaultOutputDimension,
                          geometry->getCoordinateDimension() );
+#else
+  outputDimension = std::min( defaultOutputDimension,
+                         geometry->getCoordinateDimension() );
+#endif
 
   indent(level, writer);
   if ( const Point* point = dynamic_cast<const Point*>(geometry) )

Modified: sandbox/jng/diet_vs2015/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp
===================================================================
--- sandbox/jng/diet_vs2015/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp	2015-10-27 07:34:59 UTC (rev 8797)
+++ sandbox/jng/diet_vs2015/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp	2015-10-29 11:10:50 UTC (rev 8798)
@@ -333,7 +333,11 @@
 		return isTriangleErodedCompletely(ringCoord, bufferDistance);
 
   const Envelope* env = ring->getEnvelopeInternal();
+#ifdef WIN32
   double envMinDimension = std::fmin(env->getHeight(), env->getWidth());
+#else
+  double envMinDimension = std::min(env->getHeight(), env->getWidth());
+#endif
   if (bufferDistance < 0.0 && 2 * std::abs(bufferDistance) > envMinDimension)
       return true;
 



More information about the mapguide-commits mailing list