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') 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