18 Commits

Author SHA1 Message Date
Pete Batard 6a3c5a6fa4 merged latest official changes
* up to e65f69a7ef
2010-09-20 16:09:23 +01:00
Michael Plante 630747c549 more explicit toggable debug options
also re-added usbi_dbg() default context creation message
2010-04-15 23:25:28 +01:00
Pete Batard a46b420214 added toggable debug logging (MSVC) 2010-04-06 21:12:47 +01:00
Pete Batard a5fc611142 stdint.h fixes for MSVC6 2010-04-02 18:37:21 +01:00
Pete Batard d4ae5cd66d use public domain inttypes.h and stdint.h (from MinGW-w64) 2010-04-02 14:00:56 +01:00
Pete Batard 3b9f2d3288 commented out ENABLE_DEBUG_LOGGING for release 2010-03-29 16:30:23 +01:00
Pete Batard 858b13ab77 moved libusb-1.0.rc to libusb/ (where the .def is located) 2010-03-06 00:37:21 +00:00
Pete Batard 4ef54da318 removed resource.h 2010-03-06 00:21:40 +00:00
Pete Batard 9ac1a90bdf added msvc/config.h inclusion error for MinGW/cygwin 2010-03-03 02:56:27 +00:00
Pete Batard 8d4f2913ba fixed obsolete config_msvc.h and pthread-win32 references
also cleaned up msvc/config.h
2010-02-24 16:36:48 +00:00
Pete Batard c83b94c78f merge abstraction for POSIX Threads and integration changes (Michael Plante, Peter Stuge)
v1.0.6 release

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

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

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

Add internal abstraction for POSIX Threads
This prepares for a Windows backend without dependency on pthreads-w32.

pthread_* is renamed to usbi_* and PTHREAD_* to USBI_*.

A usbi_mutex_static_t and usbi_mutex_static_lock() and _unlock() are
introduced for statically initialized mutexes, since they may be
implemented using other types when pthreads mutexes aren't used.

Move -pthread from libusb/Makefile.am to host-specific AM_CFLAGS in
configure.ac. AM_CFLAGS is already used in Makefile.am.

(Numerous merge conflicts resolved by Michael Plante)

misc fixes to pthreads abstraction
* windows_compat.h should not be directly included (use libusbi.h)
* windows_usb.c still had some references to pthread_mutex_[un]lock

Add libusb_strerror() to get short error message in English from enum
(Merge conflicts resolved by Michael Plante)

Better cleanup on errors, stricter types and some good casts
Avoid various memory leaks in error code paths and remove warnings. Also
add usbi_cond_destroy in os/threads_posix.h because it's used for cleanup
now.

(Merge conflicts resolved by Michael Plante)

Rename all interface parameters to usb_interface or interface_number
(Merge conflicts resolved by Michael Plante)

Add type parameter to the list_for_each_entry() and _safe() macros
(Merge conflicts resolved by Michael Plante)

VA_ARGS workaround for logging with MSVC6
(Merge conflicts resolved by Michael Plante)

Fix context memory leak in libusb_init()
* Now holds default_context_lock for duration of libusb_init
* Doesn't allocate it if not needed

Fix the last MSVC /W3 warning

removal of pthreads from MSVC and mingw
* removed pthread*.lib from linking in msvc6 (2005/8 not yet edited)
* added threads_windows.[ch] to all project files in msvc6
* added usbi_cond_signal to both threading versions, unused
* added native windows threading code, now used

removed redundant time.h includes

removed pthread-win32 informational solution files

updated MSVC 2005/2008 for thread abstraction

fixed DDK build

fixed cygwin's use of POSIX threads

fixed dpfp/dpfp_threaded for MinGW compatibility

config_msvc.h -> msvc/config.h

pthread abstraction for DLL project files

fixed bad reference to thread_windows in 2005 DLL vcproj

cygwin ifdef is not required in threads_windows.h - removed

fixed residuals from previous patches

moved thread source detection into autotool scripts
2010-02-24 11:29:43 +00:00
Pete Batard 95eccbda1f r113: HID part 4 (feature complete) + rc file copyright update (Peter Stuge) 2010-01-25 17:39:29 +00:00
Michael Plante c1978b3955 r108: Made version info more easily configurable by hand and made OriginalFilename depend on debug vs release 2010-01-24 22:51:01 +00:00
Pete Batard 8949436aaf r107: removed unnecessary dependency on MFC in the resource script 2010-01-24 22:46:36 +00:00
Pete Batard 0c568de2e3 r95: added .rc file for DLL (Michael Plante & Orin Eman) 2010-01-21 01:52:52 +00:00
Pete Batard ed6d3b36b8 r87: fixed empty lines at the start of sln files 2010-01-16 22:24:30 +00:00
Pete Batard d2f60798db r86: VS2005 compatibility update and pthread-win32_x64 helpers
Minor comment clarification in libusb.h
2010-01-16 15:20:51 +00:00
Pete Batard a32c101a47 svn r52: MSVC compatibility update:
- changed ssize_t to int for libusb_get_device_list (do we really expect that
many devices?). Also in lsusb.c
- redefined inline to __inline in libusb.h
- remove the unistd.h include for OS_WINDOWS
- api/ vs ddk/ for ddk includes
- changed variadics using ,fmt... to ,... and __VA_ARGS__
- list_for_each_entry now requires a type parameter
- libusb_cpu_to_le16 as inline
- time.h vs sys/time.h
- harmonization of #ifdef vs #if defined() within individual files
- defined an empty __drv_preferredFunction(func,why) before #include
<cfgmgr32.h>, as it only applies to obsolete functions
- excluded USB_HUB_CAPS redefinition from MSVC
- new msvc top directory for includes (stdint.h inttypes.h and pthread)
- new config_msvc.h file
- new README_MSVC and MSVC project files
- removed various warnings (signed/unsigned comparisons, cast, etc)
2010-01-14 01:31:38 +00:00