summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pete@akeo.ie>2011-11-15 01:11:12 +0000
committerPete Batard <pete@akeo.ie>2011-11-15 01:11:12 +0000
commit67826b8f80dd5c0d2fdb10ce238db25d1659bb3b (patch)
treef5bdc001f4ec90001e30c41637096b5ec93b7e05
parent65c4ed8f263cdfc50f610a54b5d51027bba3dbc8 (diff)
downloadlibusb-67826b8f80dd5c0d2fdb10ce238db25d1659bb3b.tar.gz
[msvc] fix additional MSVC6 errors and warnings
* error C2065: 'LONG_PTR' : undeclared identifier; in poll_windows * warning C4761: integral size mismatch in argument; in libusb.h * issue reported by Satz Klauer
-rw-r--r--libusb/libusb.h2
-rw-r--r--libusb/os/poll_windows.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/libusb/libusb.h b/libusb/libusb.h
index a0ffab8..e29c9b8 100644
--- a/libusb/libusb.h
+++ b/libusb/libusb.h
@@ -1315,7 +1315,7 @@ static inline int libusb_get_string_descriptor(libusb_device_handle *dev,
uint8_t desc_index, uint16_t langid, unsigned char *data, int length)
{
return libusb_control_transfer(dev, LIBUSB_ENDPOINT_IN,
- LIBUSB_REQUEST_GET_DESCRIPTOR, (LIBUSB_DT_STRING << 8) | desc_index,
+ LIBUSB_REQUEST_GET_DESCRIPTOR, (uint16_t)((LIBUSB_DT_STRING << 8) | desc_index),
langid, data, (uint16_t) length, 1000);
}
diff --git a/libusb/os/poll_windows.h b/libusb/os/poll_windows.h
index fee89f5..4cc345b 100644
--- a/libusb/os/poll_windows.h
+++ b/libusb/os/poll_windows.h
@@ -38,7 +38,7 @@
#define STATUS_COMPLETED_SYNCHRONOUSLY STATUS_REPARSE
#define HasOverlappedIoCompletedSync(lpOverlapped) (((DWORD)(lpOverlapped)->Internal) == STATUS_COMPLETED_SYNCHRONOUSLY)
-#define DUMMY_HANDLE ((HANDLE)(LONG_PTR)-2)
+#define DUMMY_HANDLE ((HANDLE)(LONG)-2)
enum windows_version {
WINDOWS_UNSUPPORTED,