diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2021-06-01 11:30:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-01 11:30:21 +0200 |
commit | caef6f43146f697adc26769297fc9388e1b6444e (patch) | |
tree | aea1254b353662a0af3e088ca92adbd66fb5abff | |
parent | e8f585be70b22c11db5356f886049f432699eac3 (diff) | |
parent | 45473d02c95cdf20c782d5814f22fc1de5e36b2f (diff) |
Merge pull request #4734 from p01arst0rm/fix-s3-ifdef
unified macro style for ENABLE_S3
-rw-r--r-- | configure.ac | 4 | ||||
-rw-r--r-- | src/libstore/filetransfer.cc | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/configure.ac b/configure.ac index 6c36787f3..05523eef8 100644 --- a/configure.ac +++ b/configure.ac @@ -235,8 +235,8 @@ AC_SUBST(HAVE_SECCOMP, [$have_seccomp]) # Look for aws-cpp-sdk-s3. AC_LANG_PUSH(C++) AC_CHECK_HEADERS([aws/s3/S3Client.h], - [AC_DEFINE([ENABLE_S3], [1], [Whether to enable S3 support via aws-sdk-cpp.]) - enable_s3=1], [enable_s3=]) + [AC_DEFINE([ENABLE_S3], [1], [Whether to enable S3 support via aws-sdk-cpp.]) enable_s3=1], + [AC_DEFINE([ENABLE_S3], [0], [Whether to enable S3 support via aws-sdk-cpp.]) enable_s3=]) AC_SUBST(ENABLE_S3, [$enable_s3]) AC_LANG_POP(C++) diff --git a/src/libstore/filetransfer.cc b/src/libstore/filetransfer.cc index 514ab3bf9..2cf35ec83 100644 --- a/src/libstore/filetransfer.cc +++ b/src/libstore/filetransfer.cc @@ -7,7 +7,7 @@ #include "finally.hh" #include "callback.hh" -#ifdef ENABLE_S3 +#if ENABLE_S3 #include <aws/core/client/ClientConfiguration.h> #endif @@ -665,7 +665,7 @@ struct curlFileTransfer : public FileTransfer writeFull(wakeupPipe.writeSide.get(), " "); } -#ifdef ENABLE_S3 +#if ENABLE_S3 std::tuple<std::string, std::string, Store::Params> parseS3Uri(std::string uri) { auto [path, params] = splitUriAndParams(uri); @@ -688,7 +688,7 @@ struct curlFileTransfer : public FileTransfer if (hasPrefix(request.uri, "s3://")) { // FIXME: do this on a worker thread try { -#ifdef ENABLE_S3 +#if ENABLE_S3 auto [bucketName, key, params] = parseS3Uri(request.uri); std::string profile = get(params, "profile").value_or(""); |