Index: /trunk/src/kash/var.c
===================================================================
--- /trunk/src/kash/var.c	(revision 2636)
+++ /trunk/src/kash/var.c	(revision 2637)
@@ -69,9 +69,4 @@
 #endif
 
-#if defined(_MSC_VER) || defined(_WIN32)
-    /* On Windows the PATH variable is called "Path". */
-# define PC_MIXED_PATH_VAR_NAME
-#endif
-
 
 
@@ -364,4 +359,19 @@
 	int nlen;
 
+fprintf(stderr, "debug: setvareq '%s'\n", s);
+#if defined(_MSC_VER) || defined(_WIN32)
+	/* On Windows PATH is often spelled 'Path', correct this here.  */
+	if (   s[0] == 'P'
+	    && s[1] == 'a'
+	    && s[2] == 't'
+	    && s[3] == 'h'
+	    && (s[4] == '\0' || s[4] == '=') ) {
+		s[1] = 'A';
+		s[2] = 'T';
+		s[3] = 'H';
+fprintf(stderr, "debug: setvareq '%s' FIXED\n", s);
+	}
+#endif
+
 	if (aflag(psh))
 		flags |= VEXPORT;
@@ -400,17 +410,4 @@
 	if (flags & VNOSET)
 		return;
-
-#ifdef PC_MIXED_PATH_VAR_NAME
-    if (   nlen == 4 
-        && (s[0] == 'p' || s[0] == 'P')
-        && (s[1] == 'a' || s[1] == 'A')
-        && (s[2] == 't' || s[2] == 'T')
-        && (s[3] == 'h' || s[3] == 'H') ) {
-        s[0] = 'P';
-        s[1] = 'A';
-        s[2] = 'T';
-        s[3] = 'H';
-    }
-#endif
 
 	vp = ckmalloc(psh, sizeof (*vp));
@@ -928,20 +925,4 @@
 	len = (int)(p - name);
 
-#ifdef PC_MIXED_PATH_VAR_NAME
-    /* On Windows the PATH variable is called "Path". */
-    if (   len == 4 
-        && (name[0] == 'p' || name[0] == 'P') 
-        && (name[1] == 'a' || name[1] == 'A') 
-        && (name[2] == 't' || name[2] == 'T') 
-        && (name[3] == 'h' || name[3] == 'H') )
-    {
-        name = "PATH";
-		hashval = (unsigned char)'P';
-		hashval = hashval * 2 + (unsigned char)'A';
-		hashval = hashval * 2 + (unsigned char)'T';
-		hashval = hashval * 2 + (unsigned char)'H';
-    }
-#endif
-
 	if (lenp)
 		*lenp = len;
