Commit c16b10fa authored by Dag Erling Smørgrav's avatar Dag Erling Smørgrav

I can't get AM_CONDITIONAL to work properly, so use a bigger hammer.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@117 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 9209a343
......@@ -61,9 +61,7 @@ AC_CHECK_FUNCS([strerror])
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
......
......@@ -4,12 +4,6 @@ INCLUDES = -I$(top_srcdir)/include
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
......@@ -23,6 +23,7 @@
#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
......@@ -57,3 +58,4 @@ strlcat(char *dst, const char *src, size_t siz)
return(dlen + (s - src)); /* count does not include NUL */
}
#endif
......@@ -23,6 +23,7 @@
#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).
......@@ -53,3 +54,4 @@ strlcpy(char *dst, const char *src, size_t siz)
return(s - src - 1); /* count does not include NUL */
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment