HAYASHI Kentaro
null+****@clear*****
Thu Oct 4 13:48:22 JST 2012
HAYASHI Kentaro 2012-10-04 13:48:22 +0900 (Thu, 04 Oct 2012) New Revision: 7d39b3039a828f6d5a87fbf1c7a89502fa8fe20f https://github.com/mroonga/mroonga/commit/7d39b3039a828f6d5a87fbf1c7a89502fa8fe20f Log: win32: use _mkdir instead of mkdir on windows refs #1496 This POSIX function is deprecated beginning in Visual C++ 2005. Use the ISO C++ conformant _mkdir instead. See: http://msdn.microsoft.com/en-US/library/ms235326%28v=vs.80%29.aspx Modified files: ha_mroonga.cpp Modified: ha_mroonga.cpp (+4 -1) =================================================================== --- ha_mroonga.cpp 2012-10-04 13:15:38 +0900 (c167409) +++ ha_mroonga.cpp 2012-10-04 13:48:22 +0900 (d445bf1) @@ -41,9 +41,12 @@ #ifndef WIN32 # include <dirent.h> # include <unistd.h> +#define MRN_MKDIR(pathname, mode) mkdir((pathname), (mode)) #else # include <math.h> inline double round(double x) { return (floor(x + 0.5)); } +# include <direct.h> +#define MRN_MKDIR(pathname, mode) _mkdir((pathname)) #endif #include "mrn_err.h" @@ -7441,7 +7444,7 @@ void ha_mroonga::mkdir_p(const char *directory) if (stat(sub_directory, &directory_status) != 0) { DBUG_PRINT("info", ("mroonga: creating directory: <%s>", sub_directory)); GRN_LOG(ctx, GRN_LOG_INFO, "creating directory: <%s>", sub_directory); - if (mkdir(sub_directory, S_IRWXU) == 0) { + if (MRN_MKDIR(sub_directory, S_IRWXU) == 0) { DBUG_PRINT("info", ("mroonga: created directory: <%s>", sub_directory)); GRN_LOG(ctx, GRN_LOG_INFO, "created directory: <%s>", sub_directory); -------------- next part -------------- HTML����������������������������...Download