make-w32
[Top][All Lists]
Advanced

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

Re: make 3.81rc1 / MSYS


From: David Ergo
Subject: Re: make 3.81rc1 / MSYS
Date: Wed, 29 Mar 2006 09:26:33 +0200

On Sat, 2006-03-25 at 10:58, Eli Zaretskii wrote:
> > From: David Ergo <address@hidden>
> > Cc: address@hidden, Xavier Marichal <address@hidden>,
> >         =?ISO-8859-1?Q?S=E9bastien?= Frippiat <address@hidden>
> > Date: Tue, 07 Mar 2006 09:28:46 +0100
> > 
> > Ok, now I understand. But for MSYS, as it uses unix code, sh_chars_sh is
> > not defined and the code doesn't compile, so maybe another solution is
> > to define it at line 2310 (in the unix case) by something like this :
> >   ifdef __MSYS__
> >     char* sh_chars_sh = sh_chars;
> >   endif
> > or still another solution, closer to other platforms: at line 2304
> > define sh_chars_sh instead of sh_chars, and at line 2310, define 
> >   char* sh_chars = sh_chars_sh;
> 
> Fixed with the patch below.
> 
> > > > Second one: the code is buggy even for other builds :
> > > > Line 352 : check_lastslash = strchr (target, '/') == 0;
> > > > So, check_lastslash is true if '/' is not found in target
> > > > Line 354 : /* Didn't find it yet : check for DOS-type directories. */
> > > > So we must check for DOS-type dirs if not found, so line 355 MUST be
> > > >   if (check_lastslash)
> > > > i.e. if ('/' not found)
> > > 
> > > Yes, you are right, sorry.  I was looking at the wrong line when I
> > > answered your original message.
> > > 
> > > (Paul, this is the code you changed between beta4 and rc1.)
> 
> Paul fixed the inverted condition, I fixed it some more with the patch
> below.
> 
> > > > MSYS has DOS and UNIX paths :
> > > > c:\msys\bin, c:/msys/bin and /usr/local/bin are all valid paths under
> > > > MSYS.
> > > 
> > > Then why does the configure scripts says that DOS paths are not
> > > supported on MSYS?  Can you say what test there does the wrong thing
> > > for MSYS?
> > 
> > 'configure' just check for specific platforms to know if DOS paths are
> > supported.
> > file 'configure', just change line 8105 :
> >   #if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ &&
> > !defined __EMX__
> > into :
> >   #if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ &&
> > !defined __EMX__ && !defined __MSYS__
> 
> Paul fixed this in config/dospaths.m4.
> 
> > > > I'm not sure about what is buggy, all I can tell is that if make is
> > > > compiled with MSYS realpath then the test 'functions/realpath' in the
> > > > tests/ subdir fails at line 19 where the test is :
> > > > ifneq ($(realpath ///),/)
> > > >   $(error)
> > > > endif 
> > > > I assume this means that realpath("///") should return "/", but it does
> > > > not.
> > > 
> > > Can you verify this with a simple test program?  We need to know for
> > > sure to modify the configure script.
> > 
> > see simple test file in attachment : 
> > returns 0 if ok
> >         1 if buggy
> > [...]
> > #include <limits.h>
> > #include <stdlib.h>
> > 
> > int main() 
> > {
> >   char resolved_path[PATH_MAX];
> >   if (realpath("///", resolved_path) && (strcmp(resolved_path, "/") == 0)) {
> >     return 0;
> >   } else {
> >     return 1;
> >   }
> > }
> 
> Paul, this is still not fixed.  How about adding the above test to
> configure?
> 
> David, could you please see if make-3.81rc2 with the patch below
> applied and HAVE_REALPATH undefined resolves your issues?  Thanks.

No it doesn't work, actually it doesn't compile at all :
job.c line 2468 : sh_chars undefined
      line 2580 : sh_cmds undefined

Sorry for the late reply.

David

> 
> 
> 2006-03-25  Eli Zaretskii  <address@hidden>
> 
>       * implicit.c (pattern_search) [HAVE_DOS_PATHS]: Don't compare b
>       with lastslash, since the latter points to filename, not to
>       target.
> 
>       * job.c (construct_command_argv_internal) [HAVE_DOS_PATHS]:
>       Declare and define sh_chars_sh[].
> 
> --- implicit.c~       2006-03-17 18:24:20.000000000 +0200
> +++ implicit.c        2006-03-25 11:37:58.308894500 +0200
> @@ -356,9 +356,8 @@ pattern_search (struct file *file, int a
>                /* Didn't find it yet: check for DOS-type directories.  */
>                if (check_lastslash)
>                  {
> -                  char *b = strrchr (target, '\\');
> -                  check_lastslash = !(b ? b > lastslash
> -                                      : (target[0] && target[1] == ':'));
> +                  char *b = strchr (target, '\\');
> +                  check_lastslash = !(b || (target[0] && target[1] == ':'));
>                  }
>  #endif
>  #endif
> 
> --- job.c~    2006-03-20 07:03:04.000000000 +0200
> +++ job.c     2006-03-25 11:49:30.996394500 +0200
> @@ -2297,6 +2297,12 @@ construct_command_argv_internal (char *l
>                   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[] = "#;\"*?[]&|<>(){}$`^";
>  #elif defined(__riscos__)
>    static char sh_chars[] = "";
>    static char *sh_cmds[] = { 0 };
> 





reply via email to

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