make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix for HAVE_DOS_PATHS build on cygwin


From: Eli Zaretskii
Subject: Re: Fix for HAVE_DOS_PATHS build on cygwin
Date: Fri, 18 Aug 2006 21:54:31 +0300

> Date: Fri, 18 Aug 2006 20:05:59 +0300
> From: Eli Zaretskii <address@hidden>
> 
> On second thought, I have a better patch, to solve this.  I will
> publish it shortly.

Okay, I'm now ready to go public.  Please note that I didn't check
this with Cygwin, only with the GNU/Linux and MinGW builds.  So stupid
mistakes might be lurking.

Bill, please test this with Cygwin and see if this works for you.
Chris and Earnie, I'd appreciate critique of any kind (this is
supposed to DTRT with MSYS as well, btw).

Note that after patching the sources, you will need to run
`autoheader' and "make configure", to regenerate all the generated
files.

When we are happy with the results, I suggest to post this on the
Cygwin list and ask users there to give it more testing.


2006-08-18  Eli Zaretskii  <address@hidden>

        * config/dospaths.m4 <ac_cv_dos_paths>: Define to yes on Cygwin as
        well.

        * make.h (PATH_SEPARATOR_CHAR): Define only if still undefined.
        Normally, it is defined in config.h.

        * configure.in (PATH_SEPARATOR_CHAR): Define to the value of
        $PATH_SEPARATOR.

        * job.c (construct_command_argv_internal) [HAVE_DOS_PATHS]: Define
        sh_chars_sh for Windows platforms that emulate Unix.


--- 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().  */

--- 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
 ],

--- job.c~0     2006-03-20 07:03:04.000000000 +0200
+++ job.c       2006-08-18 21:13:10.859375000 +0300
@@ -2307,6 +2307,13 @@ construct_command_argv_internal (char *l
                              "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;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]