Re: [PATCH] Do not use SHELL_PATH from build system in prepare_shell_cmd on Windows

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

 



Am 4/17/2012 15:45, schrieb Ben Walton:
> Excerpts from Johannes Sixt's message of Tue Apr 17 03:03:21 -0400 2012:
>> The recent change to use SHELL_PATH instead of "sh" to spawn shell
>> commands is not suited for Windows:
> 
> Ah yes, I can see how that would be undesirable on Windows.
> 
>> +#ifndef WIN32
>>          nargv[nargc++] = SHELL_PATH;
>> +#else
>> +        nargv[nargc++] = "sh";
>> +#endif
>>          nargv[nargc++] = "-c";
> 
> A minor style question: Would this conditional code not be better if
> it were up where the fallback SHELL_PATH is set?  That would leave
> this code block #ifdef free while still avoiding the breakage on
> Windows.

It would require either to #define yet another new name to SHELL_PATH or
"sh", or to #undef SHELL_PATH and re#define it for WIN32. Neither is very
appealing. I personally prefer to have the conditional (if it is as short
as this one) at the point where it matters.

-- Hannes
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]