diff options
author | KIMURA Masaru <hiyuh.root@gmail.com> | 2016-01-28 16:25:37 +0900 |
---|---|---|
committer | Chris Dickens <christopher.a.dickens@gmail.com> | 2016-01-28 01:06:26 -0800 |
commit | 33f51ea92fba4b69159924b565da53f6b57e8830 (patch) | |
tree | a2d08ed5efa94655fc3956e08002d48a03ac8851 | |
parent | a57f0ec1d92dc58b4872814eec1ee30152cfab29 (diff) | |
download | libusb-33f51ea92fba4b69159924b565da53f6b57e8830.tar.gz |
Windows: Move definitions for Cygwin.
Closes #145
Signed-off-by: Chris Dickens <christopher.a.dickens@gmail.com>
-rw-r--r-- | libusb/os/windows_common.h | 8 | ||||
-rw-r--r-- | libusb/os/windows_winusb.h | 8 | ||||
-rw-r--r-- | libusb/version_nano.h | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/libusb/os/windows_common.h b/libusb/os/windows_common.h index 0149e11..17a1923 100644 --- a/libusb/os/windows_common.h +++ b/libusb/os/windows_common.h @@ -37,6 +37,14 @@ #define false FALSE #endif +#if defined(__CYGWIN__ ) +#define _stricmp strcasecmp +#define _snprintf snprintf +#define _strdup strdup +// _beginthreadex is MSVCRT => unavailable for cygwin. Fallback to using CreateThread +#define _beginthreadex(a, b, c, d, e, f) CreateThread(a, b, (LPTHREAD_START_ROUTINE)c, d, e, (LPDWORD)f) +#endif + #define safe_free(p) do {if (p != NULL) {free((void*)p); p = NULL;}} while(0) #define safe_closehandle(h) do {if (h != INVALID_HANDLE_VALUE) {CloseHandle(h); h = INVALID_HANDLE_VALUE;}} while(0) #define safe_min(a, b) MIN((size_t)(a), (size_t)(b)) diff --git a/libusb/os/windows_winusb.h b/libusb/os/windows_winusb.h index 047f2e2..d544a7f 100644 --- a/libusb/os/windows_winusb.h +++ b/libusb/os/windows_winusb.h @@ -48,14 +48,6 @@ #define FACILITY_SETUPAPI 15 #endif -#if defined(__CYGWIN__ ) -#define _stricmp strcasecmp -#define _snprintf snprintf -#define _strdup strdup -// _beginthreadex is MSVCRT => unavailable for cygwin. Fallback to using CreateThread -#define _beginthreadex(a, b, c, d, e, f) CreateThread(a, b, (LPTHREAD_START_ROUTINE)c, d, e, (LPDWORD)f) -#endif - #define MAX_CTRL_BUFFER_LENGTH 4096 #define MAX_USB_DEVICES 256 #define MAX_USB_STRING_LENGTH 128 diff --git a/libusb/version_nano.h b/libusb/version_nano.h index ff9977a..b5eb186 100644 --- a/libusb/version_nano.h +++ b/libusb/version_nano.h @@ -1 +1 @@ -#define LIBUSB_NANO 11047 +#define LIBUSB_NANO 11048 |