diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-13 16:03:15 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-02-13 16:03:15 +0000 |
commit | 829a44822d5e3fd4457f44c401d82eb14c52c8e9 (patch) | |
tree | 769c0b1007ca976ec66e03576e4abf78dcda287f /lib | |
parent | be1de4f8db9626be0341d588b6b36aaae06a52d2 (diff) | |
download | ruby-829a44822d5e3fd4457f44c401d82eb14c52c8e9.tar.gz |
* re.c (KR_REHASH): wrong hash value on sizeof(long) > sizeof(int).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5693 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/cgi.rb | 1 | ||||
-rw-r--r-- | lib/find.rb | 6 | ||||
-rw-r--r-- | lib/mkmf.rb | 20 |
3 files changed, 24 insertions, 3 deletions
diff --git a/lib/cgi.rb b/lib/cgi.rb index 5ec7e6a7b7..5b785bab3a 100644 --- a/lib/cgi.rb +++ b/lib/cgi.rb @@ -2318,3 +2318,4 @@ class CGI end # class CGI +? diff --git a/lib/find.rb b/lib/find.rb index e94d5c2c70..52efde81fd 100644 --- a/lib/find.rb +++ b/lib/find.rb @@ -36,8 +36,8 @@ module Find paths.collect!{|d| d.dup} while file = paths.shift catch(:prune) do - yield file.dup - file.untaint + next unless File.exist? file + yield file.dup.taint begin if File.lstat(file).directory? then d = Dir.open(file) @@ -51,7 +51,7 @@ module Find else f = File.join(file, f) end - paths.unshift f + paths.unshift f.untaint end ensure d.close diff --git a/lib/mkmf.rb b/lib/mkmf.rb index f9fe4608a3..6315e1f8bf 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -538,6 +538,26 @@ def have_header(header, &b) end end +def find_header(header, *paths) + checking_for header do + if try_cpp(cpp_include(header)) + true + else + found = false + paths.each do |dir| + opt = "-I#{dir}" + if try_cpp(cpp_include(header), opt) + $INCFLAGS += " " + $INCFLAGS += opt + found = true + break + end + end + found + end + end +end + def have_struct_member(type, member, header = nil, &b) checking_for "#{type}.#{member}" do if try_compile(<<"SRC", &b) |