[Groonga-commit] groonga/groonga [master] add O_BINARY flag to fix windows http server problem.

アーカイブの一覧に戻る

Shimomura Tatsuya null+****@clear*****
Sun Dec 9 10:07:02 JST 2012


Shimomura Tatsuya	2012-12-09 10:07:02 +0900 (Sun, 09 Dec 2012)

  New Revision: 27f08dbfa7ae44de2731835db1a2384251eebce6
  https://github.com/groonga/groonga/commit/27f08dbfa7ae44de2731835db1a2384251eebce6

  Merged e6775da: Merge pull request #47 from t-shm/http-server-windows

  Log:
    add O_BINARY flag to fix windows http server problem.

  Modified files:
    lib/proc.c

  Modified: lib/proc.c (+5 -1)
===================================================================
--- lib/proc.c    2012-12-05 11:47:22 +0900 (ec012fb)
+++ lib/proc.c    2012-12-09 10:07:02 +0900 (981ec58)
@@ -33,6 +33,10 @@
 #define O_NOFOLLOW 0
 #endif
 
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
+
 typedef grn_rc (*grn_substitute_term_func) (grn_ctx *ctx,
                                             const char *term,
                                             unsigned int term_len,
@@ -58,7 +62,7 @@ grn_bulk_put_from_file(grn_ctx *ctx, grn_obj *bulk, const char *path)
   /* FIXME: implement more smartly with grn_bulk */
   int fd, ret = 0;
   struct stat stat;
-  if ((fd = GRN_OPEN(path, O_RDONLY|O_NOFOLLOW)) == -1) {
+  if ((fd = GRN_OPEN(path, O_RDONLY|O_NOFOLLOW|O_BINARY)) == -1) {
     switch (errno) {
     case EACCES :
       ERR(GRN_OPERATION_NOT_PERMITTED, "request is not allowed: <%s>", path);
-------------- next part --------------
HTML����������������������������...
ダウンロード 



More information about the Groonga-commit mailing list
アーカイブの一覧に戻る