conditionally build strnlen if needed.
it is only used by strndup prodded by Sortie@
This commit is contained in:
parent
c95574be92
commit
00b51d5c25
@ -72,6 +72,11 @@ AC_CHECK_FUNC(strndup,
|
||||
AC_DEFINE(NO_STRNDUP)
|
||||
AM_CONDITIONAL(NO_STRNDUP, true))
|
||||
|
||||
AC_CHECK_FUNC(strnlen,
|
||||
AM_CONDITIONAL(NO_STRNLEN, false),
|
||||
AC_DEFINE(NO_STRNLEN)
|
||||
AM_CONDITIONAL(NO_STRNLEN, true))
|
||||
|
||||
AC_CHECK_FUNC(asprintf,
|
||||
AM_CONDITIONAL(NO_ASPRINTF, false),
|
||||
AC_DEFINE(NO_ASPRINTF)
|
||||
|
@ -35,8 +35,10 @@ endif
|
||||
|
||||
if NO_STRNDUP
|
||||
libcompat_la_SOURCES += compat/strndup.c
|
||||
if NO_STRNLEN
|
||||
libcompat_la_SOURCES += compat/strnlen.c
|
||||
endif
|
||||
endif
|
||||
|
||||
if NO_ASPRINTF
|
||||
libcompat_la_SOURCES += compat/bsd-asprintf.c
|
||||
|
@ -22,8 +22,10 @@ size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
|
||||
#ifdef NO_STRNDUP
|
||||
char * strndup(const char *str, size_t maxlen);
|
||||
#ifdef NO_STRNLEN
|
||||
size_t strnlen(const char *str, size_t maxlen);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef NO_EXPLICIT_BZERO
|
||||
void explicit_bzero(void *, size_t);
|
||||
|
Loading…
Reference in New Issue
Block a user