Sha256: 393db2c4e372e84d0c7fe73cc7eaed0f1e7a006a1b9ea36fa010d46367c3a477
Contents?: true
Size: 328 Bytes
Versions: 35
Compression:
Stored size: 328 Bytes
Contents
#!/usr/bin/env ruby Dir.chdir(File.dirname($0)) f = File.open("const.cstub", "w") IO.readlines("const.def").each { |name| name.sub(/^#.*/, "") name.strip! next if name.empty? f.write <<CODE #if defined(#{name})#{name.start_with?('IPPROTO_') ? ' || defined(_WINSOCKAPI_)' : ''} define_const(#{name}); #endif CODE }
Version data entries
35 entries across 35 versions & 2 rubygems