From: Michal Rokos Date: 2003-07-21T17:05:35+09:00 Subject: Re: [Ann] OSSL 0.2.0-pre3 This is a multi-part message in MIME format. --------------040505050300070100040701 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Hi again, I just forgot to note that for that diff you need patch mkmf.rb as well. Sorry. Use this diff. Michal --------------040505050300070100040701 Content-Type: text/plain; name="MKMF.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="MKMF.diff" Index: lib/mkmf.rb =================================================================== RCS file: /src/ruby/lib/mkmf.rb,v retrieving revision 1.137 diff -u -p -r1.137 mkmf.rb --- lib/mkmf.rb 18 Jul 2003 09:44:28 -0000 1.137 +++ lib/mkmf.rb 21 Jul 2003 06:25:34 -0000 @@ -434,7 +434,26 @@ def have_struct_member(type, member, hea int main() { return 0; } int s = (char *)&((#{type}*)0)->#{member} - (char *)0; SRC - $defs.push(format("-DHAVE_ST_%s", member.upcase)) + $defs.push(format("-DHAVE_ST_%s", member.upcase)) # compatibility - deprecated + $defs.push(format("-DHAVE_ST_%s_%s", type.upcase, member.upcase)) + true + else + false + end + end +end + +def have_defined(macro, header=nil) + checking_for "#{macro}" do + if try_compile(<<"SRC") +#{COMMON_HEADERS} +#{cpp_include(header)} +#if !defined(#{macro}) +# error #{macro} not defined +#endif +int main() { return 0; } +SRC + $defs.push(format("-DHAVE_%s", macro.upcase)) true else false --------------040505050300070100040701--