Sha256: b04e011906f99fdc00fec0d56ce551f1078576c8af3b9c67be8938f52c2bc989

Contents?: true

Size: 850 Bytes

Versions: 9

Compression:

Stored size: 850 Bytes

Contents

require 'mkmf'

dir_config('rdiscount')

HAVE_RANDOM = have_func('random')
HAVE_SRANDOM = have_func('srandom')
HAVE_RAND = have_func('rand')
HAVE_SRAND = have_func('srand')

def sized_int(size, types)
  types.find { |type| check_sizeof(type) == 4 } ||
    abort("no int with size #{size}")
end

DWORD = sized_int(4, ["unsigned long", "unsigned int"])
WORD =  sized_int(2, ["unsigned int", "unsigned short"])
BYTE = "unsigned char"
VERSION = IO.read('VERSION').strip

open(File.join(File.dirname(__FILE__), "ruby-config.h"), "wb") do |f|
  f.write <<-EOF
// These data types may be already defined if building on Windows (using MinGW)
#ifndef DWORD
  #define DWORD #{DWORD}
#endif
#ifndef WORD
  #define WORD #{WORD}
#endif
#ifndef BYTE
  #define BYTE #{BYTE}
#endif
  EOF
end

$defs.push("-DVERSION=\\\"#{VERSION}\\\"")

create_makefile('rdiscount')

Version data entries

9 entries across 8 versions & 2 rubygems

Version Path
rdiscount-2.1.7 ext/extconf.rb
challah-1.0.0 vendor/bundle/gems/rdiscount-2.1.6/ext/extconf.rb
rdiscount-2.1.6 ext/extconf.rb
challah-1.0.0.beta3 vendor/bundle/gems/rdiscount-2.0.7.2/ext/extconf.rb
challah-1.0.0.beta3 vendor/bundle/gems/rdiscount-2.0.7.3/ext/extconf.rb
rdiscount-2.0.7.3 ext/extconf.rb
challah-1.0.0.beta2 vendor/bundle/gems/rdiscount-2.0.7.2/ext/extconf.rb
challah-1.0.0.beta vendor/bundle/gems/rdiscount-2.0.7.2/ext/extconf.rb
rdiscount-2.0.7.2 ext/extconf.rb