| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Some platforms do not implement the optional clock_gettime(). Need
to use the backend implementation instead.
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
|
|
|
|
| |
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
|
|
|
|
| |
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
|
|
|
|
| |
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes the signatures of the synchronization functions
to reflect the needs of the library rather than the signature of the
pthreads API. The mutex and condition variable attributes parameters
have been removed as no part of the core library makes use of them.
In addition, the condition variable timed-wait function has been modified
to accept the relative time passed in via libusb_wait_for_event(). This
allows the implementation-specific code to handle conversion to absolute
time as necessary, rather than forcing this to occur.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
| |
Closes #110
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This change add "libusb_" to every group and page definition (and
updates all references accordingly) so that generated man pages
are namespaced for libusb, thus avoiding possible conflict with
other packages.
Closes #131
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this commit, API functions taking a libusb_device_handle
argument had the parameter named dev, handle, or dev_handle. This
commit changes the name of all libusb_device_handle parameters to
dev_handle in both the documentation and actual code.
Closes #132
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
| |
Closes #139
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
| |
Closes #140
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
| |
This commit adds credentials checking to ensure that we only process
messages received from the kernel. In addition, the parsing logic
was cleaned up and slightly optimized.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
| |
Also addresses some minor whitespace and stylistic issues.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
| |
We always require <sys/socket.h> and do not need <linux/filter.h>.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
| |
Also moves private structure definition outside of header file.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
| |
Closes #145
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prior to this commit, the Windows and WinCE backends had a specific
shortcoming when loading DLLs, that being that once loaded they were
never unloaded. This commit improves this by providing a means to
unload the DLLs during cleanup.
Note that the use of GetModuleHandle() has been removed in favor of
the exclusive use of LoadLibrary(). This was done to ensure that a
reference count is taken against the loaded DLL, which guards against
some other part of the application unloading the DLL that libusb
is currently using.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
| |
1) Address a few more stylistic discrepancies
2) Add appropriate type casts for printf functions
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
| |
1) Make some variables static that are not used outside wince_usb.c
2) Minor stylistic changes to match the rest of the library source
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
1) Possible memory leak is avoided if htab_create() is called
while a hash table is already allocated
2) Error handling is simplified in windows_handle_events()
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
| |
The core library will not call the backend's exit() function if the
init() function does not succeed, so keeping track of whether init()
successfully completed is redundant.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
| |
This commit sorts the source and header files by name (for easier
human parsing), adds windows_nt_common.c to the 2010 and 2012
projects, and removes some CPP defines that should not be present
in the libusb_static_2015.vcxproj file.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit addresses a few different issues:
1) Whitespace made consistent with the rest of the library source
2) Formatting of function and variable declarations made consistent
with the rest of the library source
3) Functions and variables made static where possible
4) Definitions in header files moved if not used publicly
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
| |
Signed-off-by: Pavel Gurvich <pavel@daynix.com>
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
| |
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
| |
New files windows_nt_common.h/c introduced.
Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
libusb_get_configuration() has been broken when using a Linux kernel
that requires the use of usbfs to obtain the current configuration
value. This commit resolves this issue and also modifies the
usbfs_get_active_config() function to update the cached active
configuration value itself instead of requiring the callers to do it.
Closes #137
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
| |
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are some differences in how the DWORD type is defined between
native Windwos compilers and Cygwin where the former always uses long
and the latter uses long or int depending on the architecture. Since
the DWORD type is always 4 bytes, all uses of DWORD in printf are
cast to unsigned int, which consistently 4 bytes across all platforms.
Other mismatching printf format specifiers were also changed appropriately.
Additionally, a type cast is added for _beginthreadex on Cygwin.
Closes #106
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Cygwin does not define the latter in all versions, so this commit
uses the former POSIX function that Cygwin does provide.
Closes #104
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Modified from original to remove two unnecessary files and address
type-casting discrepancies across platforms.
Closes #60
Closes #83
Closes #120
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Integrate VirtualHub (VHHUB) in LibUSB, as per
http://libusb.6.n5.nabble.com/libusb-Patch-to-support-VirtualHere-td5714167.html
Closes #133
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
Fix spelling errors found by codespell, some of them in API
documentation and user visible messages.
Closes #102
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Haiku build was previously being done as a nested package
due to its C++ requirement, but for some reason setting SUBDIR
in an automake conditional breaks parallel builds. To fix this
and simplify the Haiku build process, this commit adds an
unconditional check for a C++ compiler using AC_PROG_CXX and
builds the Haiku sources as part of the main libusb project.
Note that AC_PROG_CXX itself does not cause the configure script
to fail if a C++ compiler is not found. Therefore on non-Haiku
platforms there is no requirement to have a C++ compiler installed
in order to build libusb.
Closes #121
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
| |
This new function will allow the user to purposely interrupt an
event handling thread, causing it to return from the event handling
function. This is mainly useful for cleanly exiting from a dedicated
event handling thread during application shutdown.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
This change introduces a new event_flags member to the libusb_context
that holds a bitmask of different events that have occurred. This will
allow multiple "one-shot" events (those that don't require counting) to
be stored in a single variable. The only existing event of this type,
pollfds_modified, has been converted to use this bitmask instead.
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the new USB stack Apple changed the underlying device class from
IOUSBDevice to IOUSBHostDevice. Additionally, they removed the PortNum
property from the IO registry entry. This commit add code to detect the
currently running xnu version. If the version is at least 15 (10.11.0)
the new device class is used to find usb devices and the port number
is read from the IOService parent of the USB device instead of the
PortNum property.
Closes #127
May have some effect on either #123 or #96.
Signed-off-by: Nathan Hjelm <hjelmn@me.com>
|