--- lib/strequal.h.orig 2013-02-08 09:04:39.000000000 -0800
+++ lib/strequal.h 2013-02-08 09:05:41.000000000 -0800
@@ -35,9 +35,10 @@
/ case insensitive strstr() /
char Curl_strcasestr(const char haystack, const char *needle);
-#ifndef HAVE_STRLCAT
+#ifdef HAVE_STRLCAT
+#include <string.h>
+#else
#define strlcat(x,y,z) Curl_strlcat(x,y,z)
#endif
-size_t strlcat(char dst, const char src, size_t siz);</string.h>
#endif
It isn't quite that simple I believe. Many systems don't have a strlcat() in string.h. I believe we have build combinations where the strlcat() configure finds is actually provided by one of 3rd party libraries (one of the krb libs iirc)
Are you suggesting that your change makes any real difference apart from being "more correct" to some level?
It makes a real difference in instances where strlcat() is actually implemented as a macro in system headers and <string.h> is included before "strequal.h" ... this will likely become more of a problem as more systems support _FORTIFY_SOURCE for strlcpy and strlcat which is being supported now on clang/llvm trunk.</string.h>
Thanks, I'm now working on removing the strlcat() implementation and the two remaining uses of it. I posted a patch on this list about it:
http://curl.haxx.se/mail/lib-2013-02/0214.html
This commit is now pushed and this bug report is thereby also addressed. Thanks for your report!
Thanks. FWIW, I reviewed the src changes, and they look good.