# File lib/ffi/ffi.rb, line 60 def self.map_library_name(lib) # Mangle the library name to reflect the native library naming conventions lib = Platform::LIBC if Platform::IS_LINUX && lib == 'c' if lib && File.basename(lib) == lib ext = ".#{Platform::LIBSUFFIX}" lib = Platform::LIBPREFIX + lib unless lib =~ /^#{Platform::LIBPREFIX}/ lib += ext unless lib =~ /#{ext}/ end lib end