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: William A. Hoffman
Subject: Re: Fix for HAVE_DOS_PATHS build on cygwin
Date: Fri, 18 Aug 2006 13:55:16 -0400

At 01:29 PM 8/18/2006, Eli Zaretskii wrote:
>> Date: Thu, 17 Aug 2006 10:23:35 -0400
>> From: Bill Hoffman <address@hidden>
>> 
>> At 11:40 PM 8/16/2006, Christopher Faylor wrote:
>> 
>> >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.
>> 
>> Because there was a bug where sh_chars_sh was being directly referenced if
>> HAVE_DOS_PATHS was on.
>
>No, Chris is right here, Bill: the Cygwin port should pick up the
>regular Unix-ish section; the only thing we need to change is to add a
>small HAVE_DOS_PATHS gork _inside_ the Unix-ish section.  This is what
>I did in the patch that I promised to publish shortly.
>
>> diff -p make381orig/make-3.81/config.h.in make-3.81/config.h.in
>> *** make381orig/make-3.81/config.h.in   Sat Apr  1 01:40:00 2006
>> --- make-3.81/config.h.in       Wed Aug 16 16:31:10 2006
>> ***************
>> *** 75,80 ****
>> --- 75,84 ----
>> 
>>   /* Use platform specific coding */
>>   #undef HAVE_DOS_PATHS
>> + #ifdef __CYGWIN__
>> + #define HAVE_DOS_PATHS 1
>> + #endif
>> +
>
>We cannot patch config.h.in, it's a generated file.

Actually config.h is the generated file, and config.h.in is the source,
but if you fix configure this part of the patch is no good.



>> diff -p make381orig/make-3.81/job.c make-3.81/job.c
>> *** make381orig/make-3.81/job.c Sun Mar 19 22:03:04 2006
>> --- make-3.81/job.c     Thu Aug 17 10:06:24 2006
>> *************** construct_command_argv_internal (char *l
>> *** 2521,2527 ****
>>   #endif
>>                     if (p[1] != '\\' && p[1] != '\''
>>                         && !isspace ((unsigned char)p[1])
>> !                       && strchr (sh_chars_sh, p[1]) == 0)
>>                       /* back up one notch, to copy the backslash */
>>                       --p;
>>   #endif  /* HAVE_DOS_PATHS */
>> --- 2521,2527 ----
>>   #endif
>>                     if (p[1] != '\\' && p[1] != '\''
>>                         && !isspace ((unsigned char)p[1])
>> !                       && strchr (sh_chars, p[1]) == 0)
>>                       /* back up one notch, to copy the backslash */
>>                       --p;
>>   #endif  /* HAVE_DOS_PATHS */
>
>Chris is right here as well: the original code uses sh_chars_sh on
>purpose, and this comment explains why:

OK, then you need to take Chris's suggestion and create and 
initialize sh_chars_sh in the unixy section.

like this:

#else  /* must be UNIX-ish */
 static char sh_chars[] = "#;\"*?[]&|<>(){}$`^~!";
 static char *sh_cmds[] = { ".", ":", "break", "case", "cd", "continue",
                             "eval", "exec", "exit", "export", "for", "if",
                             "login", "logout", "read", "readonly", "set",
                             "shift", "switch", "test", "times", "trap",
                             "umask", "wait", "while", 0 };
 char*  sh_chars_sh = sh_chars;  
#endif

-Bill





reply via email to

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