Kouhei Sutou
null+****@clear*****
Sat Jan 10 12:24:05 JST 2015
Kouhei Sutou 2015-01-10 12:24:05 +0900 (Sat, 10 Jan 2015) New Revision: 365080ebe58ee9322c08800323badc39f8cbcda2 https://github.com/groonga/groonga/commit/365080ebe58ee9322c08800323badc39f8cbcda2 Message: Suppress warnings on MinGW grn.h:133:0: warning: "strcasecmp" redefined # define strcasecmp(s1, s2) _stricmp(s1, s2) ^ In file included from /usr/share/mingw-w64/include/guiddef.h:148:0, from /usr/share/mingw-w64/include/winnt.h:602, from /usr/share/mingw-w64/include/minwindef.h:146, from /usr/share/mingw-w64/include/windef.h:8, from /usr/share/mingw-w64/include/windows.h:69, from /usr/share/mingw-w64/include/winsock2.h:23, from grn.h:103, from db.c:17: /usr/share/mingw-w64/include/string.h:107:0: note: this is the location of the previous definition #define strcasecmp _stricmp ^ suggest.c:27:0: warning: "strncasecmp" redefined # define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n) ^ In file included from /usr/share/mingw-w64/include/guiddef.h:148:0, from /usr/share/mingw-w64/include/winnt.h:602, from /usr/share/mingw-w64/include/minwindef.h:146, from /usr/share/mingw-w64/include/windef.h:8, from /usr/share/mingw-w64/include/windows.h:69, from /usr/share/mingw-w64/include/winsock2.h:23, from ../../lib/grn.h:103, from ../../lib/grn_ctx.h:21, from suggest.c:18: Modified files: lib/grn.h plugins/query_expanders/tsv.c plugins/suggest/suggest.c src/groonga.c Modified: lib/grn.h (+3 -0) =================================================================== --- lib/grn.h 2015-01-09 23:53:58 +0900 (b7f78e2) +++ lib/grn.h 2015-01-10 12:24:05 +0900 (9de9948) @@ -130,6 +130,9 @@ # define fstat(fd, buf) _fstat(fd, buf) # endif /* !defined(__GNUC__) && _MSC_VER < 1400 */ # ifdef HAVE__STRICMP +# ifdef strcasecmp +# undef strcasecmp +# endif /* strcasecmp */ # define strcasecmp(s1, s2) _stricmp(s1, s2) # endif /* defined(HAVE__STRICMP) */ Modified: plugins/query_expanders/tsv.c (+3 -0) =================================================================== --- plugins/query_expanders/tsv.c 2015-01-09 23:53:58 +0900 (8adc13a) +++ plugins/query_expanders/tsv.c 2015-01-10 12:24:05 +0900 (1b9f177) @@ -26,6 +26,9 @@ #include <string.h> #ifdef HAVE__STRNICMP +# ifdef strncasecmp +# undef strncasecmp +# endif /* strncasecmp */ # define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n) #endif /* HAVE__STRNICMP */ Modified: plugins/suggest/suggest.c (+5 -1) =================================================================== --- plugins/suggest/suggest.c 2015-01-09 23:53:58 +0900 (955698b) +++ plugins/suggest/suggest.c 2015-01-10 12:24:05 +0900 (7c64539) @@ -15,15 +15,19 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <string.h> + #include "grn_ctx.h" #include "grn_db.h" #include "grn_ii.h" #include "grn_token_cursor.h" #include "grn_output.h" #include <groonga/plugin.h> -#include <string.h> #ifdef HAVE__STRNICMP +# ifdef strncasecmp +# undef strncasecmp +# endif /* strcasecmp */ # define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n) #endif /* HAVE__STRNICMP */ Modified: src/groonga.c (+8 -4) =================================================================== --- src/groonga.c 2015-01-09 23:53:58 +0900 (ee6f06c) +++ src/groonga.c 2015-01-10 12:24:05 +0900 (bebcb8e) @@ -16,6 +16,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ +#include <string.h> +#include <stdio.h> +#include <ctype.h> +#include <fcntl.h> + #ifdef WIN32 # define GROONGA_MAIN #endif /* WIN32 */ @@ -27,10 +32,6 @@ #include <grn_db.h> #include <grn_util.h> -#include <string.h> -#include <stdio.h> -#include <ctype.h> -#include <fcntl.h> #ifdef HAVE_SYS_WAIT_H # include <sys/wait.h> #endif /* HAVE_SYS_WAIT_H */ @@ -54,6 +55,9 @@ #endif /* HAVE_IO_H */ #ifdef HAVE__STRNICMP +# ifdef strncasecmp +# undef strncasecmp +# endif /* strcasecmp */ # define strncasecmp(s1,s2,n) _strnicmp(s1,s2,n) #endif /* HAVE__STRNICMP */ -------------- next part -------------- HTML����������������������������...Download