|Title:||Wrong cast in call to _open_osfhandle|
|Last Modified:||2011-01-14 17:00:17|
|Version Found In:||[4ab7251fcd]|
According to Microsoft, _open_osfhandle is declared as follows:
int _open_osfhandle ( intptr_t osfhandle, int flags );
However, Fossil currently calls this function as follow:
*pfdIn = _open_osfhandle((long)hStdoutRd, 0); fd = _open_osfhandle((long)hStdinWr, 0);
The cast to long is causing trouble, because on x86_64-windows, long is still 32bit, whereas intptr_t is 64bit.
The attached patch fixes this.
- popen.patch [download] added by anonymous on 2011-01-14 14:00:02. [details]