[Groonga-mysql-commit] mroonga/mroonga [master] win32: support missing round function for Visual Studio

Back to archive index

HAYASHI Kentaro null+****@clear*****
Thu Oct 4 13:15:38 JST 2012


HAYASHI Kentaro	2012-10-04 13:15:38 +0900 (Thu, 04 Oct 2012)

  New Revision: 44b84b60e6994b6cc62be2e958f86be8d64c6469
  https://github.com/mroonga/mroonga/commit/44b84b60e6994b6cc62be2e958f86be8d64c6469

  Log:
    win32: support missing round function for Visual Studio
    
    refs #1496
    
    round function is missing on windows
    See: http://msdn.microsoft.com/en-US/library/7wsh95e5(v=vs.80).aspx

  Modified files:
    ha_mroonga.cpp

  Modified: ha_mroonga.cpp (+3 -0)
===================================================================
--- ha_mroonga.cpp    2012-09-28 19:24:19 +0900 (9f97a33)
+++ ha_mroonga.cpp    2012-10-04 13:15:38 +0900 (c167409)
@@ -41,6 +41,9 @@
 #ifndef WIN32
 #  include <dirent.h>
 #  include <unistd.h>
+#else
+#  include <math.h>
+inline double round(double x) { return (floor(x + 0.5)); }
 #endif
 
 #include "mrn_err.h"
-------------- next part --------------
HTML����������������������������...
Download 



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