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
10 10
when /cygwin/
11 11
  libc_so = "cygwin1.dll"
12 12
  libm_so = "cygwin1.dll"
13
when /x86_64-linux/
14
  libc_so = "/lib64/libc.so.6"
15
  libm_so = "/lib64/libm.so.6"
16
when /linux/
17
  libdir = '/lib'
18
  case [0].pack('L!').size
19
  when 4
20
    # 32-bit ruby
21
    libdir = '/lib32' if File.directory? '/lib32'
22
  when 8
23
    # 64-bit ruby
24
    libdir = '/lib64' if File.directory? '/lib64'
25
  end
26
  libc_so = File.join(libdir, "libc.so.6")
27
  libm_so = File.join(libdir, "libm.so.6")
28 13
when /mingw/, /mswin/
29 14
  require "rbconfig"
30 15
  crtname = RbConfig::CONFIG["RUBY_SO_NAME"][/msvc\w+/] || 'ucrtbase'
......
32 17
when /darwin/
33 18
  libc_so = "/usr/lib/libc.dylib"
34 19
  libm_so = "/usr/lib/libm.dylib"
35
when /kfreebsd/
36
  libc_so = "/lib/libc.so.0.1"
37
  libm_so = "/lib/libm.so.1"
38 20
when /gnu/	#GNU/Hurd
39 21
  libc_so = "/lib/libc.so.0.3"
40 22
  libm_so = "/lib/libm.so.6"
41
when /mirbsd/
42
  libc_so = "/usr/lib/libc.so.41.10"
43
  libm_so = "/usr/lib/libm.so.7.0"
44
when /freebsd/
45
  libc_so = "/lib/libc.so.7"
46
  libm_so = "/lib/libm.so.5"
47
when /bsd|dragonfly/
48
  libc_so = "/usr/lib/libc.so"
49
  libm_so = "/usr/lib/libm.so"
23
when /bsd|dragonfly|linux/
24
  libc_so = "libc.so"
25
  libm_so = "libm.so"
50 26
when /solaris/
51 27
  libdir = '/lib'
52 28
  case [0].pack('L!').size