[Commits] [SCM] claws branch, litehtml, updated. 3.17.3-58-g98f43b1

ticho at claws-mail.org ticho at claws-mail.org
Fri Jan 25 23:32:06 CET 2019


The branch, litehtml has been updated
       via  98f43b1f6806cba422527a71756161e016c4d0ae (commit)
      from  2330467b71e9a4982f3dd35977449ac62f61d9a7 (commit)

Summary of changes:
 configure.ac       |    2 +-
 src/common/utils.c |    2 ++
 src/common/utils.h |    2 ++
 3 files changed, 5 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 98f43b1f6806cba422527a71756161e016c4d0ae
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Fri Jan 25 23:27:18 2019 +0100

    Do not define our own strcasestr() if it is available

diff --git a/configure.ac b/configure.ac
index aada40b..54b6677 100644
--- a/configure.ac
+++ b/configure.ac
@@ -420,7 +420,7 @@ AC_CHECK_SIZEOF(unsigned long, 4)
 
 dnl Checks for library functions.
 AC_FUNC_ALLOCA
-AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \
+AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr strcasestr \
 	       uname flock lockf inet_aton inet_addr \
 	       fchmod mkstemp truncate getuid regcomp)
 
diff --git a/src/common/utils.c b/src/common/utils.c
index ec87994..d0ac1e1 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -300,6 +300,7 @@ gchar *strcrchomp(gchar *str)
 	return str;
 }
 
+#ifndef HAVE_STRCASESTR
 /* Similar to `strstr' but this function ignores the case of both strings.  */
 gchar *strcasestr(const gchar *haystack, const gchar *needle)
 {
@@ -307,6 +308,7 @@ gchar *strcasestr(const gchar *haystack, const gchar *needle)
 
 	return strncasestr(haystack, haystack_len, needle);
 }
+#endif /* HAVE_STRCASESTR */
 
 gchar *strncasestr(const gchar *haystack, gint haystack_len, const gchar *needle)
 {
diff --git a/src/common/utils.h b/src/common/utils.h
index d51cc00..94ca57d 100644
--- a/src/common/utils.h
+++ b/src/common/utils.h
@@ -280,8 +280,10 @@ gchar *strretchomp	(gchar		*str);
 gchar *strtailchomp	(gchar		*str,
 			 gchar		 tail_char);
 gchar *strcrchomp	(gchar		*str);
+#ifndef HAVE_STRCASESTR
 gchar *strcasestr	(const gchar	*haystack,
 			 const gchar	*needle);
+#endif /* HAVE_STRCASESTR */
 gchar *strncasestr	(const gchar	*haystack,
 			 gint		 haystack_len,
 			 const gchar	*needle);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list