[llvm-commits] [llvm] r81114 - in /llvm/trunk/lib/Support: regcomp.c regerror.c regutils.h

Benjamin Kramer benny.kra at googlemail.com
Sun Sep 6 06:09:38 PDT 2009


Am 06.09.2009 um 14:40 schrieb Török Edwin:

> On 2009-09-06 15:26, Benjamin Kramer wrote:
>> Author: d0k
>> Date: Sun Sep  6 07:26:28 2009
>> New Revision: 81114
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=81114&view=rev
>> Log:
>> More MSVC warning fixes:
>> 1. DUPMAX is defined in regcomp.c, no need to redefine it in  
>> regutils.
>> 2. MSVC doesn't like snprintf, use _snprintf instead.
>>
>
> MSVC's _snprintf isn't the same as POSIX snprintf, or has that changed
> lately?
> http://www.winehq.org/pipermail/wine-devel/2006-September/050751.html

Probably not.

> Anyway for reg* stuff I think its ok, they never use the return  
> value of
> snprintf,
> and the buffers are large enough.


There is another function called "sprintf_s" in MSVC >= 2005, but it  
looks
like it has even different semantics …

Maybe we should add a wrapper for _snprintf with the correct c99  
semantics
if it causes some problems. _snprintf is used as a replacement for  
snprintf
in "include/llvm/Support/Format.h" also.



More information about the llvm-commits mailing list