summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPete Batard <pbatard@gmail.com>2011-04-15 02:08:10 +0100
committerPete Batard <pbatard@gmail.com>2011-04-15 02:08:10 +0100
commitd2858ef6f6cca239d470fe1f88b80fc6661becd8 (patch)
tree35775542a0cbe57f51617c18065750baa4da25d6
parent58aae150466f9dcab5e6618819ab91566338f9fa (diff)
downloadlibusb-d2858ef6f6cca239d470fe1f88b80fc6661becd8.tar.gz
[mingw] fixed Unicode support (reported by sirreal)
-rw-r--r--libusb/os/poll_windows.c2
-rw-r--r--libusb/os/threads_windows.c2
-rw-r--r--libusb/os/windows_usb.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/libusb/os/poll_windows.c b/libusb/os/poll_windows.c
index 55dbc18..9d6cea1 100644
--- a/libusb/os/poll_windows.c
+++ b/libusb/os/poll_windows.c
@@ -85,7 +85,7 @@ extern int _snprintf(char *buffer, size_t count, const char *format, ...);
static LONG (WINAPI *pInterlockedExchange)(LONG volatile *, LONG) = NULL;
#define INIT_INTERLOCKEDEXCHANGE if (pInterlockedExchange == NULL) { \
pInterlockedExchange = (LONG (WINAPI *)(LONG volatile *, LONG)) \
- GetProcAddress(GetModuleHandle("KERNEL32"), "InterlockedExchange"); \
+ GetProcAddress(GetModuleHandleA("KERNEL32"), "InterlockedExchange");\
if (pInterlockedExchange == NULL) { \
usbi_err(NULL, "InterlockedExchange is unavailable"); \
return; \
diff --git a/libusb/os/threads_windows.c b/libusb/os/threads_windows.c
index fe84ec0..0edd6d1 100644
--- a/libusb/os/threads_windows.c
+++ b/libusb/os/threads_windows.c
@@ -33,7 +33,7 @@
static LONG (WINAPI *pInterlockedExchange)(LONG volatile *, LONG) = NULL;
#define INIT_INTERLOCKEDEXCHANGE if (pInterlockedExchange == NULL) { \
pInterlockedExchange = (LONG (WINAPI *)(LONG volatile *, LONG)) \
- GetProcAddress(GetModuleHandle("KERNEL32"), "InterlockedExchange"); \
+ GetProcAddress(GetModuleHandleA("KERNEL32"), "InterlockedExchange");\
if (pInterlockedExchange == NULL) return ((errno=ENOENT)); \
}
#endif
diff --git a/libusb/os/windows_usb.c b/libusb/os/windows_usb.c
index 2e6c6ac..3a56fbe 100644
--- a/libusb/os/windows_usb.c
+++ b/libusb/os/windows_usb.c
@@ -108,7 +108,7 @@ static int composite_copy_transfer_data(struct usbi_transfer *itransfer, uint32_
static LONG (WINAPI *pInterlockedExchange)(LONG volatile *, LONG) = NULL;
#define INIT_INTERLOCKEDEXCHANGE if (pInterlockedExchange == NULL) { \
pInterlockedExchange = (LONG (WINAPI *)(LONG volatile *, LONG)) \
- GetProcAddress(GetModuleHandle("KERNEL32"), "InterlockedExchange"); \
+ GetProcAddress(GetModuleHandleA("KERNEL32"), "InterlockedExchange");\
if (pInterlockedExchange == NULL) { \
usbi_err(NULL, "InterlockedExchange is unavailable"); \
return 1; \
@@ -117,7 +117,7 @@ static LONG (WINAPI *pInterlockedExchange)(LONG volatile *, LONG) = NULL;
static LONG (WINAPI *pInterlockedIncrement)(LONG volatile *) = NULL;
#define INIT_INTERLOCKEDINCREMENT if (pInterlockedIncrement == NULL) { \
pInterlockedIncrement = (LONG (WINAPI *)(LONG volatile *)) \
- GetProcAddress(GetModuleHandle("KERNEL32"), "InterlockedIncrement");\
+ GetProcAddress(GetModuleHandleA("KERNEL32"), "InterlockedIncrement");\
if (pInterlockedIncrement == NULL) { \
usbi_err(NULL, "IInterlockedIncrement is unavailable"); \
return LIBUSB_ERROR_NOT_FOUND; \