r117 - in trunk/varnish-cache: . lib/libcompat

des at projects.linpro.no des at projects.linpro.no
Tue Apr 4 12:35:49 CEST 2006


Author: des
Date: 2006-04-04 12:35:49 +0200 (Tue, 04 Apr 2006)
New Revision: 117

Modified:
   trunk/varnish-cache/configure.ac
   trunk/varnish-cache/lib/libcompat/Makefile.am
   trunk/varnish-cache/lib/libcompat/strlcat.c
   trunk/varnish-cache/lib/libcompat/strlcpy.c
Log:
I can't get AM_CONDITIONAL to work properly, so use a bigger hammer.


Modified: trunk/varnish-cache/configure.ac
===================================================================
--- trunk/varnish-cache/configure.ac	2006-04-04 10:09:37 UTC (rev 116)
+++ trunk/varnish-cache/configure.ac	2006-04-04 10:35:49 UTC (rev 117)
@@ -61,9 +61,7 @@
 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

Modified: trunk/varnish-cache/lib/libcompat/Makefile.am
===================================================================
--- trunk/varnish-cache/lib/libcompat/Makefile.am	2006-04-04 10:09:37 UTC (rev 116)
+++ trunk/varnish-cache/lib/libcompat/Makefile.am	2006-04-04 10:35:49 UTC (rev 117)
@@ -4,12 +4,6 @@
 
 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

Modified: trunk/varnish-cache/lib/libcompat/strlcat.c
===================================================================
--- trunk/varnish-cache/lib/libcompat/strlcat.c	2006-04-04 10:09:37 UTC (rev 116)
+++ trunk/varnish-cache/lib/libcompat/strlcat.c	2006-04-04 10:35:49 UTC (rev 117)
@@ -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 @@
 
 	return(dlen + (s - src));	/* count does not include NUL */
 }
+#endif

Modified: trunk/varnish-cache/lib/libcompat/strlcpy.c
===================================================================
--- trunk/varnish-cache/lib/libcompat/strlcpy.c	2006-04-04 10:09:37 UTC (rev 116)
+++ trunk/varnish-cache/lib/libcompat/strlcpy.c	2006-04-04 10:35:49 UTC (rev 117)
@@ -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 @@
 
 	return(s - src - 1);	/* count does not include NUL */
 }
+#endif




More information about the varnish-commit mailing list