From 93472ba0ed10c2f8f17f648b8814b3731fca5c70 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 12 May 2004 10:59:52 +0000 Subject: [PATCH] * lib/mkmf.rb (have_type, check_sizeof): replace unusable characters. [ruby-talk:99788] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6297 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 11 ++++++++--- lib/mkmf.rb | 4 ++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef132b3a0b..39c82c6dd0 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed May 12 19:59:43 2004 Nobuyoshi Nakada + + * lib/mkmf.rb (have_type, check_sizeof): replace unusable characters. + [ruby-talk:99788] + Wed May 12 17:41:42 2004 Tanaka Akira * lib/resolv.rb (Resolv::DNS::Config): make it configurable without @@ -10,8 +15,8 @@ Wed May 12 14:37:27 2004 GOTOU Yuuzou Wed May 12 13:20:19 2004 Hidetoshi NAGAI - * ext/tk/lib/tk/composite.rb: improve configure methods (based on - the proposal of [ruby-talk:99671]). + * ext/tk/lib/tk/composite.rb: improve configure methods (based on + the proposal of [ruby-talk:99671]). Wed May 12 11:51:08 2004 Dave Thomas @@ -119,7 +124,7 @@ Thu May 6 14:22:29 2004 why the lucky stiff * lib/yaml/rubytypes.rb (to_yaml): added instance variable handling for Ranges, Strings, Structs, Regexps. - * lib/yaml/rubytypes.rb (to_yaml_fold): new method for setting a + * lib/yaml/rubytypes.rb (to_yaml_fold): new method for setting a String's flow style. * lib/yaml.rb (YAML::object_maker): now uses Object.allocate. diff --git a/lib/mkmf.rb b/lib/mkmf.rb index 2b0612d772..ddcb53d528 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -585,7 +585,7 @@ SRC /*top*/ static #{type} *t; SRC - $defs.push(format("-DHAVE_TYPE_%s", type.upcase)) + $defs.push(format("-DHAVE_TYPE_%s", type.upcase.tr_s("^A-Z0-9_", "_"))) true else false @@ -599,7 +599,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)) + $defs.push(format("-DSIZEOF_%s", type.upcase.tr_s("^A-Z0-9_", "_"))) end message(a = size ? "#{size}\n" : "failed\n") Logging::message "-------------------- %s\n", a