557 Commits

Author SHA1 Message Date
Pete Batard 30b42bc654 creates MinGW and MS DLLs that are fully interchangeable
1. because we use WINAPI, the def file MUST have the @n aliases - there's no way around as MinGW's .o use decoration always for __stdcall, and this can't be turned off
2. our "dumb" autogen create_def() script simply creates the whole range of aliases (we might improve on this in the future)
3. dlltool must be called manually to create the import lib from the def, *with the --kill-at option*
4. a CREATE_IMPORT_LIB autotools variable is introduced to selectively run dlltool or not
pbr293
2010-08-05 01:33:49 +01:00
Pete Batard d91b872c4c more safe string macros improvements pbr292 2010-08-03 11:50:22 +01:00
Pete Batard f5e41f3b7b fixed bad .def directory for MSVC6 DLL project file 2010-08-03 01:44:20 +01:00
Pete Batard fce997a8c6 [INTERNAL - NOT FOR RELEASE] include .def in binary snapshot 2010-08-02 23:17:36 +01:00
Pete Batard 7f4f7bd753 reverted to using a (generated) .def file for DLL exports
added libusb-1.0.def (plus reference in MS projects)
removed LIBUSB_EXP/__declspec(dllexport) from libusb.h
removed LIBUSB_DLL_BUILD macros
added -Wl,--add-stdcall-alias linker option for MinGW/cygwin for DLL generation
added sed script in autogen to update the libusb-1.0.def
pbr291
2010-08-02 23:13:17 +01:00
Pete Batard c9b0a3b82e minor improvements
cast pointer to void* for safe_free
always use safe_strlen in lieu of strlen
avoid the use of a strlen parameter in a macro
don't feed negative values to min() in safe_strncat
set uninitialized DLL functions to NULL
2010-08-02 12:40:24 +01:00
Pete Batard 8b5f31e568 fixed bad cleanup in winusb_release_interface()
also minor fixes (whitespace, debug output)
pbr290
2010-08-01 23:31:20 +01:00
Pete Batard 8c3473b0ca fixed mishandling of null terminators in safe_strncpy() 2010-08-01 22:09:29 +01:00
Pete Batard 48ce4304c8 fixed bad string duplication for WinUSB paths pbr289 2010-07-31 01:54:21 +01:00
Pete Batard b5820d34ad enforce proper line terminators for MSVC and .sh files 2010-07-31 01:03:39 +01:00
Pete Batard 972106d2c8 more residuals from official: samples pbr288 2010-07-30 00:02:18 +01:00
Pete Batard b315c285a1 more residuals from official: core 2010-07-30 00:02:02 +01:00
Pete Batard 543371cc8f more residuals from official: core 2010-07-29 23:38:26 +01:00
Pete Batard 5eb857963e fixed residuals from official: autogen.sh 2010-07-29 23:05:17 +01:00
Pete Batard 92c7e620a7 fix -Wshadow warnings for cywgin
does so by setting gcc to -std=c99 instead -std=gnu99 for MinGW/cygwin
pbr287
2010-07-29 22:50:00 +01:00
Pete Batard b92d19b89b fix missing linefeeds at the end of windows_usb.c/h 2010-07-29 22:47:59 +01:00
Pete Batard c700fff1b0 removed double entry in AUTHORS 2010-07-29 20:10:47 +01:00
Pete Batard b9da60b4d5 fixed residuals from official for autoconf/automake 2010-07-29 20:08:18 +01:00
Pete Batard f3360dd288 fixed -Wshadow compilation errors when using cygwin
NB: this only fixes -Wshadow errors, not -Wshadow warnings
2010-07-29 20:08:15 +01:00
Pete Batard 48e1898980 fixed residuals from official for core files 2010-07-29 20:08:12 +01:00
Pete Batard 84d996b482 fixed residuals from official for Darwin 2010-07-29 20:08:09 +01:00
Pete Batard 7659e6b1b2 [INTERNAL - NOT FOR RELEASE] added MinGW64 to "daily" builds 2010-07-29 15:53:52 +01:00
Xiaofan Chen 9a515b7da4 fixed inconsistencies between prototypes and declarations pbr286 2010-07-29 13:30:48 +01:00
Michael Plante f0c40ad811 merged backend integration changes from official branch 2010-07-29 13:11:49 +01:00
Aurelien Jarno 96cd678c93 fix bashisms 2010-07-29 12:45:30 +01:00
Daniel Drake 435760539e bring autoconf/automake in line with official 2010-07-29 12:42:25 +01:00
Daniel Drake 1867c7103b Add reference counting to default context
Michael Plante pointed out that if 2 users call libusb_init(NULL) within
a process, we end up creating 2 default contexts, one of which is lost.

