From 0dff587c9dd7ac0b02fc93f58883e24cd2d4e92e Mon Sep 17 00:00:00 2001 From: Krzysztof Kosi??ski Date: Sun, 28 Feb 2010 18:38:28 +0100 Subject: Compilation fixes for Windows 64-bit by Fridrich (bzr r9118) --- src/io/sys.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/io/sys.cpp') diff --git a/src/io/sys.cpp b/src/io/sys.cpp index 2841f0af8..f25575c9c 100644 --- a/src/io/sys.cpp +++ b/src/io/sys.cpp @@ -36,9 +36,11 @@ #include // declares spawn functions #include // declares _wspawn functions -#ifdef __cplusplus + +#ifndef __MINGW32__ +# ifdef __cplusplus extern "C" { -#endif +# endif _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnl (int, const wchar_t*, const wchar_t*, ...); _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnle (int, const wchar_t*, const wchar_t*, ...); _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnlp (int, const wchar_t*, const wchar_t*, ...); @@ -47,8 +49,9 @@ _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnv (int, const wchar_t*, const wchar_t _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnve (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*); _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnvp (int, const wchar_t*, const wchar_t* const*); _CRTIMP int __cdecl __MINGW_NOTHROW _wspawnvpe (int, const wchar_t*, const wchar_t* const*, const wchar_t* const*); -#ifdef __cplusplus +# ifdef __cplusplus } +# endif #endif #include #include @@ -409,7 +412,7 @@ dup_noninherited (int fd, GetCurrentProcess (), &filehandle, 0, FALSE, DUPLICATE_SAME_ACCESS); close (fd); - return _open_osfhandle ((long) filehandle, mode | _O_NOINHERIT); + return _open_osfhandle ((LONG_PTR) filehandle, mode | _O_NOINHERIT); } -- cgit v1.2.3 From d36de20ada4493381ddda28f529b6933b98a51de Mon Sep 17 00:00:00 2001 From: "Jon A. Cruz" Date: Sun, 28 Feb 2010 19:21:55 -0800 Subject: Cast cleanup. (bzr r9124) --- src/io/sys.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/io/sys.cpp') diff --git a/src/io/sys.cpp b/src/io/sys.cpp index f25575c9c..34160b648 100644 --- a/src/io/sys.cpp +++ b/src/io/sys.cpp @@ -412,10 +412,9 @@ dup_noninherited (int fd, GetCurrentProcess (), &filehandle, 0, FALSE, DUPLICATE_SAME_ACCESS); close (fd); - return _open_osfhandle ((LONG_PTR) filehandle, mode | _O_NOINHERIT); + return _open_osfhandle(reinterpret_cast(filehandle), mode | _O_NOINHERIT); } - /* The helper process writes a status report back to us, through a * pipe, consisting of two ints. */ -- cgit v1.2.3