commit a04cbb0095a78aeed3f65aaf06c46069d0ac184a
Author: Daniel Drake <dan@reactivated.net>
Date:   Tue May 4 19:01:59 2010 -0300

    v1.0.8 release

commit 53b47299531974fa8901b74a163f3c8ebae4eec9
Author: Daniel Drake <dan@reactivated.net>
Date:   Thu Apr 22 18:12:51 2010 -0300

    Linux: don't set SHORT_NOT_OK on bulk out URBs (#20
    
    Setting this flag is illegal, and the behaviour we're looking for
    is already in place for host-to-device transfers without this flag.

commit 1519828b7ee1fce46d4c51fc097d52e01b8e0bb4
Author: Daniel Drake <dan@reactivated.net>
Date:   Tue Apr 20 20:14:09 2010 -0300

    Linux: Handle failure to read active configuration during enumeration

commit 45168627cc15aee3875192f34286110dbbd27095
Author: Nathan Hjelm <hjelmn@me.com>
Date:   Tue Apr 20 19:43:06 2010 -0300

    Darwin: don't reuse cached descriptors during enumeration
    
    Descriptor reuse was causing scans to return invalid information when
    the device at a location has changed.

commit 3af329db6dcbfb96d24867c757f9e125e5b7b0e5
Author: Daniel Drake <dan@reactivated.net>
Date:   Mon Apr 19 19:36:55 2010 -0300

    v1.0.7 release

commit ceb8cacd6d2a4189de0db2ee46d45217511c69be
Author: Daniel Drake <dan@reactivated.net>
Date:   Mon Apr 19 19:31:12 2010 -0300

    Document that fd set contents are an internal implementation detail (#36)

commit 9bea500b5747bdeba7c8251d45608558e71a1db5
Author: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Date:   Mon Apr 19 19:22:46 2010 -0300

    Linux: correct config descriptor endianness fix
    
    The seek_to_next_config codepath deals with both sysfs and usbfs;
    make sure we only convert values in the usbfs path.

commit 02df59a309e813c50b8230de99e69fb4e1814279
Author: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Date:   Mon Apr 5 17:11:32 2010 +0200

    Linux: Fix endianness handling of usbfs config descriptors (#27)
    
    driver/usb/core/devio.c function usbdev_read translate the follwing files
    to CPU endianess:
    
    le16_to_cpus(&temp_desc.bcdUSB);
    le16_to_cpus(&temp_desc.idVendor);
    le16_to_cpus(&temp_desc.idProduct);
    le16_to_cpus(&temp_desc.bcdDevice);
    
    All other data is passed without any change.
    
    libusb/os/linux_usbfs.c calls usbi_parse_descriptor with host_endian=1
    for config descriptors. According to the kernel code, they must be
    processed with host_endian=0, as they are not translated by the kernel.
    
    Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>

commit ec303b01a5d4e51c000a283853af65059fa62285
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Tue Mar 23 16:22:08 2010 -0600

    Darwin: fix enumeration of devices with non-consecutive addresses (#23)

commit cd809e2f7cee3874b7ae16b2c482a8b63a90e4a5
Author: Bastien Nocera <hadess@hadess.net>
Date:   Mon Mar 8 10:50:51 2010 +0000

    Add more interface classes
    
    As used in bluez.

commit 1ce4aa67d849f5cad8a21072dc1c7b42158ce817
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Thu Mar 18 11:32:32 2010 -0600

    Darwin: Cleanup async callback code, catch request timeouts

commit 68af9f8d731f700267335941a8214d34ab518cc8
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Thu Mar 18 11:31:46 2010 -0600

    Darwin: fix endianness of control setup packet
    
    IOUSBLib expects the control request to be in host byte order.
    Swap the request into host byte order.

commit cfce4d127184f4e4f334976151a0f80594bb5e22
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Mon Feb 15 14:10:08 2010 -0600

    Darwin: fix memory leak in process_device
    
    Credit to Mike Colagrosso for finding this bug.

commit 161893cfbefefe315f657677705abe090fc526f2
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Mon Feb 15 14:09:19 2010 -0600

    Darwin: use logging functions
    
    Use usbi_warn, usbi_err, and usbi_info instead of _usbi_log.

commit 2a72f38548208044dc3aa62681419d006c35732d
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Mon Feb 15 14:07:44 2010 -0600

    Darwin: support multiple calls to libusb_init
    
    Credit to Orin Eman for finding this bug.

commit a4186794d87124503db2f5f51f51ce90bb95daa7
Author: Daniel Drake <dan@reactivated.net>
Date:   Sun Nov 22 17:20:53 2009 +0000

    v1.0.6 release

commit 8392ff22136fccaf1e15d186157609b8dd127bc5
Author: Ludovic Rousseau <rousseau@debian.org>
Date:   Sun Oct 25 10:06:41 2009 +0100

    lsusb example: make print_devs() static
    
    lsusb.c:26: warning: no previous prototype for ‘print_devs’

commit 9cc6bfaa15239bb6db1c1570b9beb6df2f848951
Author: Ludovic Rousseau <rousseau@debian.org>
Date:   Sun Oct 25 10:05:10 2009 +0100

    Darwin: fix warning in darwin_error_str()
    
    os/darwin_usb.c:63: warning: return discards qualifiers from pointer
    target type

commit 4c706d2fb6b2c43b10d72ac5dff51cac4d939f1a
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Sat Nov 21 17:06:43 2009 +0000

    Darwin: allow devices to be opened multiple times
    
    Allows libusb applications to access multiple interfaces of the same
    device in the same application.
    
    Also fixes a set alt interface bug.

commit 0232fc559cdacb9561f982dd6d28feb4435b3e4e
Author: Daniel Drake <dan@reactivated.net>
Date:   Sat Nov 21 17:01:32 2009 +0000

    Increase libusb_handle_events() timeout to 60 seconds
    
    The internal timing seems to be working, this will be a better test of
    it before we make this timeout unlimited.

commit 0bd7ef5d8697973a026c36c15d6276177b4ec4ea
Author: Daniel Drake <dan@reactivated.net>
Date:   Sat Nov 21 16:57:25 2009 +0000

    Refine timerfd header check (#18)
    
    Require glibc-2.9 for the working timerfd support.

commit 90d8fcab9018b8e6887a7e0592d1e5f692117234
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun Nov 15 12:17:13 2009 +0000

    v1.0.5 release

commit 11d591058e3f105b0e90c23bbf58b18de691e690
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Nov 7 10:43:59 2009 +0000

    Update documentation about early completion caveats

commit f796c9528a71aa55326b6f0c9c7c5ec073d2bf92
Author: Ludovic Rousseau <rousseau@debian.org>
Date:   Sun Oct 25 09:59:51 2009 +0100

    Add libusb_get_max_iso_packet_size() to libusb.h
    
    core.c:777: warning: no previous prototype for 'libusb_get_max_iso_packet_size'

commit 4783008b7e711de9cb31631e60dda995f44068de
Author: Daniel Drake <dsd@gentoo.org>
Date:   Wed Oct 28 20:33:49 2009 +0545

    Use timerfd for timeout handling
    
    Use a new file descriptor from the timerfd system calls to handle
    timeouts. On supported systems, this means that there is less hassle
    figuring out when the poll() timeout should be, since
    libusb_get_next_timeout() will always return 0 and the timeout events will
    be triggered as regular activity on the file descriptor set.
    
    Add API function libusb_pollfds_handle_timeouts() to detect whether
    you're on a platform with the timing headache, and flesh out the
    surrounding documentation.

commit 9b120c2b3735566533c179aa8ca758fe45899a38
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Nov 7 10:03:07 2009 +0000

    Use AM_SILENT_RULES for building

commit ef6ea6c3ae38e4524f10e16e8cb88177d39c4826
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri Nov 6 21:54:08 2009 +0000

    v1.0.4 release

commit 217f57617e0cff0d1bd6d726b243f04c6b179773
Author: David Moore <dcm@acm.org>
Date:   Fri Nov 6 21:37:25 2009 +0000

    Linux: Add support for the new URB_BULK_CONTINUATION flag
    
    Add support for the new USBDEVFS_URB_BULK_CONTINUATION flag to libusb.
    
    This flag, which is expected to be available in usbfs starting with
    kernel 2.6.32, allows the kernel to cancel multiple URBs upon receipt
    of a short packet.  This capability allows libusb to preserve data
    integrity of large bulk transfers that are split into multiple URBs.
    Without this support, these URBs must be canceled in userspace upon
    receipt of a short packet, a race condition against future transfers
    which might partially fill these canceled URBs.
    
    This patch automatically detects whether a supported kernel is present
    and enables the use of the flag when possible.
    
    [dsd: tweaks to supported kernel detection, and some inline
     documentation of this mechanism]

commit 69830057547396f893f0d7b3125a05d016313b10
Author: Daniel Drake <dsd@gentoo.org>
Date:   Wed Oct 28 15:13:22 2009 +0545

    Transfer locking
    
    At least on Linux, there were some possible races that could occur if
    a transfer is cancelled from one thread while another thread is handling
    an event for that transfer, or for if a transfer completes while it is
    still being submitted from another thread, etc.
    
    On the global level, transfers could be submitted and cancelled at the
    same time.
    
    Fix those issues with transfer-level locks.

commit 98f1b30d24359cb3185051b8df9ebb663cc10369
Author: Daniel Drake <dsd@gentoo.org>
Date:   Mon Sep 14 08:01:24 2009 +0100

    Clarify that timeout 0 means unlimited timeout

commit 858684f0dd25921e09565034a88709dbf6f6c61b
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri Sep 11 22:09:12 2009 +0100

    Linux: more flexibility with monotonic clock
    
    Some users have reported that CLOCK_MONOTONIC does not work on their
    systems - I suspect it is available on x86 but perhaps not some
    of the more uncommon architectures. We should fall back on
    CLOCK_REALTIME in these cases.
    
    Also, CLOCK_MONOTONIC_RAW seems even more monotonic, so we should use
    that if it is available.
    
    We now test different clock IDs during initialization to find the
    best one that works.

commit fe0d8dce1ed704915d501e7da700440c78144211
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Fri Sep 11 18:00:29 2009 +0100

    Darwin: handle overflows

commit f46716f42040986203fa6e873bfdabe1be2900ec
Author: Daniel Drake <dsd@gentoo.org>
Date:   Thu Aug 27 21:14:54 2009 +0545

    v1.0.3 release

commit 5b489b8b2a5aba7b8b804e5af6d2628735548238
Author: Toby Peterson <toby@macports.org>
Date:   Sun Aug 23 10:04:59 2009 +0545

    Darwin: 64-bit type fixes

commit ad8ae04d0b52009af0b1180e005f7554d2bbb26c
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Sun Aug 23 10:02:55 2009 +0545

    Darwin: fix crash when reading descriptors after close
    
    Fix a crash which occurs if the user does the following sequence on a
    device: open, close, get_configuration_descriptor.

commit 45ae2aecf5512dcff059b2a416534e81c6a00c88
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Aug 1 13:55:15 2009 +0545

    move bug info to bug tracker
    
    Protection needed: http://www.libusb.org/ticket/4
    Losing data: fixed in previous commit

commit 126129e174062c2a27423817a459e5113f777789
Author: Daniel Drake <dsd@gentoo.org>
Date:   Thu Jul 9 22:09:04 2009 +0100

    Linux: try harder not to lose any data
    
    We would previously lose any data that was present on a cancelled URB.
    Work harder to make sure this doesn't happen.

commit 0334ee642b47dfe1ca9db64b22e7702ea14b3f09
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun Jun 28 19:49:10 2009 +0100

    Add libusb_get_max_iso_packet_size()
    
    As pointed out by Dennis Muhlestein, libusb_get_max_packet_size()
    doesn't really do what the documentation might suggest because it
    does not consider the number of transaction opportunities per
    microframe.
    
    Add a new function to do what is useful for isochronous I/O.

commit 615f18e64e96ae4ecc8e43d0de00933059a5209a
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Jun 20 22:33:21 2009 +0100

    Linux: fix sending of zero length bulk packets
    
    Note that there are is a kernel bug preventing this from working
    properly at the moment, even after this fix.

commit 86f79fbf61c2018bdf009c7ebf92b38f3a16fd0c
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Fri Jun 19 22:18:44 2009 +0100

    Darwin: Don't cancel transfers on timeout
    
    ...because the OS does this for us.

commit d4bd9ed4de19a9c766f7a23eea8c852cdd61c18f
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun Jun 14 19:23:21 2009 +0100

    Don't terminate enums with commas
    
    g++ -pedantic doesn't like this
    Reported by Eberhard Mattes

commit 8be256082eb9bd8e243d89529f742926bb29a21b
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Jun 13 17:19:07 2009 +0100

    v1.0.2 release

commit 060e006e663fd59c281be29b71eb197e02b210e8
Author: Daniel Drake <dsd@gentoo.org>
Date:   Wed Jun 10 21:42:05 2009 +0100

    Linux: fix config descriptor parsing on big-endian systems
    
    Multi-byte fields in the configuration descriptors that come back from
    usbfs are always in bus endian format.
    
    Thanks to Joe Jezak for help investigating and fixing this.

commit c4a905022f684da9a4a853eb9232a81a53df2652
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Sun Jun 7 22:29:35 2009 +0100

    Darwin: improve handling of disconnected devices

commit 6b69f54451762ef590b9c938ab000c07cf9099a3
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Sun Jun 7 22:26:37 2009 +0100

    Darwin: fix parsing of config descriptors
    
    This was a confusion between configuration numbers and zero-based
    configuration indexes.

commit 2b3a9ffa776b383cb2dbc3c55e490e32e4c3c22b
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun Jun 7 22:19:53 2009 +0100

    Eliminate -Wsign-compare compiler warnings
    
    This was due to an API inconsistency which can be safely worked around.
    Hopefully we'll remember to fix the API next time we come to break
    things.

commit cad5cb55c37137e94e35c74fdabfe42a5cbd229b
Author: David Moore <dcm@acm.org>
Date:   Wed May 27 23:15:54 2009 -0700

    Make synchronous transfer APIs robust against signal interruption
    
    libusb_control_transfer and libusb_bulk_transfer are designed to be
    synchronous such that control is not returned until the transfer
    definitively succeeds or fails.  That assumption is violated if a signal
    interrupts these functions because there is no way for the application
    to continue waiting for the transfer without resubmitting it.  This
    patch changes these synchronous APIs so they do not abort in the case of
    a signal interruption.
    
    Signed-off-by: David Moore <dcm@acm.org>

commit b501795985a23109f176d296e7b544b4c6354528
Author: Alex Vatchenko <alex@fabulatech.com>
Date:   Thu May 28 15:58:50 2009 -0400

    pre-gcc-3.4 compatibility
    
    The -fvisibility and -Wno-pointer-sign options are not available on
    old GCC versions.

commit 00bb2805e994887f0a754a825c3ce03d22393386
Author: Daniel Drake <dsd@gentoo.org>
Date:   Tue May 26 15:53:26 2009 -0400

    Fix memory leak in config descriptor parsing
    
    Pointed out by Martin Koegler.

commit 068ff5b8a83fec0a9a91c80535a25b89a9ae64e8
Author: Daniel Drake <dsd@gentoo.org>
Date:   Tue May 12 19:20:51 2009 -0400

    Update AUTHORS

commit aa24c04e4043e39674b59ff0d302b2365cd0078f
Author: Daniel Drake <dsd@gentoo.org>
Date:   Tue May 12 19:03:37 2009 -0400

    v1.0.1 release

commit 44767677447fae4267131f99c591b14117486cac
Author: Daniel Drake <dsd@gentoo.org>
Date:   Tue May 12 19:01:44 2009 -0400

    Add BUGS file
    
    Probably missed a couple of outstanding issues

commit e0365a6f22e0e7f330ac931df031cf6f17f453d1
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Sun Mar 22 21:13:29 2009 -0400

    Darwin: get_config_descriptor bugfixes

commit 5fd0e8478240fece646a58a3c6114001a73be99f
Author: Daniel Drake <dsd@gentoo.org>
Date:   Wed Feb 25 12:33:33 2009 -0300

    Fix compilation of Darwin backend
    
    My fault. Reported by ihryamzik@gmail.com

commit b49f6bf5c910d0fd694ecf165d7927673707bff9
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Mon Feb 16 21:39:29 2009 -0300

    Darwin backend

commit d859158581e9a3250f36cdeeb8ea67cda04053bd
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Mon Feb 16 21:30:49 2009 -0300

    Make endianness macros endian-independent
    
    Implementation suggested by David Moore. Needed for proper universal
    code support on Darwin.

commit 9196f58bdc8b9e967261df39865215faa5d39cfa
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Mon Feb 16 21:25:18 2009 -0300

    Abstract clock reading into OS layer
    
    This will differ on Linux and Darwin, at least.
    
    [dsd: minor style tweaks]

commit e91207860cac09b3afaafc4c14221b78d585c59a
Author: Daniel Drake <dsd@gentoo.org>
Date:   Mon Feb 16 21:20:28 2009 -0300

    Fix endianness in device descriptors
    
    Pointed out by Nathan Hjelm.

commit ccf6d3d2f6acf9b9a1cb5e1f1b03f382ae509b17
Author: Nathan Hjelm <hjelmn@mac.com>
Date:   Mon Feb 16 21:13:52 2009 -0300

    Only link with librt on Linux
    
    [dsd: tweak configure.ac change]

commit 894539931e4b4bd85708fe98b956049243cd6fb0
Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
Date:   Mon Jan 26 00:31:48 2009 +0100

    API docs: describe libusb_transfer_cb_fn type
    
    Add some text describing the libusb_transfer_cb_fn function type
    with the semantics I have gathered from reading other parts of
    the API docs, referring to the proper section for more details.
    
    [dsd: tweaked the description slightly]

commit abe34a2656f8f9f21e53603796c536585e6233ef
Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
Date:   Sun Jan 25 18:21:59 2009 +0100

    Make empty array in struct compatible with C99
    
    If the compiler is known to be running in C99 mode,
    use "flexible array members" ("foo[]").
    
    If the compiler is running in any other mode, continue
    using the non-standard but widely common "foo[0]" syntax.

commit 620075c7400764d9bb539b5c02065c45c2e8251e
Author: Hans Ulrich Niedermann <hun@n-dimensional.de>
Date:   Sun Jan 25 18:20:45 2009 +0100

    Avoid signedness errors in API docs example code

commit c754ae294cfe96ec4738d6641137c9e6c56330c7
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Jan 17 00:25:40 2009 +0000

    Decrement poll() result when internal pipe has been handled
    
    When we receive data on the internal control pipe, we need to correctly
    decrement the number of ready file descriptors before passing on the
    remaining work to the OS implementation.

commit b9ca960f2ba271d2b1a58e22b7c70464d69f6c8a
Author: David Moore <dcm@acm.org>
Date:   Sun Jan 11 21:46:17 2009 -0800

    Prevent transfer from being submitted twice or improperly canceled
    
    This ensures that tpriv->urbs and tpriv->iso_urbs are always set to NULL
    whenever a transfer is not submitted.  In this way, submit_*_transfer()
    and cancel_*_transfer() can error check to ensure that the transfer is
    in the correct state to be either submitted or canceled, preventing
    potential memory leaks or double frees.
    
    Signed-off-by: David Moore <dcm@acm.org>

commit d2a8ec2da8abcd8f4648ed118da16191011982dd
Author: David Moore <dcm@acm.org>
Date:   Wed Jan 7 22:31:09 2009 -0800

    Linux: Fix race condition in cancel_bulk_transfer()
    
    This fixes a race condition in cancel_bulk_transfer().  In the old
    version, awaiting_reap and awaiting_discard are incremented in
    cancel_bulk_transfer() and decremented in handle_bulk_completion().
    However, since these events may take place in two different threads,
    these variables may reach zero before all URBs have been canceled,
    triggered spurious callbacks and duplicate frees.
    
    This changes the logic to use a single variable "num_retired" to replace
    both awaiting_reap and awaiting_discard.  num_retired is incremented
    only in handle_bulk_completion() and thus there is no race.  The handler
    will know that all URBs have been canceled when num_retired becomes
    equal to num_urbs.
    
    This change also simplifies a great deal of the logic in both functions
    and is a net reduction in the amount of code.
    
    Note that some variables such as "reap_action" probably need to still be
    protected by a mutex, and this patch does not address that issue.
    
    Signed-off-by: David Moore <dcm@acm.org>

commit 34b9eebe35d8167d43cffb6ad6175f6b2251b572
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Dec 13 20:06:49 2008 +0000

    v1.0.0 release
    
    It's here!

commit b1d636dde418dc8fe6a8f037dea0d800e57c6b94
Author: Mikhail Gusarov <dottedmag@dottedmag.ent>
Date:   Wed Dec 10 15:24:05 2008 +0600

    EOL-whitespace fixes
    
    Signed-off-by: Mikhail Gusarov <dottedmag@dottedmag.ent>

commit 4a9ac382ba5149ae5b3d0962d6a840b5e0dc13aa
Author: Daniel Drake <dsd@gentoo.org>
Date:   Tue Dec 9 21:43:37 2008 +0000

    Linux: fix reading of active configuration
    
    Shannon Chuang pointed out that we only read 1 byte into an
    uninitialized integer, and then return the whole thing.

commit 81a7310d92461ba7b1d98aeff7c4c007fab07120
Author: Daniel Drake <dsd@gentoo.org>
Date:   Tue Dec 9 21:39:11 2008 +0000

    Fix double free in descriptor parsing error path
    
    Pointed out by Shannon Chuang.

commit 9b4b53453db56ba9c1d707a645bbe6c7a02a3c81
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri Nov 21 13:28:32 2008 +0000

    Improvements to multi-threaded I/O system
    
    Documentation brushed up, and I realised that another function is
    needed for tight event handling loops -- they must be able to check
    if an open/close operation is trying to interrupt it.

commit 0e5b0fcb77a90b8bd95ad23669da472af31ef069
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri Nov 21 11:00:47 2008 +0000

    SourceForge website upload system changed

commit a133875e6e2f52eff53ac03f505d59cbdd33e178
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri Nov 21 10:54:57 2008 +0000

    v0.9.4 release

commit c32aa662769b676ff3247778664fccc71fc427ec
Author: Daniel Drake <dsd@gentoo.org>
Date:   Thu Nov 20 15:31:10 2008 +0000

    Pause event handling while opening and closing devices
    
    Ludovic Rousseau found that crashes often occur if you close a device
    while another thread is doing event handling.
    
    Fix this by adding an internal control pipe, which the close routines
    use to interrupt the event handler and obtain the event handling lock,
    ensuring that no other thread is handling events while the device is
    closed. After the close completes, it signals all the event handlers
    to start up again using the usual mechanism.
    
    Also modified libusb_open() to do a similar thing, so that event
    handlers are interrupted in order to realise that a new poll fd has
    appeared.

commit 1d7cf3d0fa8698eae25097cbda1870be90ff6f5e
Author: Bastien Nocera <hadess@hadess.net>
Date:   Thu Oct 30 14:35:23 2008 +0000

    Add libusb_attach_kernel_driver()
    
    Add support for re-attaching a driver to a device under Linux.
    
    [dsd: fixed handling of return value, and added LIBUSB_ERROR_BUSY case]

commit 914a4e70657c86b5094770aa2d898c978b1cdf41
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun Nov 2 21:45:54 2008 +0000

    Linux: handle low-level transfer errors
    
    Handle more URB error status codes, thanks to Lou and Alan Stern.

commit d25b566b3b8febafdda4211de724b4727dd4b7e0
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Thu Sep 4 13:50:49 2008 +0200

    Support for out-of-tree building
    
    Contrary to libusb 0.1, libusb 1.0 does not support out-of-tree building
    for the documentation part. This patch fixes that by using a
    doxygen.cfg.in file, which contains @top_srcdir@ to refer to the
    location of the libusb source code.

commit 8674c67ef78e1cf89db1fa584a4304f7c5ddcc5f
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun Nov 2 15:00:39 2008 +0000

    Document the logging style
    
    Suggested by Lou.

commit 94936cbcfe3f02eb65c8b91e29896604316259d8
Author: Daniel Drake <dsd@gentoo.org>
Date:   Wed Aug 27 22:44:24 2008 -0500

    Async I/O documentation touchups

commit 2f8f1b1a900f5b9828e5e2ff93c2b26a44fd9de2
Author: Daniel Drake <dsd@gentoo.org>
Date:   Wed Aug 27 21:23:10 2008 -0500

    Doc: fix typo in events lock section

commit 046e681e4ac6b697e40458ee0f5baf3cd8763bb0
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Aug 23 01:00:21 2008 -0500

    v0.9.3 release

commit fec6eaa4eecdf7e0b8299157a5dabef94417f193
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Aug 23 00:57:44 2008 -0500

    Reset internal transfer flags on submit
    
    This fixes a problem pointed out by Lou, where resubmitting a transfer
    that previously timed out never timed out again, as if the timeout had
    been set to 0.

commit 81627bd38900ec9701ab69c141aa51a9abea1f60
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun Aug 10 17:09:48 2008 -0500

    Add libusb_get_configuration prototype
    
    Pointed out by Lou

commit 1631eaefcc7cdf7047c6b9225618a9aa1b3d87d1
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Jul 19 17:51:28 2008 -0500

    v0.9.2 release

commit 0d9c40d7f3eee15ada624b5caab2cfb912144fdc
Author: Daniel Drake <dsd@gentoo.org>
Date:   Wed Jul 16 09:22:12 2008 -0500

    Linux: fix sysfs directory handling
    
    The length of the directory name varies, e.g. when you have nested hubs.
    Use dynamic allocation to be able to deal with any length of name.

commit 66c9847ad54b126ccafd4877292454ab57d0c115
Author: David Engraf <dogge2k@gmx.de>
Date:   Wed Jul 16 09:16:38 2008 -0500

    Linux: correct usage of MAX_PATH
    
    Thanks to clarification from Artem Egorkine, MAX_PATH already includes
    space for the trailing NULL.

commit 6494f07a6d1b73ce786ae581c4ff691e39e61d19
Author: Daniel Drake <dsd@gentoo.org>
Date:   Tue Jul 8 21:15:54 2008 -0500

    Linux: fix bulk/iso transfer double-cancellation
    
    Reset counters to 0 so that it's possible to cancel a transfer twice
    without breaking things. Not sure that I want to support this properly,
    but this makes it work at least.

commit 9140f5b414e37a3714cde9c6d6c87c963338a83a
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Jun 28 21:28:44 2008 -0500

    v0.9.1 release

commit 83a029062c1d2bfb584d7a6ee94915583d37464c
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Jun 28 21:24:49 2008 -0500

    Add missing GET_CONTEXT()

commit fbad9a5426f0369394c88987355a8fb06a741ca1
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat Jun 28 21:18:41 2008 -0500

    Linux: Compatibility with new sysfs descriptors file
    
    As of 2.6.26, the descriptors file now includes all descriptors, not
    just the active one.

commit 819e65f880ca43526036e56c65c415042c91f58f
Author: Daniel Drake <dsd@gentoo.org>
Date:   Thu Jun 26 22:47:05 2008 -0500

    Allow user data pointer to be passed through pollfd notification API

commit 1df713d622ab4f0b03aad72d903ac7beb8fb3b90
Author: Daniel Drake <dsd@gentoo.org>
Date:   Tue Jun 24 23:01:51 2008 -0500

    Introduce contexts to the API
    
    Suggested by David Zeuthen. This allows multiple libraries in the same
    process to independently use libusb without interfering.

commit 9818151c60a85aea6af24cb0996a92c3726c9864
Author: Daniel Drake <dsd@gentoo.org>
Date:   Tue Jun 24 21:31:13 2008 -0500

    Revert "Temporary workaround for event handling serialization issue"
    
    This reverts commit 2d3a1111caff40ebb87983c861ff548cdc9e5946.
    This was based on the assumption that dying threads would automatically
    release mutexes, which is not the case.

commit d5f82893fab3f1c13b1af4ba17aac72479bad7d5
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri Jun 20 23:04:53 2008 -0500

    Overflow handling

commit 546dee211eefbdd280fd1fc9dee84a9b52105078
Author: Artem Egorkine <arteme@gmail.com>
Date:   Tue Jun 17 18:27:38 2008 -0500

    a fix for SIGSEGV in handle_bulk_completion()
    
    We cannot dereference tpriv after calling
    usbi_handle_transfer_cancellation() because that function may invoke
    the user-supplied callback which may free the transfer.

commit 947ba8056456a5215724fb502e3e09d50016f699
Author: Daniel Drake <dsd@gentoo.org>
Date:   Mon Jun 16 22:50:50 2008 -0500

    Refine configuration selection again
    
    At Alan Stern's suggestion, just offer the bare "set configuration" and
    "get configuration" functionality, and let applications worry about the
    specific race conditions and unusual situations.

commit e7a7a49d0331ee0e14145f6e7ec39763b36314ac
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun Jun 15 15:29:38 2008 -0500

    docs update
    
    Add a THANKS file, make copyright notices easily accessible, update TODO

commit 217534e4b396081e038ee5f94c813d1668963673
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun Jun 15 15:23:29 2008 -0500

    round up poll timeout
    
    Pointed out by Richard Röjfors, otherwise we end up busy-looping with
    a poll() timeout of 0.

commit 5ad79b324bc5e11a75a585398a1e81c26f05e758
Author: Felipe Balbi <me@felipebalbi.com>
Date:   Sun Jun 8 12:34:48 2008 +0300

    fix doc about libusb_open()
    
    libusb_open() returns int instead of libusb_device_handle.
    
    Signed-off-by: Felipe Balbi <me@felipebalbi.com>
    [dsd: small correction]

commit 2d3a1111caff40ebb87983c861ff548cdc9e5946
Author: Daniel Drake <dsd@gentoo.org>
Date:   Thu May 29 17:26:26 2008 +0100

    Temporary workaround for event handling serialization issue
    
    Ludovic Rousseau pointed out that libusb_unlock_events() is not called
    when a thread gets terminated with a signal, meaning that event waiters
    will not be woken up in this case.
    
    Add a temporary hack to libusb_event_handler_active() so that at least
    the other threads will realise on the next iteration of their event
    handling loop.
    
    The real fix will likely involve reworking most of this.

commit 514bb8790cfe8b93ccfff82bc17081b1030acce0
Author: Daniel Drake <dsd@gentoo.org>
Date:   Thu May 29 12:35:01 2008 +0100

    Refine libusb_set_configuration() semantics
    
    Applications will generally want to set a configuration before claiming
    interfaces. The problem is that the interface may already be set, and
    someone else may have claimed an interface (meaning that all calls to
    set_configuration will fail, even if it's for the same configuration).
    
    There are now 2 options:
    1. Use the new libusb_get_configuration() to determine active
       configuration before calling libusb_set_configuration()
    2. Or just call libusb_set_configuration() as usual, which will do
       nothing if that configuration is already active.

commit d1292f8e7300051239a7ed2769d221dc7a6f9fca
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun May 25 23:42:42 2008 +0100

    v0.9.0 release
    
    First libusb-1.0 beta release

commit 4cd249388e4ed2ca03f1263984ab67df5030bb65
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sun May 25 22:59:09 2008 +0100

    Take lock before raising event waiters condition
    
    This avoids a race between the user checking for active event handler
    and then blocking on the condition variable

commit 7c525480ab3c4db9205bfe30bb0d2bef9096c444
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri May 23 15:57:07 2008 +0100

    Implement serialization of event handlers
    
    Now offers a mechanism to wait for events while another thread is
    doing the event handling. Complicates things for MT async apps, but
    then again it's a bit of a tricky combination to start with.

commit ff0660a415ecfd0879600eaad1c5899b6d93a30a
Author: Daniel Drake <dsd@gentoo.org>
Date:   Sat May 24 21:28:31 2008 +0100

    allow LIBUSB_DEBUG env var to control message verbosity at runtime
    
    Based on ideas from Ludovic Rousseau

commit 4d788967e3f8d75eaf3a1ac1ee8e2e8bed0601c1
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri May 23 15:58:11 2008 +0100

    don't print messages by default
    
    Add libusb_set_debug() API to set message verbosity.
    
    Ludovic Rousseau pointed out that applications may close stdout/stderr
    descriptors, which might then be reused.

commit bef33bb9eba0da04ee7488d9cd5e6ab12bc61c0c
Author: Daniel Drake <dsd@gentoo.org>
Date:   Mon May 19 15:43:27 2008 +0100

    Fix memory leak in libusb_control_transfer
    
    Pointed out by David Engraf: we weren't freeing the transfer buffer

commit a345bacb6f07ebb2122402041a9e8092d4a20a4d
Author: David Engraf <david.engraf@netcom.eu>
Date:   Mon May 19 15:16:32 2008 +0100

    Linux: fix handling of ioctl failure
    
    The return value of some ioctl commands in linux_usbfs.c are not
    handeled correct. The ioctl function returns != 0 and errno is set with
    the error code.

commit e44396a458ecea9e5edd9a7577e617571c76860d
Author: David Engraf <david.engraf@netcom.eu>
Date:   Mon May 19 15:13:38 2008 +0100

    critical memory leak in handle_events
    
    This patch closes a critical memory leak in handle_events. The fds
    variable is malloced but never freed. When I'm calling
    handle_events with a timeout of 0, my system runs out of memory after a
    few seconds.

commit eb25630f52bc9848b444e439632c899977d887b0
Author: Daniel Drake <dsd@gentoo.org>
Date:   Fri May 16 23:50:20 2008 +0100

    More informative libusb_open() return code
    
    Hopefully one of the last API tweaks...

commit 2b2e9c40b195261b09ac52ebdb93eef25c79de90
Author: Daniel Drake <dsd@gentoo.org>
