usb 2.1.3 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +3 -0
  3. package/dist/index.d.ts +2 -1
  4. package/dist/index.js +3 -1
  5. package/dist/index.js.map +1 -1
  6. package/dist/usb/bindings.d.ts +4 -0
  7. package/dist/usb/device.js +5 -0
  8. package/dist/usb/device.js.map +1 -1
  9. package/libusb/.gitattributes +2 -6
  10. package/libusb/.private/appveyor_build.sh +22 -0
  11. package/libusb/.private/bm.sh +1 -1
  12. package/libusb/.private/ci-build.sh +67 -0
  13. package/libusb/.private/post-rewrite.sh +5 -1
  14. package/libusb/.private/pre-commit.sh +5 -1
  15. package/libusb/.private/wbs.txt +4 -19
  16. package/libusb/.travis.yml +32 -23
  17. package/libusb/AUTHORS +76 -3
  18. package/libusb/ChangeLog +41 -3
  19. package/libusb/INSTALL_WIN.txt +22 -44
  20. package/libusb/Makefile.am +32 -10
  21. package/libusb/{README.md → README} +2 -2
  22. package/libusb/README.git +3 -3
  23. package/libusb/Xcode/common.xcconfig +23 -19
  24. package/libusb/Xcode/config.h +25 -13
  25. package/libusb/Xcode/libusb.xcodeproj/project.pbxproj +511 -109
  26. package/libusb/android/README +90 -54
  27. package/libusb/android/config.h +23 -43
  28. package/libusb/android/examples/unrooted_android.c +301 -0
  29. package/libusb/android/examples/unrooted_android.h +36 -0
  30. package/libusb/android/jni/Android.mk +1 -1
  31. package/libusb/android/jni/Application.mk +16 -0
  32. package/libusb/android/jni/examples.mk +63 -29
  33. package/libusb/android/jni/libusb.mk +14 -8
  34. package/libusb/android/jni/tests.mk +13 -24
  35. package/libusb/appveyor.yml +69 -30
  36. package/libusb/autogen.sh +5 -3
  37. package/libusb/bootstrap.sh +6 -2
  38. package/libusb/configure.ac +302 -228
  39. package/libusb/doc/Makefile.in +22 -0
  40. package/libusb/doc/doxygen.cfg.in +460 -223
  41. package/libusb/examples/Makefile.am +6 -13
  42. package/libusb/examples/dpfp.c +276 -73
  43. package/libusb/examples/ezusb.c +18 -8
  44. package/libusb/examples/ezusb.h +6 -17
  45. package/libusb/examples/fxload.c +4 -5
  46. package/libusb/examples/hotplugtest.c +1 -1
  47. package/libusb/examples/sam3u_benchmark.c +59 -24
  48. package/libusb/examples/testlibusb.c +138 -104
  49. package/libusb/examples/xusb.c +26 -22
  50. package/libusb/libusb/Makefile.am +57 -70
  51. package/libusb/libusb/Makefile.am.extra +26 -0
  52. package/libusb/libusb/core.c +420 -423
  53. package/libusb/libusb/descriptor.c +365 -419
  54. package/libusb/libusb/hotplug.c +197 -104
  55. package/libusb/libusb/io.c +491 -528
  56. package/libusb/libusb/libusb-1.0.def +7 -3
  57. package/libusb/libusb/libusb-1.0.rc +1 -9
  58. package/libusb/libusb/libusb.h +295 -226
  59. package/libusb/libusb/libusbi.h +587 -314
  60. package/libusb/libusb/os/darwin_usb.c +634 -317
  61. package/libusb/libusb/os/darwin_usb.h +39 -15
  62. package/libusb/libusb/os/events_posix.c +300 -0
  63. package/libusb/libusb/os/events_posix.h +59 -0
  64. package/libusb/libusb/os/events_windows.c +214 -0
  65. package/libusb/{msvc/missing.h → libusb/os/events_windows.h} +25 -11
  66. package/libusb/libusb/os/haiku_pollfs.cpp +14 -9
  67. package/libusb/libusb/os/haiku_usb.h +12 -12
  68. package/libusb/libusb/os/haiku_usb_backend.cpp +36 -37
  69. package/libusb/libusb/os/haiku_usb_raw.cpp +80 -116
  70. package/libusb/libusb/os/linux_netlink.c +55 -63
  71. package/libusb/libusb/os/linux_udev.c +61 -69
  72. package/libusb/libusb/os/linux_usbfs.c +926 -1015
  73. package/libusb/libusb/os/linux_usbfs.h +74 -57
  74. package/libusb/libusb/os/netbsd_usb.c +103 -168
  75. package/libusb/libusb/os/null_usb.c +111 -0
  76. package/libusb/libusb/os/openbsd_usb.c +71 -120
  77. package/libusb/libusb/os/sunos_usb.c +289 -375
  78. package/libusb/libusb/os/sunos_usb.h +0 -1
  79. package/libusb/libusb/os/threads_posix.c +81 -32
  80. package/libusb/libusb/os/threads_posix.h +19 -23
  81. package/libusb/libusb/os/threads_windows.c +9 -95
  82. package/libusb/libusb/os/threads_windows.h +33 -31
  83. package/libusb/libusb/os/windows_common.c +904 -0
  84. package/libusb/libusb/os/windows_common.h +329 -42
  85. package/libusb/libusb/os/windows_usbdk.c +161 -267
  86. package/libusb/libusb/os/windows_usbdk.h +5 -2
  87. package/libusb/libusb/os/windows_winusb.c +1326 -1190
  88. package/libusb/libusb/os/windows_winusb.h +167 -167
  89. package/libusb/libusb/strerror.c +20 -30
  90. package/libusb/libusb/sync.c +20 -21
  91. package/libusb/libusb/version.h +1 -1
  92. package/libusb/libusb/version_nano.h +1 -1
  93. package/libusb/msvc/.gitattributes +3 -0
  94. package/libusb/msvc/config.h +27 -20
  95. package/libusb/msvc/{hotplugtest_2012.vcxproj → dpfp_2013.vcxproj} +14 -10
  96. package/libusb/msvc/dpfp_2013.vcxproj.filters +26 -0
  97. package/libusb/msvc/{listdevs_2010.vcxproj → dpfp_2015.vcxproj} +14 -9
  98. package/libusb/msvc/dpfp_2015.vcxproj.filters +26 -0
  99. package/libusb/msvc/dpfp_2017.vcxproj +106 -0
  100. package/libusb/msvc/dpfp_2017.vcxproj.filters +26 -0
  101. package/libusb/msvc/dpfp_2019.vcxproj +106 -0
  102. package/libusb/msvc/dpfp_2019.vcxproj.filters +26 -0
  103. package/libusb/msvc/dpfp_threaded_2013.vcxproj +87 -0
  104. package/libusb/msvc/dpfp_threaded_2013.vcxproj.filters +26 -0
  105. package/libusb/msvc/dpfp_threaded_2015.vcxproj +87 -0
  106. package/libusb/msvc/dpfp_threaded_2015.vcxproj.filters +26 -0
  107. package/libusb/msvc/dpfp_threaded_2017.vcxproj +106 -0
  108. package/libusb/msvc/dpfp_threaded_2017.vcxproj.filters +26 -0
  109. package/libusb/msvc/{fxload_2012.vcxproj → dpfp_threaded_2019.vcxproj} +32 -17
  110. package/libusb/msvc/dpfp_threaded_2019.vcxproj.filters +26 -0
  111. package/libusb/msvc/fxload_2013.vcxproj +6 -3
  112. package/libusb/msvc/fxload_2013.vcxproj.filters +35 -0
  113. package/libusb/msvc/fxload_2015.vcxproj +6 -3
  114. package/libusb/msvc/fxload_2015.vcxproj.filters +35 -0
  115. package/libusb/msvc/fxload_2017.vcxproj +6 -7
  116. package/libusb/msvc/fxload_2017.vcxproj.filters +35 -0
  117. package/libusb/msvc/{fxload_2010.vcxproj → fxload_2019.vcxproj} +29 -6
  118. package/libusb/msvc/fxload_2019.vcxproj.filters +35 -0
  119. package/libusb/{examples → msvc}/getopt/getopt.c +0 -0
  120. package/libusb/{examples → msvc}/getopt/getopt.h +0 -0
  121. package/libusb/{examples → msvc}/getopt/getopt1.c +0 -0
  122. package/libusb/msvc/getopt_2013.vcxproj +4 -5
  123. package/libusb/msvc/getopt_2013.vcxproj.filters +26 -0
  124. package/libusb/msvc/getopt_2015.vcxproj +4 -4
  125. package/libusb/msvc/getopt_2015.vcxproj.filters +26 -0
  126. package/libusb/msvc/getopt_2017.vcxproj +4 -10
  127. package/libusb/msvc/getopt_2017.vcxproj.filters +26 -0
  128. package/libusb/msvc/{getopt_2012.vcxproj → getopt_2019.vcxproj} +25 -6
  129. package/libusb/msvc/getopt_2019.vcxproj.filters +26 -0
  130. package/libusb/msvc/hotplugtest_2013.vcxproj +6 -3
  131. package/libusb/msvc/hotplugtest_2013.vcxproj.filters +23 -0
  132. package/libusb/msvc/hotplugtest_2015.vcxproj +6 -3
  133. package/libusb/msvc/hotplugtest_2015.vcxproj.filters +23 -0
  134. package/libusb/msvc/hotplugtest_2017.vcxproj +6 -7
  135. package/libusb/msvc/hotplugtest_2017.vcxproj.filters +23 -0
  136. package/libusb/msvc/hotplugtest_2019.vcxproj +105 -0
  137. package/libusb/msvc/hotplugtest_2019.vcxproj.filters +23 -0
  138. package/libusb/msvc/libusb_2013.sln +50 -20
  139. package/libusb/msvc/libusb_2015.sln +51 -21
  140. package/libusb/msvc/libusb_2017.sln +90 -36
  141. package/libusb/msvc/libusb_2019.sln +240 -0
  142. package/libusb/msvc/libusb_dll_2013.vcxproj +6 -9
  143. package/libusb/msvc/libusb_dll_2013.vcxproj.filters +94 -0
  144. package/libusb/msvc/libusb_dll_2015.vcxproj +6 -8
  145. package/libusb/msvc/libusb_dll_2015.vcxproj.filters +94 -0
  146. package/libusb/msvc/libusb_dll_2017.vcxproj +6 -16
  147. package/libusb/msvc/libusb_dll_2017.vcxproj.filters +94 -0
  148. package/libusb/msvc/{libusb_dll_2010.vcxproj → libusb_dll_2019.vcxproj} +27 -9
  149. package/libusb/msvc/libusb_dll_2019.vcxproj.filters +94 -0
  150. package/libusb/msvc/libusb_static_2013.vcxproj +5 -9
  151. package/libusb/msvc/libusb_static_2013.vcxproj.filters +80 -0
  152. package/libusb/msvc/libusb_static_2015.vcxproj +5 -8
  153. package/libusb/msvc/libusb_static_2015.vcxproj.filters +80 -0
  154. package/libusb/msvc/libusb_static_2017.vcxproj +5 -8
  155. package/libusb/msvc/libusb_static_2017.vcxproj.filters +80 -0
  156. package/libusb/msvc/{libusb_static_2010.vcxproj → libusb_static_2019.vcxproj} +26 -9
  157. package/libusb/msvc/libusb_static_2019.vcxproj.filters +80 -0
  158. package/libusb/msvc/listdevs_2013.vcxproj +6 -3
  159. package/libusb/msvc/listdevs_2013.vcxproj.filters +23 -0
  160. package/libusb/msvc/listdevs_2015.vcxproj +6 -3
  161. package/libusb/msvc/listdevs_2015.vcxproj.filters +23 -0
  162. package/libusb/msvc/listdevs_2017.vcxproj +6 -7
  163. package/libusb/msvc/listdevs_2017.vcxproj.filters +23 -0
  164. package/libusb/msvc/listdevs_2019.vcxproj +105 -0
  165. package/libusb/msvc/listdevs_2019.vcxproj.filters +23 -0
  166. package/libusb/msvc/{listdevs_2012.vcxproj → sam3u_benchmark_2013.vcxproj} +13 -9
  167. package/libusb/msvc/sam3u_benchmark_2013.vcxproj.filters +26 -0
  168. package/libusb/msvc/{hotplugtest_2010.vcxproj → sam3u_benchmark_2015.vcxproj} +13 -8
  169. package/libusb/msvc/sam3u_benchmark_2015.vcxproj.filters +26 -0
  170. package/libusb/msvc/sam3u_benchmark_2017.vcxproj +106 -0
  171. package/libusb/msvc/sam3u_benchmark_2017.vcxproj.filters +26 -0
  172. package/libusb/msvc/sam3u_benchmark_2019.vcxproj +106 -0
  173. package/libusb/msvc/sam3u_benchmark_2019.vcxproj.filters +26 -0
  174. package/libusb/msvc/stress_2013.vcxproj +4 -2
  175. package/libusb/msvc/stress_2013.vcxproj.filters +32 -0
  176. package/libusb/msvc/stress_2015.vcxproj +4 -2
  177. package/libusb/msvc/stress_2015.vcxproj.filters +32 -0
  178. package/libusb/msvc/stress_2017.vcxproj +4 -6
  179. package/libusb/msvc/stress_2017.vcxproj.filters +32 -0
  180. package/libusb/msvc/{stress_2010.vcxproj → stress_2019.vcxproj} +26 -4
  181. package/libusb/msvc/stress_2019.vcxproj.filters +32 -0
  182. package/libusb/msvc/testlibusb_2013.vcxproj +6 -3
  183. package/libusb/msvc/testlibusb_2013.vcxproj.filters +23 -0
  184. package/libusb/msvc/testlibusb_2015.vcxproj +6 -3
  185. package/libusb/msvc/testlibusb_2015.vcxproj.filters +23 -0
  186. package/libusb/msvc/testlibusb_2017.vcxproj +6 -7
  187. package/libusb/msvc/testlibusb_2017.vcxproj.filters +23 -0
  188. package/libusb/msvc/{testlibusb_2010.vcxproj → testlibusb_2019.vcxproj} +28 -5
  189. package/libusb/msvc/testlibusb_2019.vcxproj.filters +23 -0
  190. package/libusb/msvc/xusb_2013.vcxproj +6 -3
  191. package/libusb/msvc/xusb_2013.vcxproj.filters +23 -0
  192. package/libusb/msvc/xusb_2015.vcxproj +6 -3
  193. package/libusb/msvc/xusb_2015.vcxproj.filters +23 -0
  194. package/libusb/msvc/xusb_2017.vcxproj +6 -7
  195. package/libusb/msvc/xusb_2017.vcxproj.filters +23 -0
  196. package/libusb/msvc/{xusb_2010.vcxproj → xusb_2019.vcxproj} +28 -5
  197. package/libusb/msvc/xusb_2019.vcxproj.filters +23 -0
  198. package/libusb/tests/Makefile.am +1 -0
  199. package/libusb/tests/libusb_testlib.h +12 -43
  200. package/libusb/tests/stress.c +59 -50
  201. package/libusb/tests/testlib.c +78 -171
  202. package/libusb.gypi +10 -11
  203. package/package.json +1 -1
  204. package/prebuilds/android-arm/node.napi.armv7.node +0 -0
  205. package/prebuilds/android-arm64/node.napi.armv8.node +0 -0
  206. package/prebuilds/darwin-x64+arm64/node.napi.node +0 -0
  207. package/prebuilds/linux-arm/node.napi.armv6.node +0 -0
  208. package/prebuilds/linux-arm/node.napi.armv7.node +0 -0
  209. package/prebuilds/linux-arm64/node.napi.armv8.node +0 -0
  210. package/prebuilds/linux-ia32/node.napi.node +0 -0
  211. package/prebuilds/linux-x64/node.napi.glibc.node +0 -0
  212. package/prebuilds/linux-x64/node.napi.musl.node +0 -0
  213. package/prebuilds/win32-ia32/node.napi.node +0 -0
  214. package/prebuilds/win32-x64/node.napi.node +0 -0
  215. package/src/device.cc +12 -7
  216. package/src/node_usb.cc +10 -0
  217. package/test/usb.coffee +6 -0
  218. package/tsc/index.ts +2 -0
  219. package/tsc/usb/bindings.ts +5 -0
  220. package/tsc/usb/device.ts +6 -0
  221. package/libusb/.private/bd.cmd +0 -89
  222. package/libusb/.private/bwince.cmd +0 -57
  223. package/libusb/.private/wbs_wince.txt +0 -42
  224. package/libusb/Brewfile +0 -4
  225. package/libusb/appveyor_cygwin.bat +0 -11
  226. package/libusb/appveyor_minGW.bat +0 -19
  227. package/libusb/doc/Makefile.am +0 -9
  228. package/libusb/examples/dpfp_threaded.c +0 -557
  229. package/libusb/libusb/hotplug.h +0 -99
  230. package/libusb/libusb/os/poll_posix.c +0 -84
  231. package/libusb/libusb/os/poll_posix.h +0 -14
  232. package/libusb/libusb/os/poll_windows.c +0 -447
  233. package/libusb/libusb/os/poll_windows.h +0 -98
  234. package/libusb/libusb/os/wince_usb.c +0 -888
  235. package/libusb/libusb/os/wince_usb.h +0 -126
  236. package/libusb/libusb/os/windows_nt_common.c +0 -1010
  237. package/libusb/libusb/os/windows_nt_common.h +0 -110
  238. package/libusb/libusb/os/windows_nt_shared_types.h +0 -147
  239. package/libusb/msvc/appveyor.bat +0 -27
  240. package/libusb/msvc/ddk_build.cmd +0 -219
  241. package/libusb/msvc/errno.h +0 -102
  242. package/libusb/msvc/fxload_sources +0 -23
  243. package/libusb/msvc/getopt_2005.vcproj +0 -288
  244. package/libusb/msvc/getopt_2010.vcxproj +0 -72
  245. package/libusb/msvc/getopt_sources +0 -24
  246. package/libusb/msvc/hotplugtest_sources +0 -20
  247. package/libusb/msvc/inttypes.h +0 -295
  248. package/libusb/msvc/libusb.dsw +0 -71
  249. package/libusb/msvc/libusb_2005.sln +0 -95
  250. package/libusb/msvc/libusb_2010.sln +0 -105
  251. package/libusb/msvc/libusb_2012.sln +0 -105
  252. package/libusb/msvc/libusb_dll.dsp +0 -194
  253. package/libusb/msvc/libusb_dll_2005.vcproj +0 -464
  254. package/libusb/msvc/libusb_dll_2012.vcxproj +0 -107
  255. package/libusb/msvc/libusb_dll_wince.vcproj +0 -1251
  256. package/libusb/msvc/libusb_sources +0 -43
  257. package/libusb/msvc/libusb_static.dsp +0 -174
  258. package/libusb/msvc/libusb_static_2005.vcproj +0 -390
  259. package/libusb/msvc/libusb_static_2012.vcxproj +0 -98
  260. package/libusb/msvc/libusb_static_wince.vcproj +0 -1179
  261. package/libusb/msvc/libusb_wince.sln +0 -246
  262. package/libusb/msvc/listdevs.dsp +0 -103
  263. package/libusb/msvc/listdevs_2005.vcproj +0 -360
  264. package/libusb/msvc/listdevs_sources +0 -20
  265. package/libusb/msvc/listdevs_wince.vcproj +0 -1120
  266. package/libusb/msvc/missing.c +0 -80
  267. package/libusb/msvc/stdint.h +0 -256
  268. package/libusb/msvc/stress_2005.vcproj +0 -390
  269. package/libusb/msvc/stress_2012.vcxproj +0 -87
  270. package/libusb/msvc/stress_sources +0 -21
  271. package/libusb/msvc/stress_wince.vcproj +0 -1128
  272. package/libusb/msvc/testlibusb_2012.vcxproj +0 -83
  273. package/libusb/msvc/testlibusb_sources +0 -20
  274. package/libusb/msvc/xusb.dsp +0 -102
  275. package/libusb/msvc/xusb_2005.vcproj +0 -344
  276. package/libusb/msvc/xusb_2012.vcxproj +0 -83
  277. package/libusb/msvc/xusb_sources +0 -20
  278. package/libusb/msvc/xusb_wince.vcproj +0 -1120
  279. package/libusb/travis-autogen.sh +0 -39
