method
try_const
v1_9_1_378 -
Show latest stable
- Class:
Object
try_const(const, headers = nil, opt = "", &b)public
No documentation available.
# File lib/mkmf.rb, line 930
def try_const(const, headers = nil, opt = "", &b)
const, type = *const
if try_compile(#{cpp_include(headers)}/*top*/typedef #{type || 'int'} conftest_type;conftest_type conftestval = #{type ? '' : '(int)'}#{const};, opt, &b)
$defs.push(format("-DHAVE_CONST_%s", const.tr_cpp))
true
else
false
end
end