[Commits] [SCM] claws branch, master, updated. 3.17.3-50-gf6815a5

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


The branch, master has been updated
       via  f6815a5493265e271665bb92e50816afa17a874e (commit)
      from  bb47ceed807fb9880a1af0d9cef646f8c4ba49e9 (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 f6815a5493265e271665bb92e50816afa17a874e
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 2ac2aa7..f504316 100644
--- a/configure.ac
+++ b/configure.ac
@@ -419,7 +419,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 5cb5515..dbf3fd8 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 c063592..09db918 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