diff options
Diffstat (limited to 'src/io')
| -rw-r--r-- | src/io/sys.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
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 <process.h> // declares spawn functions #include <wchar.h> // 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 <unistd.h> #include <glibmm/i18n.h> @@ -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); } |
