Only declare strl{cpy,cat} if they aren't defines.

On some system (e.g. OS X Mavericks), those are defines to compiler
built-ins, thus trying to declare them will fail.
This commit is contained in:
Jonathan Schleifer 2013-12-17 17:48:03 +01:00 committed by Adrien Destugues
parent 70b978fd9f
commit a7d796e232

View File

@ -44,8 +44,12 @@ extern "C" {
#endif
// Is kernel-only under Linux.
#ifndef strlcpy
extern size_t strlcpy(char* dest, const char* source, size_t length);
#endif
#ifndef strlcat
extern size_t strlcat(char* dest, const char* source, size_t length);
#endif
#if defined(HAIKU_HOST_PLATFORM_FREEBSD) || defined(HAIKU_HOST_PLATFORM_DARWIN)
extern size_t strnlen(const char* string, size_t length);