[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Problems with GNU make in Windows 7 (64-bit)
From: |
Eli Zaretskii |
Subject: |
Re: Problems with GNU make in Windows 7 (64-bit) |
Date: |
Fri, 06 May 2011 22:43:34 +0300 |
> From: Rob Juergens <address@hidden>
> Date: Fri, 6 May 2011 10:02:14 -0700
>
> > The problem only happens in Windows 7 64-bit. I don't seem to get the
> > problem when running 64-bit XP.
>
> Do you have the same (x86) part in the directory name on 64-bit XP?
>
>
> Yes
Strange.
Anyway, can you try the patch below? If it gives good results, I will
commit it to the repository.
And please keep the mailing list on the CC list.
--- job.c~2 2010-07-24 14:27:50.000000000 +0300
+++ job.c 2011-05-06 22:24:41.879500000 +0300
@@ -2792,12 +2792,12 @@
unsigned int shell_len = strlen (shell);
unsigned int line_len = strlen (line);
- unsigned int sflags_len = strlen (shellflags);
+ unsigned int sflags_len = shellflags ? strlen (shellflags) : 0;
char *command_ptr = NULL; /* used for batch_mode_shell mode */
char *new_line;
# ifdef __EMX__ /* is this necessary? */
- if (!unixy_shell)
+ if (!unixy_shell && shellflags)
shellflags[0] = '/'; /* "/c" */
# endif
@@ -2859,19 +2859,24 @@
new_argv = xmalloc (4 * sizeof (char *));
new_argv[0] = xstrdup(shell);
- new_argv[1] = xstrdup(shellflags);
+ new_argv[1] = xstrdup(shellflags ? shellflags : "");
new_argv[2] = line;
new_argv[3] = NULL;
return new_argv;
}
- new_line = alloca (shell_len + 1 + sflags_len + 1
+ new_line = alloca ((shell_len*2) + 1 + sflags_len + 1
+ (line_len*2) + 1);
ap = new_line;
- memcpy (ap, shell, shell_len);
- ap += shell_len;
+ for (p = shell; *p != '\0'; ++p)
+ {
+ if (strchr (sh_chars, *p) != 0)
+ *(ap++) = '\\';
+ *(ap++) = *p;
+ }
*(ap++) = ' ';
- memcpy (ap, shellflags, sflags_len);
+ if (shellflags)
+ memcpy (ap, shellflags, sflags_len);
ap += sflags_len;
*(ap++) = ' ';
command_ptr = ap;
- Problems with GNU make in Windows 7 (64-bit), Rob Juergens, 2011/05/06
- Re: Problems with GNU make in Windows 7 (64-bit), Eli Zaretskii, 2011/05/07
- enhancement request for gmake, Rob Juergens, 2011/05/09
- Re: enhancement request for gmake, Rob Walker, 2011/05/09
- Re: enhancement request for gmake, Eli Zaretskii, 2011/05/09
- RE: enhancement request for gmake, Rob Juergens, 2011/05/09
- Re: enhancement request for gmake, Eli Zaretskii, 2011/05/09
- RE: enhancement request for gmake, Rob Juergens, 2011/05/09
- Re: enhancement request for gmake, David Highley, 2011/05/09
- Re: enhancement request for gmake, Eli Zaretskii, 2011/05/09