mirror of https://github.com/axmolengine/axmol.git
Merge pull request #1965 from fape/marmalade_tinyxml2
Marmalade tinyxml2 fixes
This commit is contained in:
commit
ca9cc14d5d
|
@ -1587,7 +1587,7 @@ XMLError XMLDocument::LoadFile( const char* filename )
|
||||||
InitDocument();
|
InitDocument();
|
||||||
FILE* fp = 0;
|
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" );
|
errno_t err = fopen_s(&fp, filename, "rb" );
|
||||||
if ( !fp || err) {
|
if ( !fp || err) {
|
||||||
#else
|
#else
|
||||||
|
@ -1641,7 +1641,7 @@ XMLError XMLDocument::LoadFile( FILE* fp )
|
||||||
XMLError XMLDocument::SaveFile( const char* filename, bool compact )
|
XMLError XMLDocument::SaveFile( const char* filename, bool compact )
|
||||||
{
|
{
|
||||||
FILE* fp = 0;
|
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" );
|
errno_t err = fopen_s(&fp, filename, "w" );
|
||||||
if ( !fp || err) {
|
if ( !fp || err) {
|
||||||
#else
|
#else
|
||||||
|
@ -1768,7 +1768,7 @@ void XMLPrinter::Print( const char* format, ... )
|
||||||
else {
|
else {
|
||||||
// This seems brutally complex. Haven't figured out a better
|
// This seems brutally complex. Haven't figured out a better
|
||||||
// way on windows.
|
// way on windows.
|
||||||
#ifdef _MSC_VER
|
#if defined _MSC_VER && (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
|
||||||
int len = -1;
|
int len = -1;
|
||||||
int expand = 1000;
|
int expand = 1000;
|
||||||
while ( len < 0 ) {
|
while ( len < 0 ) {
|
||||||
|
|
|
@ -24,6 +24,8 @@ distribution.
|
||||||
#ifndef TINYXML2_INCLUDED
|
#ifndef TINYXML2_INCLUDED
|
||||||
#define TINYXML2_INCLUDED
|
#define TINYXML2_INCLUDED
|
||||||
|
|
||||||
|
#include "platform/CCPlatformConfig.h"
|
||||||
|
|
||||||
#if defined(ANDROID_NDK) || defined(__BORLANDC__)
|
#if defined(ANDROID_NDK) || defined(__BORLANDC__)
|
||||||
# include <ctype.h>
|
# include <ctype.h>
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
|
@ -73,7 +75,7 @@ distribution.
|
||||||
#endif
|
#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.
|
// Microsoft visual studio, version 2005 and higher.
|
||||||
/*int _snprintf_s(
|
/*int _snprintf_s(
|
||||||
char *buffer,
|
char *buffer,
|
||||||
|
|
Loading…
Reference in New Issue