AC_FUNC_STRERROR_R
AC_CHECK_FUNCS([socket])
AC_CHECK_FUNCS([strlcat])
-AM_CONDITIONAL(HAVE_STRLCAT, test x$ac_strlcat = xtrue)
AC_CHECK_FUNCS([strlcpy])
-AM_CONDITIONAL(HAVE_STRLCPY, test x$ac_strlcpy = xtrue)
AC_CONFIG_FILES([
Makefile
lib_LIBRARIES = libcompat.a
-libcompat_a_SOURCES =
-
-if !HAVE_STRLCAT
-libcompat_a_SOURCES += strlcat.c
-endif
-
-if !HAVE_STRLCPY
-libcompat_a_SOURCES += strlcpy.c
-endif
+libcompat_a_SOURCES = \
+ strlcat.c \
+ strlcpy.c
#include "config.h"
#include "compat.h"
+#ifndef HAVE_STRLCAT
/*
* Appends src to string dst of size siz (unlike strncat, siz is the
* full size of dst, not space left). At most siz-1 characters
return(dlen + (s - src)); /* count does not include NUL */
}
+#endif
#include "config.h"
#include "compat.h"
+#ifndef HAVE_STRLCPY
/*
* Copy src to string dst of size siz. At most siz-1 characters
* will be copied. Always NUL terminates (unless siz == 0).
return(s - src - 1); /* count does not include NUL */
}
+#endif