require 'mkmf' $:.unshift File.dirname(__FILE__) require 'type' if( ARGV.include?("--help") ) print <,, : maximum number of arguments of the function : maximum number of arguments of the callback : maximum number of callback entries EOF exit(0) end ($CPPFLAGS || $CFLAGS) << " -I." case RUBY_PLATFORM # from Win32API when /cygwin/,/mingw/ $CFLAGS << " -fno-defer-pop -fno-omit-frame-pointer" end if (Config::CONFIG['CC'] =~ /gcc/) && (Config::CONFIG['arch'] =~ /i.86/) $with_asm = true else $with_asm = false end $with_type_int = try_run(<,,\n") exit(1) end end max_arg ||= 6 max_cbarg ||= 3 max_cbent ||= 3 max_callback_type = types2num(DLTYPE.keys.sort[-1,1] * (max_cbarg + 1)) + 1 max_callback = max_cbent #m = [1].pack("i") #c,cs = m.unpack("c") #bigendian = (c == 0) #print("bigendian ... #{bigendian ? 'true' : 'false'}\n") $dlconfig_h = <