[mapguide-commits] r8734 - sandbox/VC140/Oem/LinuxApt

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Thu Aug 6 02:56:21 PDT 2015


Author: christinebao
Date: 2015-08-06 02:56:21 -0700 (Thu, 06 Aug 2015)
New Revision: 8734

Modified:
   sandbox/VC140/Oem/LinuxApt/php-5.5.17.tar.bz2
Log:
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: sandbox/VC140/Oem/LinuxApt/php-5.5.17.tar.bz2
===================================================================
(Binary files differ)



More information about the mapguide-commits mailing list