system/FileDescriptor: no-op implementation of *CloseOnExec() on Windows
Fixes the NFS client build, closes #305.
This commit is contained in:
parent
680fdb0338
commit
d4ce9c0df2
@ -90,11 +90,12 @@ public:
|
|||||||
return SocketDescriptor(FileDescriptor::Undefined());
|
return SocketDescriptor(FileDescriptor::Undefined());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using FileDescriptor::EnableCloseOnExec;
|
||||||
|
using FileDescriptor::DisableCloseOnExec;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
using FileDescriptor::SetNonBlocking;
|
using FileDescriptor::SetNonBlocking;
|
||||||
using FileDescriptor::SetBlocking;
|
using FileDescriptor::SetBlocking;
|
||||||
using FileDescriptor::EnableCloseOnExec;
|
|
||||||
using FileDescriptor::DisableCloseOnExec;
|
|
||||||
using FileDescriptor::Duplicate;
|
using FileDescriptor::Duplicate;
|
||||||
using FileDescriptor::Close;
|
using FileDescriptor::Close;
|
||||||
#else
|
#else
|
||||||
|
@ -115,7 +115,10 @@ public:
|
|||||||
|
|
||||||
static bool CreatePipe(FileDescriptor &r, FileDescriptor &w) noexcept;
|
static bool CreatePipe(FileDescriptor &r, FileDescriptor &w) noexcept;
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifdef _WIN32
|
||||||
|
void EnableCloseOnExec() noexcept {}
|
||||||
|
void DisableCloseOnExec() noexcept {}
|
||||||
|
#else
|
||||||
static bool CreatePipeNonBlock(FileDescriptor &r,
|
static bool CreatePipeNonBlock(FileDescriptor &r,
|
||||||
FileDescriptor &w) noexcept;
|
FileDescriptor &w) noexcept;
|
||||||
|
|
||||||
|
@ -97,14 +97,15 @@ public:
|
|||||||
|
|
||||||
using FileDescriptor::SetNonBlocking;
|
using FileDescriptor::SetNonBlocking;
|
||||||
using FileDescriptor::SetBlocking;
|
using FileDescriptor::SetBlocking;
|
||||||
using FileDescriptor::EnableCloseOnExec;
|
|
||||||
using FileDescriptor::DisableCloseOnExec;
|
|
||||||
using FileDescriptor::Duplicate;
|
using FileDescriptor::Duplicate;
|
||||||
using FileDescriptor::CheckDuplicate;
|
using FileDescriptor::CheckDuplicate;
|
||||||
|
|
||||||
static bool CreatePipe(FileDescriptor &r, FileDescriptor &w);
|
static bool CreatePipe(FileDescriptor &r, FileDescriptor &w);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
using FileDescriptor::EnableCloseOnExec;
|
||||||
|
using FileDescriptor::DisableCloseOnExec;
|
||||||
|
|
||||||
#ifdef USE_EVENTFD
|
#ifdef USE_EVENTFD
|
||||||
using FileDescriptor::CreateEventFD;
|
using FileDescriptor::CreateEventFD;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user