Skip to content
Snippets Groups Projects
Commit 57059049 authored by Steve Lhomme's avatar Steve Lhomme Committed by Jean-Baptiste Kempf
Browse files

win32: use _pipe() when _CRT_USE_WINAPI_FAMILY_DESKTOP_APP is defined

This is how it's enabled in the Platform SDK and mingw-w64 since
44e8e712a40bce1dbc76ada2c01b9326f17cb979 (mingw-w64 v8+)
parent 6f0b751f
No related branches found
No related tags found
No related merge requests found
......@@ -415,11 +415,19 @@ int vlc_dup2(int oldfd, int newfd)
int vlc_pipe (int fds[2])
{
#ifdef VLC_WINSTORE_APP
#if (defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 8)
// old mingw doesn't know about _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
# if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
return _pipe (fds, 32768, O_NOINHERIT | O_BINARY);
# else
_set_errno(EPERM);
return -1;
#else
# endif
#elif defined(_CRT_USE_WINAPI_FAMILY_DESKTOP_APP)
return _pipe (fds, 32768, O_NOINHERIT | O_BINARY);
#else
_set_errno(EPERM);
return -1;
#endif
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment