Navigation Menu

Skip to content

Commit

Permalink
Use _strnicmp() if both HAVE_STRNCASECMP and HAVE__STRNICMP are defined
Browse files Browse the repository at this point in the history
This change fixes a build error of MariaDB 10.0.11 with Mroonga 4.03 on
Windows + Visual C++.

Redmine: fixes #2582
  • Loading branch information
s-yata committed Jun 2, 2014
1 parent 497ed33 commit 1383015
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
8 changes: 3 additions & 5 deletions plugins/query_expanders/tsv.c
Expand Up @@ -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

Expand Down
8 changes: 3 additions & 5 deletions plugins/suggest/suggest.c
Expand Up @@ -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
Expand Down

0 comments on commit 1383015

Please sign in to comment.