1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 21:41:48 +02:00

Put some file descriptor functions in unix and windows namespaces

It is misleading when platform-specific functions are in the overall
`nix` namespace. More namespaces also makes for nicer doxygen.
This commit is contained in:
John Ericson 2024-06-13 10:34:44 -04:00
parent afdd12be5e
commit ff87c1a318
7 changed files with 19 additions and 15 deletions

View file

@ -122,7 +122,7 @@ void Pipe::create()
#if _WIN32_WINNT >= 0x0600
std::wstring handleToFileName(HANDLE handle) {
std::wstring windows::handleToFileName(HANDLE handle) {
std::vector<wchar_t> buf(0x100);
DWORD dw = GetFinalPathNameByHandleW(handle, buf.data(), buf.size(), FILE_NAME_OPENED);
if (dw == 0) {
@ -141,7 +141,7 @@ std::wstring handleToFileName(HANDLE handle) {
}
Path handleToPath(HANDLE handle) {
Path windows::handleToPath(HANDLE handle) {
return os_string_to_string(handleToFileName(handle));
}