From 6d2d2a7e6ec87ed27344f90f713c27a2a525deea Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 20 May 2004 08:02:11 +0000 Subject: * lib/mkmf.rb (check_sizeof): define result size. [ruby-core:02911] * lib/mkmf.rb (create_header): macro name should not include equal sign. git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@6376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 13 ++++++++++--- lib/mkmf.rb | 4 ++-- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e3bfb1cf..2586033e0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,11 +1,18 @@ +Thu May 20 17:02:03 2004 Nobuyoshi Nakada + + * lib/mkmf.rb (check_sizeof): define result size. [ruby-core:02911] + + * lib/mkmf.rb (create_header): macro name should not include equal + sign. + Thu May 20 15:59:50 Hirokazu Yamamoto * ext/socket/socket.c: fix SEGV. [ruby-dev:23550] Thu May 20 14:35:52 2004 Tanaka Akira - * ext/socket/socket.c: check SCM_RIGHTS macro addition to - the msg_control field to test existence of file descriptor passing + * ext/socket/socket.c: check SCM_RIGHTS macro addition to + the msg_control field to test existence of file descriptor passing by msg_control. Thu May 20 12:38:06 2004 Yukihiro Matsumoto @@ -15,7 +22,7 @@ Thu May 20 12:38:06 2004 Yukihiro Matsumoto Thu May 20 12:34:39 2004 Dave Thomas - * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_visibility): + * lib/rdoc/parsers/parse_rb.rb (RDoc::RubyParser::parse_visibility): At Ryan Davis' suggestion, honor visibility modifers if guarded by a statement modifier diff --git a/lib/mkmf.rb b/lib/mkmf.rb index ed0203b9c..0f701e0a0 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -578,7 +578,7 @@ def check_sizeof(type, header = nil, &b) message "%s", m Logging::message "check_sizeof: %s--------------------\n", m if size = try_constant(expr, header, &b) - $defs.push(format("-DSIZEOF_%s", type.upcase.tr_s("^A-Z0-9_", "_"))) + $defs.push(format("-DSIZEOF_%s=%d", type.upcase.tr_s("^A-Z0-9_", "_"), size)) end message(a = size ? "#{size}\n" : "failed\n") Logging::message "-------------------- %s\n", a @@ -631,7 +631,7 @@ def create_header(header = "extconf.h") hfile.print "#ifndef #{sym}\n#define #{sym}\n" for line in $defs case line - when /^-D(.*)(?:=(.*))?/ + when /^-D([^=]+)(?:=(.*))?/ hfile.print "#define #$1 #{$2 || 1}\n" when /^-U(.*)/ hfile.print "#undef #$1\n" -- cgit