Project

General

Profile

Bug #12666 » fiddle-path.diff

use plain "libc.so" and "libm.so" with both BSD and Linux - kernigh (George Koehler), 11/04/2016 05:15 PM

View differences:

test/fiddle/helper.rb
when /cygwin/
libc_so = "cygwin1.dll"
libm_so = "cygwin1.dll"
when /x86_64-linux/
libc_so = "/lib64/libc.so.6"
libm_so = "/lib64/libm.so.6"
when /linux/
libdir = '/lib'
case [0].pack('L!').size
when 4
# 32-bit ruby
libdir = '/lib32' if File.directory? '/lib32'
when 8
# 64-bit ruby
libdir = '/lib64' if File.directory? '/lib64'
end
libc_so = File.join(libdir, "libc.so.6")
libm_so = File.join(libdir, "libm.so.6")
when /mingw/, /mswin/
require "rbconfig"
crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase'
......
when /darwin/
libc_so = "/usr/lib/libc.dylib"
libm_so = "/usr/lib/libm.dylib"
when /kfreebsd/
libc_so = "/lib/libc.so.0.1"
libm_so = "/lib/libm.so.1"
when /gnu/ #GNU/Hurd
libc_so = "/lib/libc.so.0.3"
libm_so = "/lib/libm.so.6"
when /mirbsd/
libc_so = "/usr/lib/libc.so.41.10"
libm_so = "/usr/lib/libm.so.7.0"
when /freebsd/
libc_so = "/lib/libc.so.7"
libm_so = "/lib/libm.so.5"
when /bsd|dragonfly/
libc_so = "/usr/lib/libc.so"
libm_so = "/usr/lib/libm.so"
when /bsd|dragonfly|linux/
libc_so = "libc.so"
libm_so = "libm.so"
when /solaris/
libdir = '/lib'
case [0].pack('L!').size
(1-1/2)