Created
November 30, 2012 23:43
-
-
Save r3n4ud/4179560 to your computer and use it in GitHub Desktop.
Revisions
-
r3n4ud revised this gist
Dec 2, 2012 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ typedef :pointer, :libusb_context typedef :pointer, :libusb_device_handle attach_function 'libusb_set_configuration', [:libusb_device_handle, :int], :int, :blocking=>true attach_function 'libusb_claim_interface', [:libusb_device_handle, :int], :int attach_function 'libusb_release_interface', [:libusb_device_handle, :int], :int, :blocking=>true […] attach_function 'libusb_handle_events', [:libusb_context], :int, :blocking=>true -
r3n4ud revised this gist
Nov 30, 2012 . No changes.There are no files selected for viewing
-
r3n4ud revised this gist
Nov 30, 2012 . No changes.There are no files selected for viewing
-
r3n4ud revised this gist
Nov 30, 2012 . No changes.There are no files selected for viewing
-
r3n4ud revised this gist
Nov 30, 2012 . 1 changed file with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ diff --git a/lib/libusb/call.rb b/lib/libusb/call.rb index e0604b7..252ee86 100644 --- a/lib/libusb/call.rb +++ b/lib/libusb/call.rb @@ -21,7 +21,7 @@ module LIBUSB module Call extend FFI::Library - if FFI::Platform.windows? + if FFI::Platform::OS == 'windows' bundled_dll = File.join(File.dirname(__FILE__), '..', 'libusb-1.0.dll') ffi_lib(['libusb-1.0', bundled_dll]) else -
r3n4ud renamed this gist
Nov 30, 2012 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
r3n4ud created this gist
Nov 30, 2012 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ diff --git a/lib/libusb/call.rb b/lib/libusb/call.rb index e0604b7..252ee86 100644 --- a/lib/libusb/call.rb +++ b/lib/libusb/call.rb @@ -21,7 +21,7 @@ module LIBUSB module Call extend FFI::Library - if FFI::Platform.windows? + if FFI::Platform::OS == 'windows' bundled_dll = File.join(File.dirname(__FILE__), '..', 'libusb-1.0.dll') ffi_lib(['libusb-1.0', bundled_dll]) else This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ $ ruby -rlibusb -e '' An exception occurred requiring command line files Unable to find foreign function '[:libusb_device_handle, :int]' (FFI::NotFoundError) Backtrace: FFI::Library(Module)#ffi_function_missing at kernel/delta/ffi.rb:9 FFI::Library(Module)#attach_function at kernel/platform/library.rb:130 LIBUSB::Call.__module_init__ (Call) at /home/renaud/.rbenv/versions/rbx-2.0.0-dev/gems/1.9/gems/libusb-0.2.2/lib/libusb/call.rb:192 LIBUSB.__module_init__ (LIBUSB) at /home/renaud/.rbenv/versions/rbx-2.0.0-dev/gems/1.9/gems/libusb-0.2.2/lib/libusb/call.rb:21 Object#__script__ at /home/renaud/.rbenv/versions/rbx-2.0.0-dev/gems/1.9/gems/libusb-0.2.2/lib/libusb/call.rb:19 Rubinius::CodeLoader.require at kernel/common/codeloader.rb:212 Kernel(Module)#gem_original_require (require) at kernel/common/kernel.rb:648 Kernel(Module)#require at /home/renaud/.rbenv/versions/rbx-2.0.0-dev/lib/rubygems/custom_require.rb:36 LIBUSB.__module_init__ (LIBUSB) at /home/renaud/.rbenv/versions/rbx-2.0.0-dev/gems/1.9/gems/libusb-0.2.2/lib/libusb.rb:19 Object#__script__ at /home/renaud/.rbenv/versions/rbx-2.0.0-dev/gems/1.9/gems/libusb-0.2.2/lib/libusb.rb:16 Rubinius::CodeLoader.require at kernel/common/codeloader.rb:212 Kernel(Rubinius::Loader)#gem_original_require (require) at kernel/common/kernel.rb:648 Kernel(Rubinius::Loader)#require at /home/renaud/.rbenv/versions/rbx-2.0.0-dev/lib/rubygems/custom_require.rb:60 { } in Rubinius::Loader#requires at kernel/loader.rb:568 Array#each at kernel/bootstrap/array.rb:68 Rubinius::Loader#requires at kernel/loader.rb:568 Rubinius::Loader#main at kernel/loader.rb:814