diff options
author | Pete Batard <pbatard@gmail.com> | 2010-01-30 01:40:41 +0000 |
---|---|---|
committer | Pete Batard <pbatard@gmail.com> | 2010-01-30 01:40:41 +0000 |
commit | bf4f54160c313c6052c470d1516acce84e55f98a (patch) | |
tree | 19f82c669717a6af0c00ddbf1a678f748f633399 /libusb | |
parent | afe70cedf774436981defb900c5eb78d13ec13d0 (diff) | |
download | libusb-bf4f54160c313c6052c470d1516acce84e55f98a.tar.gz |
r124: removes #error on previous commit and fixes thing ourselves
Diffstat (limited to 'libusb')
-rw-r--r-- | libusb/libusb.h | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h index 277f040..5326fa4 100644 --- a/libusb/libusb.h +++ b/libusb/libusb.h @@ -32,20 +32,20 @@ #include <time.h> #include <limits.h> -// 'interface' might be defined as a macro on Windows, so we need to undefine -// it so as not to break the current libusb API, because libusb_config_descriptor -// has an 'interface' member -// As this could still be problematic if you include windows.h after libusb.h in -// your sources, we attempt to detect that as well. -#if defined(OS_WINDOWS) -#if !defined(interface) && !defined(_WINDOWS_) -#error "Please make sure you include both windows.h and libusb.h in your source, in that order." -#elif defined(interface) -#undef interface +/* 'interface' might be defined as a macro on Windows, so we need to + * undefine it so as not to break the current libusb API, because + * libusb_config_descriptor has an 'interface' member + * As this can be problematic if you include windows.h after libusb.h + * in your sources, we force windows.h to be included first. */ +#if !defined(_WINDOWS_) +#include <windows.h> #endif + +#if defined(interface) +#undef interface #endif -// MSVC doesn't know ssize_t +/* MSVC doesn't know ssize_t */ #if !defined(ssize_t) #if defined (_WIN64) #define ssize_t __int64 |