Tcl Source Code

Artifact [9ece99d58b]
Login

Artifact 9ece99d58b9f483a8beb01264b5008e72624c1b4:

Attachment "tcl-HEAD-cmd.patch" to ticket [3160696fff] added by zoro2 2011-01-18 17:52:23.
--- win/tclWinFile.c	2010-12-16 09:52:37.000000000 +0100
+++ win/tclWinFile.c	2011-01-07 12:12:05.000000000 +0100
@@ -1752,7 +1752,7 @@
  * NativeIsExec --
  *
  *	Determines if a path is executable. On windows this is simply defined
- *	by whether the path ends in any of ".exe", ".com", or ".bat"
+ *	by whether the path ends in any of ".exe", ".com", ".cmd" or ".bat"
  *
  * Results:
  *	1 = executable, 0 = not.
@@ -1776,6 +1776,7 @@
 
     if ((_tcsicmp(path+len-3, TEXT("exe")) == 0)
 	    || (_tcsicmp(path+len-3, TEXT("com")) == 0)
+	    || (_tcsicmp(path+len-3, TEXT("cmd")) == 0)
 	    || (_tcsicmp(path+len-3, TEXT("bat")) == 0)) {
 	return 1;
     }
Only in tcl-8.6b1.2/win: .tclWinFile.c.swp
diff -ur tcl-8.6b1.2-orig/win/tclWinPipe.c tcl-8.6b1.2/win/tclWinPipe.c
--- tcl-8.6b1.2-orig/win/tclWinPipe.c	2010-10-12 12:21:55.000000000 +0200
+++ tcl-8.6b1.2/win/tclWinPipe.c	2011-01-07 12:11:25.000000000 +0100
@@ -899,7 +899,7 @@
  *
  *	The complete Windows search path is searched to find the specified
  *	executable. If an executable by the given name is not found,
- *	automatically tries appending ".com", ".exe", and ".bat" to the
+ *	automatically tries appending ".com", ".exe", ".cmd" and ".bat" to the
  *	executable name.
  *
  * Results:
@@ -1296,7 +1296,7 @@
     Tcl_DString nameBuf, ds;
     const TCHAR *nativeName;
     TCHAR nativeFullPath[MAX_PATH];
-    static char extensions[][5] = {"", ".com", ".exe", ".bat"};
+    static char extensions[][5] = {"", ".com", ".exe", ".cmd", ".bat"};
 
     /*
      * Look for the program as an external program. First try the name as it