aboutsummaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authormmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-04-09 18:35:20 +0000
committermmentovai <mmentovai@4c0a9323-5329-0410-9bdc-e9ce6186880e>2007-04-09 18:35:20 +0000
commit29789d8106fb3beb6626be614d7c8819d4f561a7 (patch)
tree1662abf1a414788926227ac91afca4bc225dc8f8 /src/common
parentRevert previous patch, see google-breakpad-dev (diff)
downloadbreakpad-29789d8106fb3beb6626be614d7c8819d4f561a7.tar.xz
Wrong version of swprintf used with VS 2003/7.1 CRT. r=bryner
http://groups.google.com/group/google-breakpad-dev/browse_thread/thread/eadfa703d4bd8a4a git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@143 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/common')
-rw-r--r--src/common/windows/string_utils-inl.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/common/windows/string_utils-inl.h b/src/common/windows/string_utils-inl.h
index ade99792..db18124d 100644
--- a/src/common/windows/string_utils-inl.h
+++ b/src/common/windows/string_utils-inl.h
@@ -49,6 +49,15 @@
#define WIN_STRING_FORMAT_LL "I64"
#endif // MSC_VER >= 1400
+// A nonconforming version of swprintf, without the length argument, was
+// included with the CRT prior to MSVC8. Although a conforming version was
+// also available via an overload, it is not reliably chosen. _snwprintf
+// behaves as a standards-confirming swprintf should, so force the use of
+// _snwprintf when using older CRTs.
+#if _MSC_VER < 1400 // MSVC 2005/8
+#define swprintf _snwprintf
+#endif // MSC_VER < 1400
+
namespace google_breakpad {
using std::string;