[mapguide-commits] r8812 - in trunk/MgDev: Oem/DWFTK/develop/global/src/dwf/package Oem/dbxml/dbxml/src/dbxml/nodeStore Oem/geos/src/algorithm Oem/geos/src/geom Oem/geos/src/io Oem/geos/src/operation/buffer Server/src/Gws/GwsQueryEngine

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Nov 5 20:47:59 PST 2015


Author: hubu
Date: 2015-11-05 20:47:59 -0800 (Thu, 05 Nov 2015)
New Revision: 8812

Modified:
   trunk/MgDev/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp
   trunk/MgDev/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp
   trunk/MgDev/Oem/geos/src/algorithm/LineIntersector.cpp
   trunk/MgDev/Oem/geos/src/geom/LineSegment.cpp
   trunk/MgDev/Oem/geos/src/io/WKTWriter.cpp
   trunk/MgDev/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp
   trunk/MgDev/Server/src/Gws/GwsQueryEngine/GwsBatchSortedBlockJoinQueryResults.cpp
Log:
Fix Linux build.

Modified: trunk/MgDev/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp
===================================================================
--- trunk/MgDev/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp	2015-11-05 11:13:35 UTC (rev 8811)
+++ trunk/MgDev/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp	2015-11-06 04:47:59 UTC (rev 8812)
@@ -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: trunk/MgDev/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp
===================================================================
--- trunk/MgDev/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp	2015-11-05 11:13:35 UTC (rev 8811)
+++ trunk/MgDev/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp	2015-11-06 04:47:59 UTC (rev 8812)
@@ -17,7 +17,6 @@
 
 #define nsSetFlag(node, flag) (node)->nd_header.nh_flags |= (flag)
 
-using namespace std;
 using namespace DbXml;
 XERCES_CPP_NAMESPACE_USE
 
@@ -206,7 +205,7 @@
 	bool needsEscape = false;
 	if (!len)
 		len = NsUtil::nsStringLen(characters);
-	enum checkType ttype = (isCDATA || ignorable) ? checkType::ignore : isCharacters;
+	enum checkType ttype = (isCDATA || ignorable) ? ignore : isCharacters;
 	NsDonator chars(characters, len, ttype);
 	uint32_t textType;
 	if (isCDATA)

Modified: trunk/MgDev/Oem/geos/src/algorithm/LineIntersector.cpp
===================================================================
--- trunk/MgDev/Oem/geos/src/algorithm/LineIntersector.cpp	2015-11-05 11:13:35 UTC (rev 8811)
+++ trunk/MgDev/Oem/geos/src/algorithm/LineIntersector.cpp	2015-11-06 04:47:59 UTC (rev 8812)
@@ -125,7 +125,11 @@
 		// <FIX>
 		// hack to ensure that non-endpoints always have a non-zero distance
 		if (dist == 0.0 && !(p==p0)) {
+		#ifdef _WIN32
 			dist=std::fmax(pdx,pdy);
+		#else
+			dist=max(pdx, pdy);
+		#endif
 		}
 	}
 	assert(!(dist == 0.0 && !(p==p0))); // Bad distance calculation

Modified: trunk/MgDev/Oem/geos/src/geom/LineSegment.cpp
===================================================================
--- trunk/MgDev/Oem/geos/src/geom/LineSegment.cpp	2015-11-05 11:13:35 UTC (rev 8811)
+++ trunk/MgDev/Oem/geos/src/geom/LineSegment.cpp	2015-11-06 04:47:59 UTC (rev 8812)
@@ -168,10 +168,18 @@
 	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 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 max(orient0, orient1);
+		#endif
 	// points lie on opposite sides ==> indeterminate orientation
 	return 0;
 }

Modified: trunk/MgDev/Oem/geos/src/io/WKTWriter.cpp
===================================================================
--- trunk/MgDev/Oem/geos/src/io/WKTWriter.cpp	2015-11-05 11:13:35 UTC (rev 8811)
+++ trunk/MgDev/Oem/geos/src/io/WKTWriter.cpp	2015-11-06 04:47:59 UTC (rev 8812)
@@ -179,8 +179,13 @@
 WKTWriter::appendGeometryTaggedText(const Geometry *geometry, int level,
 		Writer *writer)
 {
+  #ifdef _WIN32
   outputDimension = std::fmin( defaultOutputDimension,
                          geometry->getCoordinateDimension() );
+  #else
+  outputDimension = min(defaultOutputDimension,
+                         geometry->getCoordinateDimension());
+  #endif
 
   indent(level, writer);
   if ( const Point* point = dynamic_cast<const Point*>(geometry) )

Modified: trunk/MgDev/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp
===================================================================
--- trunk/MgDev/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp	2015-11-05 11:13:35 UTC (rev 8811)
+++ trunk/MgDev/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp	2015-11-06 04:47:59 UTC (rev 8812)
@@ -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 = min(env->getHeight(), env->getWidth());
+  #endif
   if (bufferDistance < 0.0 && 2 * std::abs(bufferDistance) > envMinDimension)
       return true;
 

Modified: trunk/MgDev/Server/src/Gws/GwsQueryEngine/GwsBatchSortedBlockJoinQueryResults.cpp
===================================================================
--- trunk/MgDev/Server/src/Gws/GwsQueryEngine/GwsBatchSortedBlockJoinQueryResults.cpp	2015-11-05 11:13:35 UTC (rev 8811)
+++ trunk/MgDev/Server/src/Gws/GwsQueryEngine/GwsBatchSortedBlockJoinQueryResults.cpp	2015-11-06 04:47:59 UTC (rev 8812)
@@ -1592,7 +1592,7 @@
                 val = primaryCacheEntry->primaryKey->ToString();
             }
 
-            printf_s("%d) Key=%S  Properties=%d\n", (int)i+1, val, (int)primaryCacheEntry->propertyCollection.size());
+            printf("%d) Key=%S  Properties=%d\n", (int)i+1, val, (int)primaryCacheEntry->propertyCollection.size());
             for(size_t j=0;j<primaryCacheEntry->propertyCollection.size();j++)
             {
                 PropertyCacheEntry* propertyCacheEntry = primaryCacheEntry->propertyCollection[j];



More information about the mapguide-commits mailing list