1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-07-06 09:11:47 +02:00

Start building the scheduler for Windows

Building derivations is a lot harder, but the downloading goals is
portable enough.

The "common channel" code is due to Volth. I wonder if there is a way we
can factor it out into separate functions / files to avoid some
within-function CPP.

Co-authored-by: volth <volth@volth.com>
This commit is contained in:
John Ericson 2024-05-10 13:03:05 -04:00
parent 87ab3c0ea4
commit 39b2a399ad
25 changed files with 285 additions and 94 deletions

View file

@ -206,11 +206,11 @@ MakeError(SystemError, Error);
*
* Throw this, but prefer not to catch this, and catch `SystemError`
* instead. This allows implementations to freely switch between this
* and `WinError` without breaking catch blocks.
* and `windows::WinError` without breaking catch blocks.
*
* However, it is permissible to catch this and rethrow so long as
* certain conditions are not met (e.g. to catch only if `errNo =
* EFooBar`). In that case, try to also catch the equivalent `WinError`
* EFooBar`). In that case, try to also catch the equivalent `windows::WinError`
* code.
*
* @todo Rename this to `PosixError` or similar. At this point Windows
@ -248,7 +248,9 @@ public:
};
#ifdef _WIN32
class WinError;
namespace windows {
class WinError;
}
#endif
/**
@ -258,7 +260,7 @@ class WinError;
*/
using NativeSysError =
#ifdef _WIN32
WinError
windows::WinError
#else
SysError
#endif