[cfe-commits] r137903 - in /cfe/trunk: include/clang/Basic/Builtins.def include/clang/Basic/DiagnosticSemaKinds.td include/clang/Sema/Sema.h lib/Sema/SemaChecking.cpp test/Sema/warn-strlcpycat-size.c

Ted Kremenek kremenek at apple.com
Thu Aug 18 13:15:17 PDT 2011


On Aug 17, 2011, at 7:42 PM, Benjamin Kramer wrote:

> 
> On 17.08.2011, at 19:21, Ted Kremenek wrote:
> 
>> I've gone and reverted the change, pending a fix to get it working on Windows.
>> 
>> I think the crux of the matter is the definition of strlen, strlcpy, and strlcat as built-ins, and that not being compatible with how they are defined on Windows.
>> 
>> If possible, could you provide me those definitions from Windows?  Thanks.
> 
> It's just size_t being int instead of long on windows (and possibly on other platforms)
> 
> Using a target neutral typedef for size_t (like "__SIZE_TYPE__" or "__typeof__(sizeof(int))")
> should make it work on windows.
> 
> - Ben

After looking at the patch again, I don't think this is the issue.  We are defining these builtins to use size_t.

I suspect it may be that these functions are deprecated on Windows.  I'm not certain how that is reflected in the Windows headers, so I'll need to log into a Windows box.



More information about the cfe-commits mailing list