[Groonga-commit] groonga/groonga at 1383015 [master] Use _strnicmp() if both HAVE_STRNCASECMP and HAVE__STRNICMP are defined

Back to archive index

susumu.yata null+****@clear*****
Mon Jun 2 16:16:49 JST 2014


susumu.yata	2014-06-02 16:16:49 +0900 (Mon, 02 Jun 2014)

  New Revision: 1383015bf986019c53dc77a4c6676c470aef802b
  https://github.com/groonga/groonga/commit/1383015bf986019c53dc77a4c6676c470aef802b

  Message:
    Use _strnicmp() if both HAVE_STRNCASECMP and HAVE__STRNICMP are defined
    
    This change fixes a build error of MariaDB 10.0.11 with Mroonga 4.03 on
    Windows + Visual C++.
    
    Redmine: fixes #2582

  Modified files:
    plugins/query_expanders/tsv.c
    plugins/suggest/suggest.c

  Modified: plugins/query_expanders/tsv.c (+3 -5)
===================================================================
--- plugins/query_expanders/tsv.c    2014-06-02 09:41:09 +0900 (5d521eb)
+++ plugins/query_expanders/tsv.c    2014-06-02 16:16:49 +0900 (6b1fc51)
@@ -25,11 +25,9 @@
 #include <stdio.h>
 #include <string.h>
 
-#ifndef HAVE_STRNCASECMP
-# ifdef HAVE__STRNICMP
-#  define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n)
-# endif /* HAVE__STRNICMP */
-#endif /* HAVE_STRNCASECMP */
+#ifdef HAVE__STRNICMP
+# define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n)
+#endif /* HAVE__STRNICMP */
 
 #define MAX_SYNONYM_BYTES 4096
 

  Modified: plugins/suggest/suggest.c (+3 -5)
===================================================================
--- plugins/suggest/suggest.c    2014-06-02 09:41:09 +0900 (25961a3)
+++ plugins/suggest/suggest.c    2014-06-02 16:16:49 +0900 (10149cd)
@@ -23,11 +23,9 @@
 #include <groonga/plugin.h>
 #include <string.h>
 
-#ifndef HAVE_STRNCASECMP
-# ifdef HAVE__STRNICMP
-#  define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n)
-# endif /* HAVE__STRNICMP */
-#endif /* HAVE_STRNCASECMP */
+#ifdef HAVE__STRNICMP
+# define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n)
+#endif /* HAVE__STRNICMP */
 
 #define VAR GRN_PROC_GET_VAR_BY_OFFSET
 #define CONST_STR_LEN(x) x, x ? sizeof(x) - 1 : 0
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index