summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-02-13 13:18:43 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-02-14 10:41:45 +0100
commit358c5c0745a4c47f910189095f3832163b4708c4 (patch)
tree7e605f952fc16496ce4a0b5583c258466948d8e2 /m4
parentd821525cee3fb43f746fdebf6dcc2dd8daa2bb7f (diff)
downloadcurl-358c5c0745a4c47f910189095f3832163b4708c4.tar.gz
strlcat: remove function
This function was only used twice, both in places where performance isn't crucial (socks + if2ip). Removing the use of this function removes the need to have our private version for systems without it == reduced amount of code. Also, in the SOCKS case it is clearly better to fail gracefully rather than to truncate the results. This work was triggered by a bug report on the strcal prototype in strequal.h. strlcat was added in commit db70cd28 in February 2001! Bug: http://curl.haxx.se/bug/view.cgi?id=1192 Reported by: Jeremy Huddleston
Diffstat (limited to 'm4')
-rw-r--r--m4/curl-functions.m490
1 files changed, 2 insertions, 88 deletions
diff --git a/m4/curl-functions.m4 b/m4/curl-functions.m4
index 2a37d2e11..d3bff078d 100644
--- a/m4/curl-functions.m4
+++ b/m4/curl-functions.m4
@@ -5,7 +5,7 @@
# | (__| |_| | _ <| |___
# \___|\___/|_| \_\_____|
#
-# Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
@@ -21,7 +21,7 @@
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 72
+# serial 73
dnl CURL_INCLUDES_ARPA_INET
@@ -6472,92 +6472,6 @@ AC_DEFUN([CURL_CHECK_FUNC_STRICMP], [
fi
])
-
-dnl CURL_CHECK_FUNC_STRLCAT
-dnl -------------------------------------------------
-dnl Verify if strlcat is available, prototyped, and
-dnl can be compiled. If all of these are true, and
-dnl usage has not been previously disallowed with
-dnl shell variable curl_disallow_strlcat, then
-dnl HAVE_STRLCAT will be defined.
-
-AC_DEFUN([CURL_CHECK_FUNC_STRLCAT], [
- AC_REQUIRE([CURL_INCLUDES_STRING])dnl
- #
- tst_links_strlcat="unknown"
- tst_proto_strlcat="unknown"
- tst_compi_strlcat="unknown"
- tst_allow_strlcat="unknown"
- #
- AC_MSG_CHECKING([if strlcat can be linked])
- AC_LINK_IFELSE([
- AC_LANG_FUNC_LINK_TRY([strlcat])
- ],[
- AC_MSG_RESULT([yes])
- tst_links_strlcat="yes"
- ],[
- AC_MSG_RESULT([no])
- tst_links_strlcat="no"
- ])
- #
- if test "$tst_links_strlcat" = "yes"; then
- AC_MSG_CHECKING([if strlcat is prototyped])
- AC_EGREP_CPP([strlcat],[
- $curl_includes_string
- ],[
- AC_MSG_RESULT([yes])
- tst_proto_strlcat="yes"
- ],[
- AC_MSG_RESULT([no])
- tst_proto_strlcat="no"
- ])
- fi
- #
- if test "$tst_proto_strlcat" = "yes"; then
- AC_MSG_CHECKING([if strlcat is compilable])
- AC_COMPILE_IFELSE([
- AC_LANG_PROGRAM([[
- $curl_includes_string
- ]],[[
- if(0 != strlcat(0, 0, 0))
- return 1;
- ]])
- ],[
- AC_MSG_RESULT([yes])
- tst_compi_strlcat="yes"
- ],[
- AC_MSG_RESULT([no])
- tst_compi_strlcat="no"
- ])
- fi
- #
- if test "$tst_compi_strlcat" = "yes"; then
- AC_MSG_CHECKING([if strlcat usage allowed])
- if test "x$curl_disallow_strlcat" != "xyes"; then
- AC_MSG_RESULT([yes])
- tst_allow_strlcat="yes"
- else
- AC_MSG_RESULT([no])
- tst_allow_strlcat="no"
- fi
- fi
- #
- AC_MSG_CHECKING([if strlcat might be used])
- if test "$tst_links_strlcat" = "yes" &&
- test "$tst_proto_strlcat" = "yes" &&
- test "$tst_compi_strlcat" = "yes" &&
- test "$tst_allow_strlcat" = "yes"; then
- AC_MSG_RESULT([yes])
- AC_DEFINE_UNQUOTED(HAVE_STRLCAT, 1,
- [Define to 1 if you have the strlcat function.])
- ac_cv_func_strlcat="yes"
- else
- AC_MSG_RESULT([no])
- ac_cv_func_strlcat="no"
- fi
-])
-
-
dnl CURL_CHECK_FUNC_STRNCASECMP
dnl -------------------------------------------------
dnl Verify if strncasecmp is available, prototyped, and