Kouhei Sutou
null+****@clear*****
Fri Jun 12 09:44:15 JST 2015
Kouhei Sutou 2015-06-12 09:44:15 +0900 (Fri, 12 Jun 2015) New Revision: b743fb6a153e8ae0660bafa86d4e87a53ac299b4 https://github.com/groonga/groonga/commit/b743fb6a153e8ae0660bafa86d4e87a53ac299b4 Message: windows: report error from FlushViewOfFile() Modified files: lib/io.c Modified: lib/io.c (+9 -2) =================================================================== --- lib/io.c 2015-06-11 11:00:26 +0900 (e073984) +++ lib/io.c 2015-06-12 09:44:15 +0900 (e4528df) @@ -1645,8 +1645,15 @@ grn_fileinfo_opened(fileinfo *fi) inline static int grn_msync(grn_ctx *ctx, void *start, size_t length) { - /* return value may be wrong... */ - return FlushViewOfFile(start, length); + BOOL succeeded; + + succeeded = FlushViewOfFile(start, length); + if (succeeded) { + return 0; + } else { + SERR("FlushViewOfFile"); + return -1; + } } inline static grn_rc -------------- next part -------------- HTML����������������������������...Download