core: Fix --disable-log option to remove logging functionality
authorChris Dickens <christopher.a.dickens@gmail.com>
Thu, 6 Jul 2017 01:42:25 +0000 (18:42 -0700)
committerChris Dickens <christopher.a.dickens@gmail.com>
Mon, 10 Jul 2017 04:28:57 +0000 (21:28 -0700)
commit32ef4335d421be1674fd9fa2b34a6433f8e473ea
tree185eec91d08b8f8c98a18644d52b59755864a3a7
parentfc49cc10ba7e979f02bacacc10c6805c25e43c92
core: Fix --disable-log option to remove logging functionality

Prior to this commit, building the library with the '--disable-log'
option would compile out the debug messages, but the logging functions
remained and would never be used. This commit brings the logging
functions themselves into consideration when building the library.

Additionally, the logging code has been optimized to compile away
unnecessary checks when the '--enable-debug-log' is used and to remove
the debug variables from the context if the library is compiled in such
a way that the debug level is not configurable.

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