Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use strcasecmp() instead of stricmp() on cygwin #104

Closed
hiyuh opened this issue Sep 30, 2015 · 1 comment
Closed

use strcasecmp() instead of stricmp() on cygwin #104

hiyuh opened this issue Sep 30, 2015 · 1 comment

Comments

@hiyuh
Copy link
Contributor

@hiyuh hiyuh commented Sep 30, 2015

SSIA.
following is snippet from build log,

os/windows_usb.c: In function ‘get_sub_api’:
os/windows_usb.c:747:4: error: implicit declaration of function ‘stricmp’ [-Werror=implicit-function-declaration]
    if (safe_stricmp(tok, usb_api_backend[api].driver_name_list[i]) == 0) {
    ^

following is a proposed fix,

diff --git a/libusb/os/windows_usb.h b/libusb/os/windows_usb.h
index 35fd2f2..4f3de69 100644
--- a/libusb/os/windows_usb.h
+++ b/libusb/os/windows_usb.h
@@ -48,7 +48,7 @@
 #endif

 #if defined(__CYGWIN__ )
-#define _stricmp stricmp
+#define _stricmp strcasecmp
 #define _snprintf snprintf
 #define _strdup strdup
 // _beginthreadex is MSVCRT => unavailable for cygwin. Fallback to using CreateThread
@hiyuh hiyuh changed the title use strcasecmp() instead of stricmp() on cygwin. use strcasecmp() instead of stricmp() on cygwin Sep 30, 2015
@yselkowitz
Copy link

@yselkowitz yselkowitz commented Nov 4, 2015

Bug and fix confirmed.

@dickens dickens closed this in 3313f48 Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants