From f2ad8e3121713f50f24c61b149b8653d3d6c16f6 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Mon, 25 Apr 2005 16:23:32 +0000 Subject: [PATCH] Define strncpy to an error to make sure it doesn't creep back in. --- include/winbase.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/winbase.h b/include/winbase.h index e25409a25da..d6a409cc95a 100644 --- a/include/winbase.h +++ b/include/winbase.h @@ -2065,6 +2065,10 @@ extern inline LPSTR WINAPI lstrcatA( LPSTR dst, LPCSTR src ) return strcat( dst, src ); } +/* strncpy doesn't do what you think, don't use it */ +#undef strncpy +#define strncpy(d,s,n) error do_not_use_strncpy_use_lstrcpynA_or_memcpy_instead + #endif /* !defined(WINE_NO_INLINE_STRING) && defined(__WINESRC__) */ #define lstrcat WINELIB_NAME_AW(lstrcat)