Navigation Menu

Skip to content

Commit

Permalink
Make the default IO version customizable via environment variable
Browse files Browse the repository at this point in the history
For example, "GRN_IO_VERSION=1 groonga ...".
  • Loading branch information
kou committed Jan 17, 2015
1 parent 23f0bf3 commit 42925b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/io.c
Expand Up @@ -17,6 +17,7 @@

#include "grn.h"

#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <string.h>
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 42925b3

Please sign in to comment.