[mapguide-commits] r8822 - in sandbox/jng/aspnet50: . Oem/DWFTK/develop/global/src/dwf/package Oem/LinuxApt Oem/dbxml/dbxml/src/dbxml/nodeStore Oem/geos/src/algorithm Oem/geos/src/geom Oem/geos/src/io Oem/geos/src/operation/buffer Oem/php Server/src/Gws/GwsQueryEngine

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sun Nov 8 08:45:29 PST 2015


Author: jng
Date: 2015-11-08 08:45:29 -0800 (Sun, 08 Nov 2015)
New Revision: 8822

Added:
   sandbox/jng/aspnet50/Oem/php/Zend/
Modified:
   sandbox/jng/aspnet50/
   sandbox/jng/aspnet50/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp
   sandbox/jng/aspnet50/Oem/LinuxApt/php-5.5.17.tar.bz2
   sandbox/jng/aspnet50/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp
   sandbox/jng/aspnet50/Oem/geos/src/algorithm/LineIntersector.cpp
   sandbox/jng/aspnet50/Oem/geos/src/geom/LineSegment.cpp
   sandbox/jng/aspnet50/Oem/geos/src/io/WKTWriter.cpp
   sandbox/jng/aspnet50/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp
   sandbox/jng/aspnet50/Server/src/Gws/GwsQueryEngine/GwsBatchSortedBlockJoinQueryResults.cpp
   sandbox/jng/aspnet50/build.bat
   sandbox/jng/aspnet50/setenvironment.bat
   sandbox/jng/aspnet50/setenvironment64.bat
Log:
Merged revision(s) 8796-8816 from trunk/MgDev:
Fix php-5.5.17.tar.bz2. It is extracted to modify a file to fix VS2015 porting, and zip again to .tar.bz2 format. 

RFC 150: MapGuide RFC 150 - Support Visual Studio 2015 
http://trac.osgeo.org/mapguide/wiki/MapGuideRfc150

LinuxApt\php-5.5.17\Zend\zend_config.w32.h has a build error due to VC140: fatal error C1189: #error:  Macro definition of snprintf conflicts with Standard Library function declaration. 
This is because VC140 has defined "snprintf" already, so it should not define again, otherwise will cause build error. 
Windows Kits\10\Include\10.0.10150.0\ucrt\stdio.h defines:
#if defined snprintf
    // This definition of snprintf will generate "warning C4005: 'snprintf': macro
    // redefinition" with a subsequent line indicating where the previous definition
    // of snprintf was.  This makes it easier to find where snprintf was defined.
    #pragma warning(push, 1)
    #pragma warning(1: 4005)
    #define snprintf Do not define snprintf as a macro
    #pragma warning(pop)
    #error Macro definition of snprintf conflicts with Standard Library function declaration
#endif

Solution is to only define "snprintf" in before VC140. Fix zend_config.w32.h to be:
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
........
Add modified zend_config.w32.h to Oem/php folder, it will be used to override official php-x.y.z before build. 
........
Fix Linux build.
........
Fix Linux build. 
........
Geometry simplification API sandbox
........
Add a new MgGeometrySimplifier class. This wraps the underlying GEOS geometry simplification APIs and provides geometry simplification services to the MapGuide API.
........
Update build.bat and setenvironment[64].bat to match current build environment
........



Property changes on: sandbox/jng/aspnet50
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/branches/3.0/MgDev:8705,8710
/sandbox/VC140:8684-8759
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
   + /branches/2.4/MgDev:6749-6756,6777-6783,6785-6787,6789,6791-6794,6796-6801,6954-6962,6986-7006
/branches/2.6/MgDev:8276-8286,8288-8292,8297,8299,8301,8303,8314-8315,8318,8335,8340,8354-8355,8365,8373
/branches/3.0/MgDev:8705,8710
/sandbox/VC140:8684-8759
/sandbox/adsk/2.6l:8727
/sandbox/adsk/3.0m:8563,8584,8607,8625,8694-8695
/sandbox/jng/convenience_apis:8262-8268,8271-8363
/sandbox/jng/createruntimemap:7486-7555
/sandbox/jng/dwftk:8321-8324,8328-8329,8331,8352
/sandbox/jng/geos34x:8256-8259
/sandbox/jng/tiling:8174-8208
/sandbox/jng/v30:8212-8227
/sandbox/rfc94:5099-5163
/trunk/MgDev:8796-8816

Modified: sandbox/jng/aspnet50/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp
===================================================================
--- sandbox/jng/aspnet50/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/Oem/DWFTK/develop/global/src/dwf/package/DefinedObject.cpp	2015-11-08 16:45:29 UTC (rev 8822)
@@ -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/aspnet50/Oem/LinuxApt/php-5.5.17.tar.bz2
===================================================================
(Binary files differ)

