7 May 2009 06:18
Re: Re: GCC 4.4.0 & binutils v2.19.1 available
Dave Yeo <daveryeo <at> telus.net>
2009-05-07 04:18:51 GMT
2009-05-07 04:18:51 GMT
On Tue, 05 May 2009 22:01:33 +1000, Andrew MacIntyre wrote:
>- If I understand correctly, Paul's Python builds don't include any
> significant modifications to standard library modules. Hence, the
> script would be using "/bin/sh" as the shell, and failing if it
> isn't operative.
Actually looking at his patch I see this
+ int unset_emxshell = 0;
FILE *fp;
PyObject *f;
if (!PyArg_ParseTuple(args, "s|si:popen", &name, &mode,
&bufsize))
return NULL;
+ /* a little hack for making sure commands.getstatusoutput works
+ * (ASSUMES that COMSPEC isn't a posix shell.) */
+ if (name[0] == '{' && !getenv("EMXSHELL")) {
+ char path[512];
+ _searchenv("sh.exe", "PATH", path);
+ if (!path[0])
+ _searchenv("ash.exe", "PATH", path);
+ if (!path[0])
+ _searchenv("bash.exe", "PATH", path);
+ if (path[0])
+ unset_emxshell = setenv("EMXSHELL", path, 0) ==
0;
+ }
Py_BEGIN_ALLOW_THREADS
fp = popen(name, mode);
(Continue reading)
RSS Feed