Merge pull request #1965 from fape/marmalade_tinyxml2

Marmalade tinyxml2 fixes
This commit is contained in:
James Chen 2013-02-06 19:24:33 -08:00
commit ca9cc14d5d
2 changed files with 6 additions and 4 deletions

View File

@ -1587,7 +1587,7 @@ XMLError XMLDocument::LoadFile( const char* filename )
InitDocument();
FILE* fp = 0;
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
#if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
errno_t err = fopen_s(&fp, filename, "rb" );
if ( !fp || err) {
#else
@ -1641,7 +1641,7 @@ XMLError XMLDocument::LoadFile( FILE* fp )
XMLError XMLDocument::SaveFile( const char* filename, bool compact )
{
FILE* fp = 0;
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
#if defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
errno_t err = fopen_s(&fp, filename, "w" );
if ( !fp || err) {
#else
@ -1768,7 +1768,7 @@ void XMLPrinter::Print( const char* format, ... )
else {
// This seems brutally complex. Haven't figured out a better
// way on windows.
#ifdef _MSC_VER
#if defined _MSC_VER && (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
int len = -1;
int expand = 1000;
while ( len < 0 ) {

View File

@ -24,6 +24,8 @@ distribution.
#ifndef TINYXML2_INCLUDED
#define TINYXML2_INCLUDED
#include "platform/CCPlatformConfig.h"
#if defined(ANDROID_NDK) || defined(__BORLANDC__)
# include <ctype.h>
# include <limits.h>
@ -73,7 +75,7 @@ distribution.
#endif
#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
#if (defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE))
// Microsoft visual studio, version 2005 and higher.
/*int _snprintf_s(
char *buffer,