0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-09-22 10:43:39 -04:00

Add strlcpy() function

Add strlcpy() function and implementation, and use configure to detect
if strlcpy() is natively available on the system.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
H. Peter Anvin
2009-08-10 15:56:52 -07:00
parent 767750b666
commit eaa68f1c85
8 changed files with 104 additions and 42 deletions

View File

@@ -100,6 +100,10 @@ int vsnprintf(char *, size_t, const char *, va_list);
# endif
#endif
#if !defined(HAVE_STRLCPY) || !HAVE_DECL_STRLCPY
size_t strlcpy(char *, const char *, size_t);
#endif
#ifndef __cplusplus /* C++ has false, true, bool as keywords */
# if defined(HAVE_STDBOOL_H) && defined(HAVE_WORKING_BOOL)
# include <stdbool.h>