summaryrefslogtreecommitdiff
path: root/libusb
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-01-15 20:57:52 +0000
committerPete Batard <pbatard@gmail.com>2010-01-15 20:57:52 +0000
commit82ab1e7dc6229cf3513d64722c9a872325389f91 (patch)
tree1f696e4f201737fa48e2d780d0091ec336054769 /libusb
parentb96e16e75ffc2b3bdd76ec5457d37d092f0a2590 (diff)
downloadlibusb-82ab1e7dc6229cf3513d64722c9a872325389f91.tar.gz
r81: amend previous workaround (should only apply to non Windows platforms)
Diffstat (limited to 'libusb')
-rw-r--r--libusb/libusb.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h
index d345727..8caa3e2 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -23,6 +23,7 @@
#include <stdint.h>
#ifdef _MSC_VER
+#define inline __inline
#include <time.h>
#else
#include <sys/time.h>
@@ -31,12 +32,11 @@
#include <time.h>
#include <limits.h>
-// Work around for Windows "interface" macro redefinition
-#ifdef _MSC_VER
-#define inline __inline
-#pragma push_macro("interface")
-#endif
-#ifndef interface
+// Work around for existing libusb 1.0 code that might have used "interface"
+// instead of the newer "usb_interface", in libusb_config_descriptor.
+// "interface" was changed to "usb_interface" to work around macro redefinition
+// issues on Windows platforms.
+#if !defined(OS_WINDOWS) && !defined(interface)
#define interface usb_interface
#endif
@@ -1245,7 +1245,4 @@ void libusb_set_pollfd_notifiers(libusb_context *ctx,
}
#endif
-#ifdef _MSC_VER
-#pragma pop_macro("interface")
-#endif
#endif