core: Convert internal macros to static inline functions
authorChris Dickens <christopher.a.dickens@gmail.com>
Sat, 25 Jan 2020 20:10:04 +0000 (12:10 -0800)
committerChris Dickens <christopher.a.dickens@gmail.com>
Sat, 25 Jan 2020 20:10:04 +0000 (12:10 -0800)
commit7bc0ff3ce94572f3e52718938e4beb4c7a86bfff
treed94640a7edf402b2373b5cc4cfb84881e9c4bfb6
parent221e8196221a6ede462914daf6c2652d57843df6
core: Convert internal macros to static inline functions

Older versions of the Visual Studio compiler are picky about macros
constructed with the 'do { ... } while (0)' construct. Convert these
internal ones to static inline functions. The result is functionally
equivalent but gets us type checking and a bit more readability.

Also address some compiler warnings due to some header files that are
being included in a different order than before.

Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
12 files changed:
libusb/core.c
libusb/hotplug.c
libusb/io.c
libusb/libusbi.h
libusb/os/poll_windows.c
libusb/os/poll_windows.h
libusb/os/threads_windows.c
libusb/os/threads_windows.h
libusb/os/windows_winusb.c
libusb/os/windows_winusb.h
libusb/version_nano.h
msvc/config.h