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

Daniel Dunbar daniel at zuster.org
Mon Dec 21 17:17:56 PST 2009


This broke the MSVC build, please take a look.

 - Daniel

On Mon, Dec 21, 2009 at 12:19 PM, Anton Korobeynikov <asl at math.spbu.ru> wrote:
> Author: asl
> Date: Mon Dec 21 14:19:37 2009
> New Revision: 91842
>
> URL: http://llvm.org/viewvc/llvm-project?rev=91842&view=rev
> Log:
> Remove uber-gross hack. The define _snprintf to snprintf is invalid due to two reasons: 1. Accroding to C++ standard snprintf should be available in std namespace (and __gnu_cxx in case of GCC to). Such ifdef will change all snprintf's to _snprintf's, but won't bring snprintf to all necessary namespaces. Thus e.g. any locale-using code on mingw will yield an error (include this file + string to see the result) 2. MSVCRT's _snprintf does not comply with C99 standard. Standard one is snprintf.
>
> 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=91842&r1=91841&r2=91842&view=diff
>
> ==============================================================================
> --- llvm/trunk/include/llvm/Support/Format.h (original)
> +++ llvm/trunk/include/llvm/Support/Format.h Mon Dec 21 14:19:37 2009
> @@ -25,9 +25,6 @@
>
>  #include <cassert>
>  #include <cstdio>
> -#ifdef WIN32
> -#define snprintf _snprintf
> -#endif
>
>  namespace llvm {
>
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>




More information about the llvm-commits mailing list