From: Anton Korobeynikov Date: Tue, 22 Dec 2009 20:11:00 +0000 (+0000) Subject: Restore snprintf weirdness for VCPP only X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=4935a02101353bb317dd178230e9e76fc0f975ef;p=oota-llvm.git Restore snprintf weirdness for VCPP only git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91918 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/Format.h b/include/llvm/Support/Format.h index 164ad6a3533..f64e3db7d65 100644 --- a/include/llvm/Support/Format.h +++ b/include/llvm/Support/Format.h @@ -25,6 +25,14 @@ #include #include +#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 {