[mapguide-commits] r8796 - trunk/MgDev/Oem/LinuxApt

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Sun Oct 25 19:47:29 PDT 2015


Author: christinebao
Date: 2015-10-25 19:47:28 -0700 (Sun, 25 Oct 2015)
New Revision: 8796

Modified:
   trunk/MgDev/Oem/LinuxApt/php-5.5.17.tar.bz2
Log:
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

Modified: trunk/MgDev/Oem/LinuxApt/php-5.5.17.tar.bz2
===================================================================
(Binary files differ)



More information about the mapguide-commits mailing list