From 3e5f70a8153f8ec955af1c6bc721f2e3ea1814a5 Mon Sep 17 00:00:00 2001 From: nobu Date: Fri, 9 Jun 2006 23:18:04 +0000 Subject: * math.c (log2): may be a macro. * parse.y (args, block_param, f_args): pass f_post_arg to #params. * util.c (powersOf10): constified. * ext/readline/readline.c: include extconf.h first. * ext/ripper/eventids2.c: removed tLAMBDA_ARG. * ext/tk/tcltklib.c (lib_fromUTF8_core): removed conflict. * ext/tk/tkutil/tkutil.c (cbsubst_get_subst_arg): rb_id2name() is defined as const now. * ext/win32ole/win32ole.c (fole_missing): ditto. * lib/mkmf.rb (create_makefile): force to create extconf header. * lib/optparse.rb (order!): use Proc#yield. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10238 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- math.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'math.c') diff --git a/math.c b/math.c index d7b264cccc..4cdcbc7471 100644 --- a/math.c +++ b/math.c @@ -322,12 +322,16 @@ math_log(int argc, VALUE *argv) return rb_float_new(d); } +#ifndef log2 #ifndef HAVE_LOG2 double log2(double x) { return log10(x)/log10(2.0); } +#else +extern double log2(double); +#endif #endif /* @@ -340,7 +344,6 @@ log2(double x) static VALUE math_log2(VALUE obj, VALUE x) { - extern double log2(double); double d; Need_Float(x); -- cgit v1.2.3