[Groonga-commit] groonga/groonga [master] cmake windows: use _strtoui64() as replacement of strtoull()

Back to archive index

null+****@clear***** null+****@clear*****
2012年 5月 17日 (木) 22:24:16 JST


Kouhei Sutou	2012-05-17 22:24:16 +0900 (Thu, 17 May 2012)

  New Revision: ba028bee8954469db315fde0d5365ab35a0d78e3

  Log:
    cmake windows: use _strtoui64() as replacement of strtoull()

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

  Modified: build/ac_macros/check_functions.m4 (+2 -0)
===================================================================
--- build/ac_macros/check_functions.m4    2012-05-17 22:12:16 +0900 (708877e)
+++ build/ac_macros/check_functions.m4    2012-05-17 22:24:16 +0900 (35f09c6)
@@ -1,9 +1,11 @@
 # -*- autoconf -*-
 
+AC_CHECK_FUNCS(_strtoui64)
 AC_CHECK_FUNCS(close)
 AC_CHECK_FUNCS(gmtime_r)
 AC_CHECK_FUNCS(localtime_r)
 AC_CHECK_FUNCS(mkostemp)
 AC_CHECK_FUNCS(open)
 AC_CHECK_FUNCS(read)
+AC_CHECK_FUNCS(strtoull)
 AC_CHECK_FUNCS(write)

  Modified: config.h.cmake (+2 -0)
===================================================================
--- config.h.cmake    2012-05-17 22:12:16 +0900 (f3ca97d)
+++ config.h.cmake    2012-05-17 22:24:16 +0900 (138c8a7)
@@ -118,6 +118,7 @@
 #cmakedefine HAVE_MECAB_DICTIONARY_INFO_T
 
 /* functions */
+#cmakedefine HAVE__STRTOUI64
 #cmakedefine HAVE_BACKTRACE
 #cmakedefine HAVE_CLOCK
 #cmakedefine HAVE_CLOCK_GETTIME
@@ -128,4 +129,5 @@
 #cmakedefine HAVE_MKOSTEMP
 #cmakedefine HAVE_OPEN
 #cmakedefine HAVE_READ
+#cmakedefine HAVE_STRTOULL
 #cmakedefine HAVE_WRITE

  Modified: lib/groonga_in.h (+6 -0)
===================================================================
--- lib/groonga_in.h    2012-05-17 22:12:16 +0900 (88bd8d6)
+++ lib/groonga_in.h    2012-05-17 22:24:16 +0900 (5c09d56)
@@ -622,6 +622,12 @@ grn_str_greater(const uint8_t *ap, uint32_t as, const uint8_t *bp, uint32_t bs)
   ((grn_geo_point *)keybuf_)->longitude = lo;\
 } while (0)
 
+#ifndef HAVE_STRTOULL
+# ifdef HAVE__STRTOUI64
+#  define strtoull(nptr,endptr,base) _strtoui64(nptr,endptr,base)
+# endif /* HAVE__STRTOUI64 */
+#endif /* HAVE_STRTOULL */
+
 #ifdef USE_FUTEX
 #include <linux/futex.h>
 #include <sys/syscall.h>




Groonga-commit メーリングリストの案内
Back to archive index