Commit efaf7467 authored by Tomoyuki Sahara's avatar Tomoyuki Sahara

Merge pull request #42 from hone/path_separator

define PATH_SEPARATOR
parents 2d1134e9 ec4982b2
...@@ -47,6 +47,11 @@ ...@@ -47,6 +47,11 @@
#endif #endif
#define FILE_SEPARATOR "/" #define FILE_SEPARATOR "/"
#if defined(_WIN32) || defined(_WIN64)
#define PATH_SEPARATOR ";"
#else
#define PATH_SEPARATOR ":"
#endif
#ifndef LOCK_SH #ifndef LOCK_SH
#define LOCK_SH 1 #define LOCK_SH 1
...@@ -313,5 +318,7 @@ mrb_init_file(mrb_state *mrb) ...@@ -313,5 +318,7 @@ mrb_init_file(mrb_state *mrb)
mrb_define_const(mrb, cnst, "LOCK_UN", mrb_fixnum_value(LOCK_UN)); mrb_define_const(mrb, cnst, "LOCK_UN", mrb_fixnum_value(LOCK_UN));
mrb_define_const(mrb, cnst, "LOCK_NB", mrb_fixnum_value(LOCK_NB)); mrb_define_const(mrb, cnst, "LOCK_NB", mrb_fixnum_value(LOCK_NB));
mrb_define_const(mrb, cnst, "SEPARATOR", mrb_str_new_cstr(mrb, FILE_SEPARATOR)); mrb_define_const(mrb, cnst, "SEPARATOR", mrb_str_new_cstr(mrb, FILE_SEPARATOR));
mrb_define_const(mrb, cnst, "PATH_SEPARATOR", mrb_str_new_cstr(mrb, PATH_SEPARATOR));
mrb_define_const(mrb, cnst, "NULL", mrb_str_new_cstr(mrb, NULL_FILE)); mrb_define_const(mrb, cnst, "NULL", mrb_str_new_cstr(mrb, NULL_FILE));
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment