darwin: Cleanup and fixes related to Mac OS IOUSBLib interface checks
authorSean McBride <sean@rogue-research.com>
Fri, 29 Dec 2017 18:15:07 +0000 (13:15 -0500)
committerChris Dickens <christopher.a.dickens@gmail.com>
Mon, 8 Jan 2018 18:26:07 +0000 (10:26 -0800)
commit0f59214f1253a36f27c3acbcd9601d026d4741b1
treef4a10c6b547dc13c026afe4cef544941f213ef42
parent3bffd5ca316e29ac665d1c3a7fc4859d9ccca37a
darwin: Cleanup and fixes related to Mac OS IOUSBLib interface checks

- revisited fix to issue #48:
  - guard kIOUSBDeviceInterfaceID500 with 10.8 deployment (not 10.9).
    I believe a typo in the bug report caused this to be guarded too
    strictly.
  - added deployment target tests to every interface check. Necessary
    because merely checking for a macro definition tells us nothing
    about what features are available at runtime. It is common to build
    against new SDKs but deploy to older OSes.
- properly guard kIOUSBInterfaceInterfaceID700 against 10.10 deployment
  (not 10.9).  It was added in 10.10.  Probably a copy-pasto.
- changed non-existent kIOUSBDeviceInterfaceID220 to
  kIOUSBDeviceInterfaceID197.  Probably a copy-pasto.
- don't use defines like MAC_OS_X_VERSION_10_9 since they don't exist in
  older SDKs and would fail to compile, use raw numbers instead.
- added tests for newer interfaces: kIOUSBInterfaceInterfaceID800,
  kIOUSBInterfaceInterfaceID650, kIOUSBDeviceInterfaceID650.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
libusb/os/darwin_usb.h
libusb/version_nano.h