From 12d50f25bf5ac3d4e6509cd4bd57862324a900fc Mon Sep 17 00:00:00 2001 From: Sacha Date: Mon, 22 Apr 2013 14:23:13 +1000 Subject: [PATCH] Define vasprintf in native for Blackberry instead (as it is also used there). Remove some redundancy in Settings.pri. --- Common/StringUtil.h | 42 +----------------------------------------- Qt/Settings.pri | 2 -- README.md | 2 +- native | 2 +- 4 files changed, 3 insertions(+), 45 deletions(-) diff --git a/Common/StringUtil.h b/Common/StringUtil.h index bd323d7040..220b70f8c4 100644 --- a/Common/StringUtil.h +++ b/Common/StringUtil.h @@ -18,51 +18,11 @@ #ifndef _STRINGUTIL_H_ #define _STRINGUTIL_H_ -#include - -#include -#include -#include #include +#include #include "Common.h" -#ifdef BLACKBERRY -// QNX Does not have an implementation of vasprintf -static inline int vasprintf(char **rResult, const char *aFormat, va_list aAp) -{ - int rVal; - char *result; - va_list ap; - - result = (char *) malloc(16); - if (result == NULL) return -1; - - va_copy(ap, aAp); - rVal = vsnprintf(result, 16, aFormat, ap); - va_end(ap); - - if (rVal == -1) - { - free(result); - return rVal; - } - else if (rVal >= 16) - { - free(result); - result = (char *) malloc(rVal + 1); - if (result == NULL) return -1; - - va_copy(ap, aAp); - rVal = vsnprintf(result, rVal + 1, aFormat, aAp); - va_end(ap); - } - - *rResult = result; - return rVal; -} -#endif - std::string StringFromFormat(const char* format, ...); // Cheap! bool CharArrayFromFormatV(char* out, int outsize, const char* format, va_list args); diff --git a/Qt/Settings.pri b/Qt/Settings.pri index d9a89a3eaf..1f520e56e9 100644 --- a/Qt/Settings.pri +++ b/Qt/Settings.pri @@ -45,6 +45,4 @@ symbian { MMP_RULES += "ARMFPU vfpv2" QMAKE_CXXFLAGS += -marm -Wno-parentheses -Wno-comment INCLUDEPATH += $$EPOCROOT/epoc32/include/stdapis/glib-2.0 - DEFINES += __MARM_ARMV6__ - CONFIG += 4.6.3 } diff --git a/README.md b/README.md index 10abe6ebc0..b16720c1d8 100644 --- a/README.md +++ b/README.md @@ -150,7 +150,7 @@ You will need to add the GCCE 4.6.3 variant to Symbian\tools\sbs\lib\config\vari - + diff --git a/native b/native index 25e03c243c..e584a005ac 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 25e03c243c271b921d3e65de47504efc22387ce3 +Subproject commit e584a005ac06fb3af48cff9f4d9ed352de60fea3