| Ticket UUID: | 6585b6c5d9058212cebc4523012344858f099c1c | ||
| Title: | Wrong cast in call to _open_osfhandle | ||
| Status: | Fixed | Type: | Code_Defect |
| Severity: | Severe | Priority: | |
| Subsystem: | Resolution: | Fixed | |
| Last Modified: | 2011-01-14 17:00:17 | ||
| Version Found In: | [4ab7251fcd] | ||
| Description & Comments: | |||
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. -- tsbg | |||
Attachments:
- popen.patch added by anonymous on 2011-01-14 14:00:02. [details]