Define strncpyW to ensure that users know why it is not present.

This commit is contained in:
Jeff Latimer 2005-04-28 12:01:37 +00:00 committed by Alexandre Julliard
parent ece85e0cf0
commit 9a6a30141b
1 changed files with 3 additions and 0 deletions

View File

@ -191,6 +191,9 @@ static inline WCHAR *strcpyW( WCHAR *dst, const WCHAR *src )
return dst;
}
/* strncpy doesn't do what you think, don't use it */
#define strncpyW(d,s,n) error do_not_use_strncpyW_use_lstrcpynW_or_memcpy_instead
static inline int strcmpW( const WCHAR *str1, const WCHAR *str2 )
{
while (*str1 && (*str1 == *str2)) { str1++; str2++; }