14 Commits

Author SHA1 Message Date
Pete Batard 02043e6e0e removed _debug suffix for debug DLL 2010-08-17 15:49:14 +01:00
Pete Batard f5e41f3b7b fixed bad .def directory for MSVC6 DLL project file 2010-08-03 01:44:20 +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
2010-08-02 23:13:17 +01:00
Pete Batard b5820d34ad enforce proper line terminators for MSVC and .sh files 2010-07-31 01:03:39 +01:00
Michael Plante 7e0a17af9d removed need for .def file, added LIBUSB_EXP 2010-04-19 03:23:16 +01:00
Michael Plante 0b64e01b61 let MSVC re-sort filenames based on very old renames 2010-04-15 23:22:28 +01:00
Michael Plante 1597a94532 reverted to MS defaults in MSVC6 .dsp project file 2010-04-15 23:21:33 +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 666106e836 more residual cleanup (Michael Plante) 2010-03-03 20:36:46 +00:00
Pete Batard 5ca0d11008 residual corrections from previous commits (Michael Plante) 2010-03-03 20:19:44 +00:00
Pete Batard 32f130a540 renamed windows_compat to poll_windows 2010-03-02 16:13:33 +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 72c4defd45 r101: MSVC6 & VS 2005 updates (Michael Plante & Orin Eman) 2010-01-21 20:01:45 +00:00