summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-12 10:59:52 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-05-12 10:59:52 +0000
commit93472ba0ed10c2f8f17f648b8814b3731fca5c70 (patch)
tree0a74d5b35c0974c6c1c38f9c700f02d91e3cb9ad /lib
parentfbb8f1964a5c642ad2f520a3d3712b47feba9a14 (diff)
* 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
Diffstat (limited to 'lib')
-rw-r--r--lib/mkmf.rb4
1 files changed, 2 insertions, 2 deletions
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