Add reference counting so that the default context is reused and
destroyed only after the last user.
pbr285
2010-07-29 12:18:45 +01:00
Daniel Drake 30b5fbb87c Fix libusb_init() error handling
9996ccaed7 introduced a problem in that mutexes could be destroyed
in the error handling codepath before they had been created.
Pointed out by Michael Plante.
2010-07-29 11:56:55 +01:00
Hoi-Ho Chan f1cc768c9f Darwin: handle kIOReturnUnderrun
This return code indicates that the device returned a data packet
less than the max packet size. In libusb backend terms, this is
a successful transfer.
pbr284
2010-07-29 11:25:18 +01:00
Hoi-Ho Chan 8f014a89fb Darwin: write iso transfer details into correct packets 2010-07-29 11:25:11 +01:00
Nathan Hjelm 82cb50a5ab Darwin: fix interface object leak 2010-07-29 11:24:56 +01:00
Nathan Hjelm a58e3973ad Darwin: clean up some debug messages 2010-07-29 11:24:51 +01:00
Nathan Hjelm fd040e48bb Darwin: Don't open devices during scan unless we have to unsuspend 2010-07-29 11:24:44 +01:00
Peter Stuge bfd95f6a63 Linux: Handle early complete of multi-URB transfer 2010-07-29 11:24:35 +01:00
Daniel Drake db223f0879 Linux: Fix log message commit
Forgot to test this.
2010-07-29 11:20:54 +01:00
Ludovic Rousseau 65faf21426 Only initialize the default context when it is requested 2010-07-29 11:19:17 +01:00
Daniel Drake 68052b3371 Linux: fix log message that was being unconditionally sent to stderr (#44)
This message was put in place to aid libusb-compat-0.1 users, who
may run into the change that libusb-0.1 allowed you to usb_open() a
device that you don't have write access to, but libusb-1.0 does not.

As explained on the ticket this change is dangerous so it should go through
the usual logging mechanism. I also added a similar regular log message
to libusb-compat-0.1.
2010-07-29 11:17:35 +01:00
Pete Batard 1ebd8c9052 improved readout of string descriptors in xusb
reads man/prod/ser strings using the relevant string index
pbr283
2010-06-14 22:07:19 +01:00
Pete Batard 207f9744b5 fixed string indexes being ignored by HID
issue reported by Axel Rohde
2010-06-14 18:50:39 +01:00
Ludovic Rousseau 593eac205d Fix 2 documentation typos pbr282 2010-06-11 10:20:24 +01:00
Ludovic Rousseau 8732049ff3 add AM_MAINTAINER_MODE 2010-06-11 10:20:21 +01:00
Pete Batard c2e1ab94d9 added usbi_fd_notification to libusbi.h
(official's fc0af8e3f7)
2010-06-11 10:18:17 +01:00
Pete Batard ca21ddfa42 [INTERNAL - NOT FOR RELEASE] attempt to workaround trac issues 2010-06-09 13:57:27 +01:00
Pete Batard 6c18964a6d additional HID error messages pbr281 2010-05-24 20:33:16 +01:00
Pete Batard 63f97c600e improved auto-release with support for concurrent auto-claim
also switched to using the __device_handle_priv macro everywhere and factorized the autoclaim/autorelease calls.
2010-05-24 20:22:59 +01:00
Pete Batard 5d23127898 added auto-release to autoclaim pbr280 2010-05-24 15:41:33 +01:00
Pete Batard 1688e69d7c use LIBUSB_DEVADDR_MAX for HCDs
Using 0 can conflict with driverless devices.
pbr279
2010-05-21 13:43:59 +01:00
Pete Batard 006828e61c additional warning fixes & clarification for DDK's OACR/Prefast 2010-05-21 12:14:46 +01:00
Pete Batard c8a7c320b6 re-enabled autoclaim + fixed autoclaim related ifdefs 2010-05-21 12:13:08 +01:00
Pete Batard 77fb9c63d7 changed the DuplicateHandle failure from warning to debug
This is because WinUSB handles are not duplicable, and generate a lot of these warnings.
2010-05-21 11:40:43 +01:00