mirror of
https://github.com/NixOS/nix.git
synced 2025-12-11 19:41:04 +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:
parent
f8141a2c26
commit
8165419a0c
10 changed files with 44 additions and 25 deletions
|
|
@ -295,7 +295,7 @@ std::string S3BinaryCacheStore::createMultipartUpload(
|
|||
url.query["uploads"] = "";
|
||||
req.uri = VerbatimURL(url);
|
||||
|
||||
req.method = HttpMethod::POST;
|
||||
req.method = HttpMethod::Post;
|
||||
StringSource payload{std::string_view("")};
|
||||
req.data = {payload};
|
||||
req.mimeType = mimeType;
|
||||
|
|
@ -325,7 +325,7 @@ S3BinaryCacheStore::uploadPart(std::string_view key, std::string_view uploadId,
|
|||
}
|
||||
|
||||
auto req = makeRequest(key);
|
||||
req.method = HttpMethod::PUT;
|
||||
req.method = HttpMethod::Put;
|
||||
req.setupForS3();
|
||||
|
||||
auto url = req.uri.parsed();
|
||||
|
|
@ -355,7 +355,7 @@ void S3BinaryCacheStore::abortMultipartUpload(std::string_view key, std::string_
|
|||
auto url = req.uri.parsed();
|
||||
url.query["uploadId"] = uploadId;
|
||||
req.uri = VerbatimURL(url);
|
||||
req.method = HttpMethod::DELETE;
|
||||
req.method = HttpMethod::Delete;
|
||||
|
||||
getFileTransfer()->enqueueFileTransfer(req).get();
|
||||
} catch (...) {
|
||||
|
|
@ -372,7 +372,7 @@ void S3BinaryCacheStore::completeMultipartUpload(
|
|||
auto url = req.uri.parsed();
|
||||
url.query["uploadId"] = uploadId;
|
||||
req.uri = VerbatimURL(url);
|
||||
req.method = HttpMethod::POST;
|
||||
req.method = HttpMethod::Post;
|
||||
|
||||
std::string xml = "<CompleteMultipartUpload>";
|
||||
for (const auto & [idx, etag] : enumerate(partEtags)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue