--- configure.in~0	2006-04-01 12:36:40.000000000 +0300
+++ configure.in	2006-08-18 21:12:32.828125000 +0300
@@ -384,6 +384,8 @@
     ;;
 esac
 
+AC_DEFINE_UNQUOTED(PATH_SEPARATOR_CHAR,'$PATH_SEPARATOR',[Define to the character that separates directories in PATH.])
+
 # Include the Maintainer's Makefile section, if it's here.

 MAINT_MAKEFILE=/dev/null

--- make.h~0	2006-02-16 03:54:43.000000000 +0200
+++ make.h	2006-08-18 21:12:32.859375000 +0300
@@ -347,12 +347,14 @@
 #define S_(msg1,msg2,num)   ngettext (msg1,msg2,num)

 /* Handle other OSs.  */
-#if defined(HAVE_DOS_PATHS)
-# define PATH_SEPARATOR_CHAR ';'
-#elif defined(VMS)
-# define PATH_SEPARATOR_CHAR ','
-#else
-# define PATH_SEPARATOR_CHAR ':'
+#ifndef PATH_SEPARATOR_CHAR
+# if defined(HAVE_DOS_PATHS)
+#  define PATH_SEPARATOR_CHAR ';'
+# elif defined(VMS)
+#  define PATH_SEPARATOR_CHAR ','
+# else
+#  define PATH_SEPARATOR_CHAR ':'
+# endif
 #endif

 /* This is needed for getcwd() and chdir().  */

--- job.c~0	2006-03-19 19:03:04.000000000 -0800
+++ job.c	2006-08-25 10:40:17.281814300 -0700
@@ -2307,6 +2307,13 @@
                              "login", "logout", "read", "readonly", "set",
                              "shift", "switch", "test", "times", "trap",
                              "umask", "wait", "while", 0 };
+# ifdef HAVE_DOS_PATHS
+  /* This is required if the MSYS/Cygwin ports (which do not define
+     WINDOWS32) are compiled with HAVE_DOS_PATHS defined, which uses
+     sh_chars_sh[] directly (see below).  The value is identical to
+     the one above for WINDOWS32 platforms.  */
+  static char sh_chars_sh[] = "#;\"*?[]&|<>(){}$`^";
+# endif	 /* HAVE_DOS_PATHS */
 #endif
   register int i;
   register char *p;
@@ -2459,7 +2466,11 @@
 	  else
 	    *ap++ = *p;
 	}
+#ifdef HAVE_DOS_PATHS
+      else if (strchr (sh_chars_sh, *p) != 0)
+#else
       else if (strchr (sh_chars, *p) != 0)
+#endif
 	/* Not inside a string, but it's a special char.  */
 	goto slow;
 #ifdef  __MSDOS__
@@ -2748,7 +2759,11 @@
 	if (unixy_shell && !batch_mode_shell &&
             (*p == '\\' || *p == '\'' || *p == '"'
              || isspace ((unsigned char)*p)
+#ifdef HAVE_DOS_PATHS
+             || strchr (sh_chars_sh, *p) != 0))
+#else
              || strchr (sh_chars, *p) != 0))
+#endif
 	  *ap++ = '\\';
 #ifdef __MSDOS__
         else if (unixy_shell && strneq (p, "...", 3))
   
--- config/dospaths.m4~0	2006-03-10 06:20:45.000000000 +0200
+++ config/dospaths.m4	2006-08-18 21:12:32.859375000 +0300
@@ -22,7 +22,7 @@
     AC_CACHE_CHECK([whether system uses MSDOS-style paths], [ac_cv_dos_paths],
       [
         AC_COMPILE_IFELSE([
-#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __EMX__ && !defined __MSYS__
+#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __EMX__ && !defined __MSYS__ && !defined __CYGWIN__
 neither MSDOS nor Windows nor OS2
 #endif
 ],
