1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-12-01 14:41:00 +01:00

treewide: Fix MinGW build

Several bugs to squash:

- Apparently DELETE is an already used macro with Win32. We can avoid it
  by using Camel case instead (slightly hacky but also fits the naming
  convention better)

- Gets rid of the raw usage of isatty. Added an isTTY impl to abstract over
  the raw API.
This commit is contained in:
Sergei Zimmerman 2025-11-18 04:30:57 +03:00
parent f8141a2c26
commit 8165419a0c
No known key found for this signature in database
10 changed files with 44 additions and 25 deletions

View file

@ -120,7 +120,7 @@ bool HttpBinaryCacheStore::fileExists(const std::string & path)
try {
FileTransferRequest request(makeRequest(path));
request.method = HttpMethod::HEAD;
request.method = HttpMethod::Head;
getFileTransfer()->download(request);
return true;
} catch (FileTransferError & e) {
@ -141,7 +141,7 @@ void HttpBinaryCacheStore::upload(
std::optional<Headers> headers)
{
auto req = makeRequest(path);
req.method = HttpMethod::PUT;
req.method = HttpMethod::Put;
if (headers) {
req.headers.reserve(req.headers.size() + headers->size());