Modified: sandbox/jng/aspnet50/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp
===================================================================
--- sandbox/jng/aspnet50/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/Oem/dbxml/dbxml/src/dbxml/nodeStore/NsXercesTranscoder.cpp	2015-11-08 16:45:29 UTC (rev 8822)
@@ -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: sandbox/jng/aspnet50/Oem/geos/src/algorithm/LineIntersector.cpp
===================================================================
--- sandbox/jng/aspnet50/Oem/geos/src/algorithm/LineIntersector.cpp	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/Oem/geos/src/algorithm/LineIntersector.cpp	2015-11-08 16:45:29 UTC (rev 8822)
@@ -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: sandbox/jng/aspnet50/Oem/geos/src/geom/LineSegment.cpp
===================================================================
--- sandbox/jng/aspnet50/Oem/geos/src/geom/LineSegment.cpp	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/Oem/geos/src/geom/LineSegment.cpp	2015-11-08 16:45:29 UTC (rev 8822)
@@ -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: sandbox/jng/aspnet50/Oem/geos/src/io/WKTWriter.cpp
===================================================================
--- sandbox/jng/aspnet50/Oem/geos/src/io/WKTWriter.cpp	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/Oem/geos/src/io/WKTWriter.cpp	2015-11-08 16:45:29 UTC (rev 8822)
@@ -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: sandbox/jng/aspnet50/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp
===================================================================
--- sandbox/jng/aspnet50/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/Oem/geos/src/operation/buffer/OffsetCurveSetBuilder.cpp	2015-11-08 16:45:29 UTC (rev 8822)
@@ -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;
 

Modified: sandbox/jng/aspnet50/Server/src/Gws/GwsQueryEngine/GwsBatchSortedBlockJoinQueryResults.cpp
===================================================================
--- sandbox/jng/aspnet50/Server/src/Gws/GwsQueryEngine/GwsBatchSortedBlockJoinQueryResults.cpp	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/Server/src/Gws/GwsQueryEngine/GwsBatchSortedBlockJoinQueryResults.cpp	2015-11-08 16:45:29 UTC (rev 8822)
@@ -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];

Modified: sandbox/jng/aspnet50/build.bat
===================================================================
--- sandbox/jng/aspnet50/build.bat	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/build.bat	2015-11-08 16:45:29 UTC (rev 8822)
@@ -188,7 +188,7 @@
 if "%errorlevel%"=="1" goto error
 rem CsMap is not in Oem.sln, so we need to build that separately
 echo [build]: Building Oem - CSMap
-%MSBUILD% %MG_OEM%\CsMap\VC110\OpenSource.sln
+%MSBUILD% %MG_OEM%\CsMap\VC140\OpenSource.sln
 if "%errorlevel%"=="1" goto error
 if "%TYPECOMPONENT%"=="oem" 	goto quit
 if "%TYPECOMPONENT%"=="server" 	goto quit

Modified: sandbox/jng/aspnet50/setenvironment.bat
===================================================================
--- sandbox/jng/aspnet50/setenvironment.bat	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/setenvironment.bat	2015-11-08 16:45:29 UTC (rev 8822)
@@ -85,7 +85,7 @@
 rem running
 rem ==================================================
 
-IF "%JAVA_HOME%" == "" SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_71
+IF "%JAVA_HOME%" == "" SET JAVA_HOME=C:\Program Files (x86)\Java\jdk1.7.0_80
 IF "%DOXYGEN%" == "" SET DOXYGEN=%MG_DEV%\BuildTools\doxygen
 IF "%GNUWIN32%" == "" SET GNUWIN32=C:\Program Files (x86)\GnuWin32\bin
 IF "%SEVENZ%" == "" SET SEVENZ=%MG_DEV%\BuildTools\WebTools\7-Zip

Modified: sandbox/jng/aspnet50/setenvironment64.bat
===================================================================
--- sandbox/jng/aspnet50/setenvironment64.bat	2015-11-08 15:57:41 UTC (rev 8821)
+++ sandbox/jng/aspnet50/setenvironment64.bat	2015-11-08 16:45:29 UTC (rev 8822)
@@ -90,7 +90,7 @@
 rem running
 rem ==================================================
 
-IF "%JAVA_HOME%" == "" SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_71
+IF "%JAVA_HOME%" == "" SET JAVA_HOME=C:\Program Files\Java\jdk1.7.0_80
 IF "%DOXYGEN%" == "" SET DOXYGEN=C:\Program Files\doxygen\bin
 IF "%GNUWIN32%" == "" SET GNUWIN32=C:\Program Files (x86)\GnuWin32\bin
 IF "%SEVENZ%" == "" SET SEVENZ=%MG_DEV%\BuildTools\WebTools\7-Zip



More information about the mapguide-commits mailing list