From dd6c5779ec5e86ba8755efc77f632a6ffedb6414 Mon Sep 17 00:00:00 2001 From: madmaxoft Date: Wed, 15 Jan 2014 18:28:51 +0100 Subject: Using a 2nd argument instead of va_copy(). This seems to be the only reasonable C++03-only solution. --- src/StringUtils.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/StringUtils.h') diff --git a/src/StringUtils.h b/src/StringUtils.h index 2373f3843..35faeb01b 100644 --- a/src/StringUtils.h +++ b/src/StringUtils.h @@ -21,8 +21,12 @@ typedef std::list AStringList; -/// Add the formated string to the existing data in the string -extern AString & AppendVPrintf(AString & str, const char * format, va_list args); +/** Add the formated string to the existing data in the string +It is silly to need to specify the arguments twice, but it is required for x64 / GCC: +Ref.: issue #541, http://www.bailopan.net/blog/?p=30 +va_copy is not available until C++11, so we need to make do with passing a duplicate. +*/ +extern AString & AppendVPrintf(AString & str, const char * format, va_list args, va_list argsCopy); /// Output the formatted text into the string extern AString & Printf (AString & str, const char * format, ...); -- cgit v1.2.3