[llvm-commits] [llvm] r91918 - /llvm/trunk/include/llvm/Support/Format.h

Anton Korobeynikov asl at math.spbu.ru
Tue Dec 22 12:11:00 PST 2009


Author: asl
Date: Tue Dec 22 14:11:00 2009
New Revision: 91918

URL: http://llvm.org/viewvc/llvm-project?rev=91918&view=rev
Log:
Restore snprintf weirdness for VCPP only

Modified:
    llvm/trunk/include/llvm/Support/Format.h

Modified: llvm/trunk/include/llvm/Support/Format.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Format.h?rev=91918&r1=91917&r2=91918&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Support/Format.h (original)
+++ llvm/trunk/include/llvm/Support/Format.h Tue Dec 22 14:11:00 2009
@@ -25,6 +25,14 @@
 
 #include <cassert>
 #include <cstdio>
+#ifdef _MSC_VER
+// FIXME: This define is wrong:
+//  - _snprintf does not guarantee that trailing null is always added - if
+//    there is no space for null, it does not report any error.
+//  - According to C++ standard, snprintf should be visible in the 'std' 
+//    namespace - this define makes this impossible.
+#define snprintf _snprintf
+#endif
 
 namespace llvm {
 





More information about the llvm-commits mailing list