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: Christopher Faylor
Subject: Re: Fix for HAVE_DOS_PATHS build on cygwin
Date: Wed, 16 Aug 2006 23:40:21 -0400
User-agent: Mutt/1.5.11

On Thu, Aug 17, 2006 at 06:24:03AM +0300, Eli Zaretskii wrote:
>> Date: Wed, 16 Aug 2006 21:21:21 -0400
>> From: Bill Hoffman <address@hidden>
>> 
>> *** make-3.81/job.c     Sun Mar 19 22:03:04 2006
>> --- ../make-3.81/job.c  Wed Aug 16 19:42:14 2006
>> *************** construct_command_argv_internal (char *l
>> *** 2297,2302 ****
>> --- 2297,2316 ----
>>                    0 };
>>     char*  sh_chars;
>>     char** sh_cmds;
>> + #elif defined(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[] = "#;\"*?[]&|<>(){}$`^";
>> +   static char *sh_cmds_sh[] = { "cd", "eval", "exec", "exit", "login",
>> +                            "logout", "set", "umask", "wait", "while", 
>> "for",
>> +                            "case", "if", ":", ".", "break", "continue",
>> +                            "export", "read", "readonly", "shift", "times",
>> +                                 "trap", "switch", "test", "echo", 0};
>> +   char *sh_chars;
>> +   char **sh_cmds;
>> +

I don't understand why isn't this just using the UNIX-ish settings for
Cygwin.  The settings should, at the very least, be the same as the
UNIX-sh case.

>>   #elif defined(__riscos__)
>>     static char sh_chars[] = "";
>>     static char *sh_cmds[] = { 0 };
>> *************** construct_command_argv_internal (char *l
>> *** 2326,2331 ****
>> --- 2340,2351 ----
>>       sh_chars = sh_chars_sh;
>>     }
>>   #endif /* WINDOWS32 */
>> + #if defined(HAVE_DOS_PATHS) && !defined(WINDOWS32)
>> +   int slow_flag = 0;
>> +
>> +   sh_cmds = sh_cmds_sh;
>> +   sh_chars = sh_chars_sh;
>> + #endif /* WINDOWS32 */

Shouldn't that HAVE_DOS_PATHS test just be an #elif part of the #ifdef WINDOWS32
rather than testing WINDOWS32 twice?

Otherwise, if not, then the endif comment above doesn't look correct to
me.

OTOH, if the UNIX-sh settings were being used, then that block of code
would probably go away anyway.

cgf




reply via email to

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