[Groonga-commit] groonga/groonga at 42925b3 [master] Make the default IO version customizable via environment variable

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Jan 17 16:17:46 JST 2015


Kouhei Sutou	2015-01-17 16:17:46 +0900 (Sat, 17 Jan 2015)

  New Revision: 42925b3b6b22ec2271416f0b732f90349f1eff0a
  https://github.com/groonga/groonga/commit/42925b3b6b22ec2271416f0b732f90349f1eff0a

  Message:
    Make the default IO version customizable via environment variable
    
    For example, "GRN_IO_VERSION=1 groonga ...".

  Modified files:
    lib/io.c

  Modified: lib/io.c (+8 -0)
===================================================================
--- lib/io.c    2015-01-17 16:16:57 +0900 (812199d)
+++ lib/io.c    2015-01-17 16:17:46 +0900 (a5e57dd)
@@ -17,6 +17,7 @@
 
 #include "grn.h"
 
+#include <stdlib.h>
 #include <stdio.h>
 #include <fcntl.h>
 #include <string.h>
@@ -105,6 +106,13 @@ inline static grn_rc grn_pwrite(grn_ctx *ctx, fileinfo *fi, void *buf, size_t co
 grn_rc
 grn_io_init(void)
 {
+  const char *version_env;
+
+  version_env = getenv("GRN_IO_VERSION");
+  if (version_env) {
+    grn_io_version_default = atoi(version_env);
+  }
+
   return GRN_SUCCESS;
 }
 
-------------- next part --------------
HTML����������������������������...
Download 



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