@@ -1,73 +1,51 @@
1
1
  Installation Instructions for Windows
2
2
  *************************************
3
3
 
4
- If you are compiling for MinGW or cygwin, please refer to the INSTALL file.
4
+ If you are compiling for MinGW or cygwin, please refer to the INSTALL file,
5
+ which is automatically generated by autotools (e.g. running bootstrap.sh).
5
6
 
6
7
  If you are using Microsoft Visual Studio:
7
8
  - Open the relevant solution file in /msvc:
8
- libusb.dsw for MSVC6, libusb_2005.sln for Visual Studio 2005 or 2008,
9
- libusb_2010.sln for Visual Studio 2010,
10
- libusb_2012.sln for Visual Studio 2012 or later,
11
- libusb_wince.sln for Windows CE support in Visual Studio 2005.
9
+ libusb_2013.sln for Visual Studio 2013,
10
+ libusb_2015.sln for Visual Studio 2015,
11
+ libusb_2017.sln for Visual Studio 2017,
12
+ libusb_2019.sln for Visual Studio 2019 or later.
12
13
  - If you want to debug the library, uncomment the ENABLE_DEBUG_LOGGING define
13
14
  in msvc\config.h
14
15
  - Select your configuration and compile the project
15
16
 
16
- Note that if you are using Visual Studio Express, you may have to install the
17
- Windows SDK to be able to compile the 64 bit version of the library.
17
+ Installing and building libusb via vcpkg
18
+ ****************************************
18
19
 
