summaryrefslogtreecommitdiff
path: root/libusb
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2010-01-19 01:36:19 +0000
committerPete Batard <pbatard@gmail.com>2010-01-19 01:36:19 +0000
commit4375c792254b81cee01cf80b6409c39494023159 (patch)
tree255339788400a1a70b667f363d83d3eb18bac395 /libusb
parente158221159aebdc6a1c6eb9d56ac258a5e69ab32 (diff)
downloadlibusb-4375c792254b81cee01cf80b6409c39494023159.tar.gz
r91: additional MSVC fixes
- use of api/sdkddkver.h for Win7 version and greater reliance on DDK files (Orin Eman) - reorganized includes in windows_usb.c
Diffstat (limited to 'libusb')
-rw-r--r--libusb/os/windows_usb.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index 4ebfcaf..92fad9e 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -18,34 +18,30 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-// If using Visual Studio 2008 or earlier, Windows 7 is not defined...
#if defined(_MSC_VER)
-#if !defined(_WIN32_WINNT_WIN7)
-#define _WIN32_WINNT_WIN7 0x601
-#endif
#include <config_msvc.h>
-#else
-#include <config.h>
-#endif
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sched.h>
-#include <pthread.h>
-#include <stdio.h>
-#include <windows.h>
-#include <setupapi.h>
-#if defined(_MSC_VER)
+#include <api/sdkddkver.h> // Windows 7 version for MSVC is defined here
+#include <api/windows.h>
+#include <api/setupapi.h>
#include <api/sal_supp.h>
#include <api/driverspecs.h>
#include <api/usbiodef.h>
#include <api/usbioctl.h>
#include <api/cfgmgr32.h>
#else
+#include <config.h>
+#include <windows.h>
+#include <setupapi.h>
#include <ddk/usbiodef.h>
#include <ddk/usbioctl.h>
#include <ddk/cfgmgr32.h>
#endif
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sched.h>
+#include <pthread.h>
+#include <stdio.h>
#include <inttypes.h>
#include <objbase.h> // for string to GUID conv. requires libole32.a