]> err.no Git - varnish/commitdiff
I can't get AM_CONDITIONAL to work properly, so use a bigger hammer.
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 4 Apr 2006 10:35:49 +0000 (10:35 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 4 Apr 2006 10:35:49 +0000 (10:35 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@117 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/configure.ac
varnish-cache/lib/libcompat/Makefile.am
varnish-cache/lib/libcompat/strlcat.c
varnish-cache/lib/libcompat/strlcpy.c

index 33148721d603270f41db0362bc58414c1fb4cafd..bf4f81c8af3f08c79d8c6fd53c43231429541b69 100644 (file)
@@ -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
index 349c0b7df7154c3c1085f9d29e0262129ceac9d1..3dfb5858b501f016d46faf444141906837167a8c 100644 (file)
@@ -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
index d4003c82e6f5cf6eef702c3e12b6fff275166904..61aed9202dd5650ba899fc9bceea0ccf2dd7aed6 100644 (file)
@@ -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
index 963dd5ab961cd77149a334f8bc798a248a77283e..d167e45c48af3a46bc201a948b86448be5271b1e 100644 (file)
@@ -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