diff options
| -rw-r--r-- | mrbgems/mruby-bin-mirb/tools/mirb/mirb.c | 2 | ||||
| -rw-r--r-- | src/error.h | 2 | ||||
| -rw-r--r-- | src/numeric.c | 2 | ||||
| -rw-r--r-- | tasks/mruby_build.rake | 10 |
4 files changed, 11 insertions, 5 deletions
diff --git a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c index a9d6850a5..b204c8e2d 100644 --- a/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +++ b/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c @@ -218,6 +218,7 @@ print_hint(void) printf("mirb - Embeddable Interactive Ruby Shell\n\n"); } +#ifndef ENABLE_READLINE /* Print the command line prompt of the REPL */ static void print_cmdline(int code_block_open) @@ -229,6 +230,7 @@ print_cmdline(int code_block_open) printf("> "); } } +#endif void mrb_codedump_all(mrb_state*, struct RProc*); diff --git a/src/error.h b/src/error.h index 3ff495266..0e0dacf63 100644 --- a/src/error.h +++ b/src/error.h @@ -1 +1,3 @@ +/* this header file is to be removed soon. + added for compatibility purpose (1.0.0) */ #include "mruby/error.h" diff --git a/src/numeric.c b/src/numeric.c index a8c483148..ec7f05b97 100644 --- a/src/numeric.c +++ b/src/numeric.c @@ -136,6 +136,7 @@ mrb_flo_to_str(mrb_state *mrb, mrb_value flo) mrb_bool e = FALSE; char s[48]; char *c = &s[0]; + int length = 0; if (n < 0) { n = -n; @@ -145,7 +146,6 @@ mrb_flo_to_str(mrb_state *mrb, mrb_value flo) exp = (n > 1) ? floor(log10(n)) : -ceil(-log10(n)); /* preserve significands */ - int length = 0; if (exp < 0) { int i, beg = -1, end = 0; double f = n; diff --git a/tasks/mruby_build.rake b/tasks/mruby_build.rake index c92400cf9..b7efa96b9 100644 --- a/tasks/mruby_build.rake +++ b/tasks/mruby_build.rake @@ -52,7 +52,7 @@ module MRuby Exts = Struct.new(:object, :executable, :library) - def initialize(name='host', &block) + def initialize(name='host', build_dir=nil, &block) @name = name.to_s unless MRuby.targets[@name] @@ -62,9 +62,11 @@ module MRuby @exts = Exts.new('.o', '', '.a') end + build_dir = build_dir || ENV['MRUBY_BUILD_DIR'] || "#{MRUBY_ROOT}/build" + @file_separator = '/' - @build_dir = "#{MRUBY_ROOT}/build/#{@name}" - @gem_clone_dir = "#{MRUBY_ROOT}/build/mrbgems" + @build_dir = "#{build_dir}/#{@name}" + @gem_clone_dir = "#{build_dir}/mrbgems" @cc = Command::Compiler.new(self, %w(.c)) @cxx = Command::Compiler.new(self, %w(.cc .cxx .cpp)) @objc = Command::Compiler.new(self, %w(.m)) @@ -204,7 +206,7 @@ module MRuby class CrossBuild < Build attr_block %w(test_runner) - def initialize(name, &block) + def initialize(name, build_dir=nil, &block) @test_runner = Command::CrossTestRunner.new(self) super end |
