summaryrefslogtreecommitdiffstats
path: root/win/tclWinFile.c
diff options
context:
space:
mode:
authorvincentdarley <vincentdarley>2004-05-17 10:38:22 (GMT)
committervincentdarley <vincentdarley>2004-05-17 10:38:22 (GMT)
commitca9f53824153cabd6f7cf69459b76b2abfff52db (patch)
treebede6f5bbb4c34cdd88124c5780d2fa5b5c1def3 /win/tclWinFile.c
parent5ba4b8df5392010f34479ed7234f95db76dcf672 (diff)
downloadtcl-ca9f53824153cabd6f7cf69459b76b2abfff52db.zip
tcl-ca9f53824153cabd6f7cf69459b76b2abfff52db.tar.gz
tcl-ca9f53824153cabd6f7cf69459b76b2abfff52db.tar.bz2
fix to case sensitive 'file executable' on Windows
Diffstat (limited to 'win/tclWinFile.c')
-rw-r--r--win/tclWinFile.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index b7af7d0..14c4995 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclWinFile.c,v 1.62 2004/04/07 22:04:30 hobbs Exp $
+ * RCS: @(#) $Id: tclWinFile.c,v 1.63 2004/05/17 10:38:22 vincentdarley Exp $
*/
//#define _WIN32_WINNT 0x0500
@@ -1503,9 +1503,12 @@ NativeIsExec(nativePath)
return 0;
}
- if ((memcmp((char*)(path+len-3),L"exe",3*sizeof(WCHAR)) == 0)
- || (memcmp((char*)(path+len-3),L"com",3*sizeof(WCHAR)) == 0)
- || (memcmp((char*)(path+len-3),L"bat",3*sizeof(WCHAR)) == 0)) {
+ /*
+ * Use wide-char case-insensitive comparison
+ */
+ if ((_wcsicmp(path+len-3,L"exe") == 0)
+ || (_wcsicmp(path+len-3,L"com") == 0)
+ || (_wcsicmp(path+len-3,L"bat") == 0)) {
return 1;
}
} else {