mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
Fix return types for mingw-w64
This is needed for warning-free compilation with mingw-w64, and does not hurt for other build configurations. Patch by Shankar Giri Venkita Giri (bug 10053).
This commit is contained in:
parent
ee13c5b7e2
commit
88b68ee004
@ -1065,7 +1065,7 @@ cmd_ret const runCommand(string const & cmd)
|
|||||||
0, 0, &startup, &process)) {
|
0, 0, &startup, &process)) {
|
||||||
|
|
||||||
CloseHandle(process.hThread);
|
CloseHandle(process.hThread);
|
||||||
int fno = _open_osfhandle((long)in, _O_RDONLY);
|
int fno = _open_osfhandle(static_cast<intptr_t>(in), _O_RDONLY);
|
||||||
CloseHandle(out);
|
CloseHandle(out);
|
||||||
inf = _fdopen(fno, "r");
|
inf = _fdopen(fno, "r");
|
||||||
}
|
}
|
||||||
|
@ -569,7 +569,7 @@ bool autoOpenFile(string const & filename, auto_open_mode const mode,
|
|||||||
|
|
||||||
// reference: http://msdn.microsoft.com/en-us/library/bb762153.aspx
|
// reference: http://msdn.microsoft.com/en-us/library/bb762153.aspx
|
||||||
char const * action = (mode == VIEW) ? "open" : "edit";
|
char const * action = (mode == VIEW) ? "open" : "edit";
|
||||||
bool success = reinterpret_cast<int>(ShellExecute(NULL, action,
|
bool success = reinterpret_cast<intptr_t>(ShellExecute(NULL, action,
|
||||||
to_local8bit(from_utf8(filename)).c_str(), NULL, NULL, 1)) > 32;
|
to_local8bit(from_utf8(filename)).c_str(), NULL, NULL, 1)) > 32;
|
||||||
|
|
||||||
if (!path.empty() && !lyxrc.texinputs_prefix.empty()) {
|
if (!path.empty() && !lyxrc.texinputs_prefix.empty()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user