Bug #13069 » ruby-mkmf_openbsd.diff
lib/mkmf.rb | ||
---|---|---|
result = nil
|
||
Logging.postpone do |log|
|
||
output = IO.popen(libpath_env, command, &:read)
|
||
result = ($?.success? and File.zero?(log.path))
|
||
result = ($?.success? and log_harmless?(log.path))
|
||
output
|
||
end
|
||
result
|
||
... | ... | |
end
|
||
end
|
||
# Returns true when the log file given by +path+ is empty or contains nothing
|
||
# but harmless warnings.
|
||
def log_harmless? path
|
||
File.readlines(path).all? do |line|
|
||
line =~ /warning: \w+\(\) is .+ misused/
|
||
end
|
||
end
|
||
def log_src(src, heading="checked program was")
|
||
src = src.split(/^/)
|
||
fmt = "%#{src.size.to_s.size}d: %s"
|