[Groonga-commit] groonga/groonga at 733fec5 [master] windows: use _stricmp() rather than strcasecmp()

Back to archive index

Kouhei Sutou null+****@clear*****
Fri Nov 28 11:26:44 JST 2014


Kouhei Sutou	2014-11-28 11:26:44 +0900 (Fri, 28 Nov 2014)

  New Revision: 733fec51b92029df434147414bb8e3b862304470
  https://github.com/groonga/groonga/commit/733fec51b92029df434147414bb8e3b862304470

  Message:
    windows: use _stricmp() rather than strcasecmp()
    
    If _stricmp() exists.
    
    GitHub: fix #251
    
    Reported by Hiroshi Hatake. Thanks!!!

  Modified files:
    build/ac_macros/check_functions.m4
    config.h.cmake
    lib/grn.h

  Modified: build/ac_macros/check_functions.m4 (+1 -0)
===================================================================
--- build/ac_macros/check_functions.m4    2014-11-27 18:46:34 +0900 (841d237)
+++ build/ac_macros/check_functions.m4    2014-11-28 11:26:44 +0900 (961a4fe)
@@ -1,5 +1,6 @@
 # -*- autoconf -*-
 
+AC_CHECK_FUNCS(_stricmp)
 AC_CHECK_FUNCS(_strnicmp)
 AC_CHECK_FUNCS(_strtoui64)
 AC_CHECK_FUNCS(close)

  Modified: config.h.cmake (+1 -0)
===================================================================
--- config.h.cmake    2014-11-27 18:46:34 +0900 (9f4023b)
+++ config.h.cmake    2014-11-28 11:26:44 +0900 (8efa7d1)
@@ -133,6 +133,7 @@
 #cmakedefine HAVE_MECAB_DICTIONARY_INFO_T
 
 /* functions */
+#cmakedefine HAVE__STRICMP
 #cmakedefine HAVE__STRNICMP
 #cmakedefine HAVE__STRTOUI64
 #cmakedefine HAVE_BACKTRACE

  Modified: lib/grn.h (+2 -2)
===================================================================
--- lib/grn.h    2014-11-27 18:46:34 +0900 (38c9d35)
+++ lib/grn.h    2014-11-28 11:26:44 +0900 (ab720ef)
@@ -129,9 +129,9 @@
 # if !defined(__GNUC__) && _MSC_VER < 1400
 #  define fstat(fd, buf) _fstat(fd, buf)
 # endif /* !defined(__GNUC__) && _MSC_VER < 1400 */
-# ifndef HAVE_STRCASECMP
+# ifdef HAVE__STRICMP
 #  define strcasecmp(s1, s2) _stricmp(s1, s2)
-# endif /* !defined(strcasecmp) */
+# endif /* defined(HAVE__STRICMP) */
 
 # ifdef __GNUC__
 #  include <stdint.h>
-------------- next part --------------
HTML����������������������������...
下載 



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