19
- If you are using the freely available Windows DDK/WDK (Driver Development Kit)
20
- - If you want to debug the library, uncomment the ENABLE_DEBUG_LOGGING define
21
- in msvc\config.h
22
- - Open one of the relevant Free Build or Checked Build prompt for your target
23
- platform
24
- - Navigate to the msvc\ directory where the ddk_build.cmd file is located, and
25
- run 'ddk_build'
26
- - To produce a DLL rather than a static library, use: 'ddk_build DLL'
27
- - To produce a static library that uses LIBCMT[d] instead of MSVCRT[d] (/MT[d]
28
- vs /MD[d] in Visual Studio) use: 'ddk_build /MT'
20
+ You can download and install libusb using the vcpkg dependency manager:
29
21
 
30
- Note that using the Windows DDK, it is possible to compile both the 32 and 64
31
- bit versions of the library.
22
+ git clone https://github.com/Microsoft/vcpkg.git
23
+ cd vcpkg
24
+ ./bootstrap-vcpkg.bat
25
+ ./vcpkg integrate install
26
+ vcpkg install libusb
32
27
 
33
- If you are building for Windows CE then you will need the Windows CE Standard 5.00 SDK.
28
+ The libusb port in vcpkg is kept up to date by Microsoft team members and
29
+ community contributors. If the version is out of date, please create an issue
30
+ or pull request (https://github.com/Microsoft/vcpkg) on the vcpkg repository.
34
31
 
35
32
  Destination directories
36
33
  ***********************
37
34
 
38
- The 32 bit binaries compiled either from Visual Studio or the DDK are placed in
39
- a Win32\ directory at the root of the library
40
- The 64 bit binaries are placed in an x64\ directory
41
- Windows CE binaries are placed in one of the following directories, depending
42
- on the target processor: ARMV4I, MIPSII, MIPSII_FP, MIPSIV, MIPSIV_FP, SH4 or x86.
43
-
35
+ The 32-bit binaries are placed in a Win32\ directory at the root of the
36
+ library.
37
+ The 64-bit binaries are placed in a x64\ directory.
44
38
 
45
39
  Troubleshooting
46
40
  ***************
47
41
 
48
42
  If the compilation process complains about missing libraries, ensure that the
49
43
  default library paths for your project points to the relevant directories.
50
- If needed, these libraries can be obtained by installing either the latest
51
- Windows SDK or the DDK (Links provided at the end of this file).
52
-
53
- For Windows CE it is necessary to install the CE USB Kernel Wrapper driver for
54
- libusb to function on a device.
44
+ If needed, these libraries can be obtained by installing the latest Windows
45
+ SDK.
55
46
 
56
47
  Links
57
48
  *****
58
49
 
59
50
  Additional information related to the Windows backend:
60
51
  http://windows.libusb.info
61
-
62
- Latest Windows Driver (Development) Kit (WDK):
63
- http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=36a2630f-5d56-43b5-b996-7633f2ec14ff
64
-
65
- Latest Microsoft Windows SDK:
66
- http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=c17ba869-9671-4330-a63e-1fd44e0e2505
67
-
68
- Windows CE Standard 5.00 SDK:
69
- http://www.microsoft.com/en-gb/download/details.aspx?id=17310
70
-
71
- Windows CE USB Kernel Wrapper Driver:
72
- https://github.com/RealVNC/CEUSBKWrapper
73
-
@@ -1,10 +1,8 @@
1
1
  AUTOMAKE_OPTIONS = dist-bzip2 no-dist-gzip
2
2
  ACLOCAL_AMFLAGS = -I m4
3
- DISTCLEANFILES = libusb-1.0.pc
4
- EXTRA_DIST = TODO PORTING msvc libusb/libusb-1.0.def libusb/version_nano.h \
5
- examples/getopt/getopt.c examples/getopt/getopt1.c examples/getopt/getopt.h \
6
- android Xcode
7
- SUBDIRS = libusb doc
3
+ EXTRA_DIST = INSTALL_WIN.txt PORTING doc/libusb.png \
4
+ android msvc Xcode
5
+ SUBDIRS = libusb
8
6
 
9
7
  if BUILD_EXAMPLES
10
8
  SUBDIRS += examples
@@ -14,15 +12,39 @@ if BUILD_TESTS
14
12
  SUBDIRS += tests
15
13
  endif
16
14
 
17
- pkgconfigdir=$(libdir)/pkgconfig
18
- pkgconfig_DATA=libusb-1.0.pc
15
+ pkgconfigdir = $(libdir)/pkgconfig
16
+ pkgconfig_DATA = libusb-1.0.pc
19
17
 
20
- .PHONY: dist-up
18
+ # The package name is libusb-1.0, but we want the distribution
19
+ # to be created as libusb-x.y.z instead of libusb-1.0-x.y.z
20
+ distdir = libusb-$(VERSION)
21
+
22
+ # Ensure any generated docs are cleaned out
23
+ # We need this here because make does not recurse into doc/
24
+ clean-local:
25
+ rm -rf doc/$(DOXYGEN_HTMLDIR)
26
+
27
+ # Use dist-hook to accomplish the following things for the dist recipe:
28
+ # 1) Remove the GitHub Markdown from the README file
29
+ # 2) Remove the .gitattributes file from the msvc directory
30
+ dist-hook:
31
+ chmod u+w $(distdir)/README $(distdir)/msvc
32
+ $(SED) -i.orig -e '/Build Status/d' $(distdir)/README
33
+ $(SED) -i.orig -e '/^$$/N;/^\n$$/D' $(distdir)/README
34
+ $(SED) -i.orig -e 's/\[\([A-Z]*\)\](\1)/\1/' $(distdir)/README
35
+ rm -f $(distdir)/README.orig
36
+ rm -f $(distdir)/msvc/.gitattributes
21
37
 
22
38
  reldir = .release/$(distdir)
23
- dist-up: dist
39
+ sfurl = frs.sourceforge.net:/home/frs/project/libusb/libusb-1.0
40
+ .PHONY: dist-upload
41
+ dist-upload: dist
24
42
  rm -rf $(reldir)
25
43
  mkdir -p $(reldir)
26
44
  cp $(distdir).tar.bz2 $(reldir)
27
- rsync -rv $(reldir) frs.sourceforge.net:/home/frs/project/l/li/libusb/libusb-1.0/
45
+ if [ -z "$$SF_USER" ]; then \
46
+ rsync -rv $(reldir) $(sfurl); \
47
+ else \
48
+ rsync -rv $(reldir) $$SF_USER@$(sfurl); \
49
+ fi
28
50
  rm -rf $(reldir)
@@ -1,11 +1,11 @@
1
1
  # libusb
2
2
 
3
3
  [![Build Status](https://travis-ci.org/libusb/libusb.svg?branch=master)](https://travis-ci.org/libusb/libusb)
4
- [![Build status](https://ci.appveyor.com/api/projects/status/xvrfam94jii4a6lw?svg=true)](https://ci.appveyor.com/project/LudovicRousseau/libusb)
4
+ [![Build Status](https://ci.appveyor.com/api/projects/status/xvrfam94jii4a6lw?svg=true)](https://ci.appveyor.com/project/LudovicRousseau/libusb)
5
5
  [![Coverity Scan Build Status](https://scan.coverity.com/projects/2180/badge.svg)](https://scan.coverity.com/projects/libusb-libusb)
6
6
 
7
7
  libusb is a library for USB device access from Linux, macOS,
8
- Windows, OpenBSD/NetBSD and Haiku userspace.
8
+ Windows, OpenBSD/NetBSD, Haiku and Solaris userspace.
9
9
  It is written in C (Haiku backend in C++) and licensed under the GNU
10
10
  Lesser General Public License version 2.1 or, at your option, any later
11
11
  version (see [COPYING](COPYING)).
package/libusb/README.git CHANGED
@@ -33,9 +33,9 @@ public account on github, if you don't have one already, and then fork a new
33
33
  libusb repository under this account from https://github.com/libusb/libusb.
34
34
 
35
35
  Then you can create a git branch for your work, that we will be able to better
36
- reference and test.
36
+ reference and test.
37
37
 
38
38
  We also suggest that, if you are planning to bring in a large development, you
39
39
  try to involve the libusb community early by letting the mailing list know, as
40
- you may find that other people might be eager to help you out.
41
- See http://mailing-list.libusb.info for details on how to join the mailing list.
40
+ you may find that other people might be eager to help you out.
41
+ See http://mailing-list.libusb.info for details on how to join the mailing list.
@@ -17,45 +17,49 @@
17
17
  // License along with this library; if not, write to the Free Software
18
18
  // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19
19
 
20
- // libusb does not follow C99 strict aliasing rules, so disable it.
21
- GCC_STRICT_ALIASING = NO
22
-
23
- // Use C99 dialect.
24
- GCC_C_LANGUAGE_STANDARD = c99
20
+ // Use GNU11 dialect.
21
+ GCC_C_LANGUAGE_STANDARD = gnu11
25
22
 
26
23
  // Don't search user paths with <> style #includes.
27
24
  ALWAYS_SEARCH_USER_PATHS = NO
28
25
 
26
+ // Enable weak references for Objective-C
27
+ CLANG_ENABLE_OBJC_WEAK = YES
28
+
29
+ // Compiler errors.
30
+ GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES
31
+
29
32
  // Compiler warnings.
30
33
  GCC_WARN_64_TO_32_BIT_CONVERSION = YES
34
+ GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
35
+ GCC_WARN_ABOUT_MISSING_NEWLINE = YES
36
+ GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
31
37
  GCC_WARN_ABOUT_RETURN_TYPE = YES
32
- GCC_WARN_UNINITIALIZED_AUTOS = YES
33
38
  GCC_WARN_FOUR_CHARACTER_CONSTANTS = YES
34
- GCC_WARN_SHADOW = YES
35
39
  GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED = YES
36
- GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS = YES
37
- GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES
38
- GCC_WARN_ABOUT_MISSING_NEWLINE = YES
40
+ GCC_WARN_SHADOW = YES
41
+ GCC_WARN_UNINITIALIZED_AUTOS = YES
39
42
  GCC_WARN_UNKNOWN_PRAGMAS = YES
40
43
  GCC_WARN_UNUSED_FUNCTION = YES
41
44
  GCC_WARN_UNUSED_LABEL = YES
42
- GCC_WARN_UNUSED_VARIABLE = YES
43
45
  GCC_WARN_UNUSED_PARAMETER = YES
44
- CLANG_WARN_EMPTY_BODY = YES
46
+ GCC_WARN_UNUSED_VARIABLE = YES
47
+ CLANG_WARN_ASSIGN_ENUM = YES
48
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
49
+ CLANG_WARN_BOOL_CONVERSION = YES
50
+ CLANG_WARN_COMMA = YES
45
51
  CLANG_WARN_CONSTANT_CONVERSION = YES
46
- CLANG_WARN_ENUM_CONVERSION = YES
47
- CLANG_WARN_INT_CONVERSION = YES
48
52
  CLANG_WARN_DOCUMENTATION_COMMENTS = YES
49
- CLANG_WARN_BOOL_CONVERSION = YES
50
- CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES
53
+ CLANG_WARN_EMPTY_BODY = YES
54
+ CLANG_WARN_ENUM_CONVERSION = YES
51
55
  CLANG_WARN_FLOAT_CONVERSION = YES
52
- CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
53
56
  CLANG_WARN_INFINITE_RECURSION = YES
54
- CLANG_WARN_ASSIGN_ENUM = YES
57
+ CLANG_WARN_INT_CONVERSION = YES
58
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES
55
59
  CLANG_WARN_STRICT_PROTOTYPES = YES
56
- CLANG_WARN_COMMA = YES
57
60
  CLANG_WARN_SUSPICIOUS_IMPLICIT_CONVERSION = YES
58
61
 
59
62
  // Static analyzer warnings.
63
+ CLANG_ANALYZER_NONNULL = YES
60
64
  CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES
61
65
  CLANG_ANALYZER_SECURITY_INSECUREAPI_RAND = YES
@@ -1,25 +1,37 @@
1
1
  /* config.h. Manually generated for Xcode. */
2
2
 
3
- /* Default visibility */
4
- #define DEFAULT_VISIBILITY /**/
3
+ #include <AvailabilityMacros.h>
5
4
 
6
- /* Message logging */
5
+ /* Define to the attribute for default visibility. */
6
+ #define DEFAULT_VISIBILITY __attribute__ ((visibility ("default")))
7
+
8
+ /* Define to 1 to enable message logging. */
7
9
  #define ENABLE_LOGGING 1
8
10
 
9
- /* Define to 1 if you have the <poll.h> header file. */
10
- #define HAVE_POLL_H 1
11
+ /* On 10.12 and later, use newly available clock_*() functions */
12
+ #if MAC_OS_X_VERSION_MIN_REQUIRED >= 101200
13
+ /* Define to 1 if you have the `clock_gettime' function. */
14
+ #define HAVE_CLOCK_GETTIME 1
15
+ #endif
16
+
17
+ /* On 10.6 and later, use newly available pthread_threadid_np() function */
18
+ #if MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
19
+ /* Define to 1 if you have the 'pthread_threadid_np' function. */
20
+ #define HAVE_PTHREAD_THREADID_NP 1
21
+ #endif
22
+
23
+ /* Define to 1 if the system has the type `nfds_t'. */
24
+ #define HAVE_NFDS_T 1
11
25
 
12
26
  /* Define to 1 if you have the <sys/time.h> header file. */
13
27
  #define HAVE_SYS_TIME_H 1
14
28
 
15
- /* Darwin backend */
16
- #define OS_DARWIN 1
17
-
18
- /* type of second poll() argument */
19
- #define POLL_NFDS_TYPE nfds_t
29
+ /* Define to 1 if compiling for a POSIX platform. */
30
+ #define PLATFORM_POSIX 1
20
31
 
21
- /* Use POSIX Threads */
22
- #define THREADS_POSIX 1
32
+ /* Define to the attribute for enabling parameter checks on printf-like
33
+ functions. */
34
+ #define PRINTF_FORMAT(a, b) __attribute__ ((__format__ (__printf__, a, b)))
23
35
 
24
- /* Use GNU extensions */
36
+ /* Enable GNU extensions. */
25
37
  #define _GNU_SOURCE 1