diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-08-18 03:02:49 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-08-18 03:02:49 +0200 |
commit | 7a4461355f7ee8e5ec71888516cbfd640dd7e110 (patch) | |
tree | 5f800152d48de71247177c4fca93fff24dc993ac /config | |
parent | 15e7bcd9e902407fbe14cf830968f06c9fb5fb89 (diff) |
Include only what you need.
Diffstat (limited to 'config')
-rw-r--r-- | config/src/apps/vespa-get-config/getconfig.cpp | 2 | ||||
-rw-r--r-- | config/src/tests/configgen/value_converter.cpp | 1 | ||||
-rw-r--r-- | config/src/tests/frtconnectionpool/frtconnectionpool.cpp | 1 | ||||
-rw-r--r-- | config/src/tests/functiontest/functiontest.cpp | 4 | ||||
-rw-r--r-- | config/src/tests/misc/configsystem.cpp | 1 | ||||
-rw-r--r-- | config/src/tests/print/print.cpp | 1 | ||||
-rw-r--r-- | config/src/vespa/config/common/configvalue.h | 11 | ||||
-rw-r--r-- | config/src/vespa/config/frt/frtconfigagent.cpp | 8 | ||||
-rw-r--r-- | config/src/vespa/config/subscription/configsubscriptionset.cpp | 4 |
9 files changed, 17 insertions, 16 deletions
diff --git a/config/src/apps/vespa-get-config/getconfig.cpp b/config/src/apps/vespa-get-config/getconfig.cpp index 2a8a66f41d9..342b2b497bb 100644 --- a/config/src/apps/vespa-get-config/getconfig.cpp +++ b/config/src/apps/vespa-get-config/getconfig.cpp @@ -239,7 +239,7 @@ GetConfig::Main() printf("configID %s\n", rKey.getConfigId().c_str()); printf("configMD5 %s\n", rState.md5.c_str()); - printf("generation %" PRId64 "\n", rState.generation); + printf("generation %ld\n", rState.generation); printf("trace %s\n", response->getTrace().toString().c_str()); } else if (traceLevel > 0) { printf("trace %s\n", response->getTrace().toString().c_str()); diff --git a/config/src/tests/configgen/value_converter.cpp b/config/src/tests/configgen/value_converter.cpp index 1034d0821fd..8c969b77271 100644 --- a/config/src/tests/configgen/value_converter.cpp +++ b/config/src/tests/configgen/value_converter.cpp @@ -3,6 +3,7 @@ #include <vespa/config/configgen/value_converter.h> #include <vespa/config/common/exceptions.h> #include <vespa/vespalib/data/slime/slime.h> +#include <climits> using namespace config; using namespace config::internal; diff --git a/config/src/tests/frtconnectionpool/frtconnectionpool.cpp b/config/src/tests/frtconnectionpool/frtconnectionpool.cpp index c14cdbbbc23..79ec1ee42f4 100644 --- a/config/src/tests/frtconnectionpool/frtconnectionpool.cpp +++ b/config/src/tests/frtconnectionpool/frtconnectionpool.cpp @@ -5,6 +5,7 @@ #include <vespa/fnet/frt/error.h> #include <sstream> #include <set> +#include <unistd.h> using namespace config; diff --git a/config/src/tests/functiontest/functiontest.cpp b/config/src/tests/functiontest/functiontest.cpp index 7fe87775f74..257e131534b 100644 --- a/config/src/tests/functiontest/functiontest.cpp +++ b/config/src/tests/functiontest/functiontest.cpp @@ -37,8 +37,8 @@ checkVariableAccess(const FunctionTestConfig & config) EXPECT_EQUAL(1u, config.boolarr.size()); EXPECT_EQUAL(0u, config.intarr.size()); EXPECT_EQUAL(2u, config.longarr.size()); - LOG(error, "0: %" PRId64, config.longarr[0]); - LOG(error, "1: %" PRId64, config.longarr[1]); + LOG(error, "0: %ld", config.longarr[0]); + LOG(error, "1: %ld", config.longarr[1]); EXPECT_EQUAL(std::numeric_limits<int64_t>::max(), config.longarr[0]); EXPECT_EQUAL(std::numeric_limits<int64_t>::min(), config.longarr[1]); EXPECT_EQUAL(2u, config.doublearr.size()); diff --git a/config/src/tests/misc/configsystem.cpp b/config/src/tests/misc/configsystem.cpp index f0f526265ca..9574d9d274a 100644 --- a/config/src/tests/misc/configsystem.cpp +++ b/config/src/tests/misc/configsystem.cpp @@ -3,6 +3,7 @@ #include <vespa/config/common/configsystem.h> #include <vespa/defaults.h> #include <vespa/fastos/file.h> +#include <unistd.h> using namespace config; diff --git a/config/src/tests/print/print.cpp b/config/src/tests/print/print.cpp index e058b91822e..9df4bcf4914 100644 --- a/config/src/tests/print/print.cpp +++ b/config/src/tests/print/print.cpp @@ -8,6 +8,7 @@ #include <vespa/config/helper/configgetter.hpp> #include "config-my.h" #include "config-motd.h" +#include <sys/stat.h> using namespace config; diff --git a/config/src/vespa/config/common/configvalue.h b/config/src/vespa/config/common/configvalue.h index 53780dce533..7bbd48df258 100644 --- a/config/src/vespa/config/common/configvalue.h +++ b/config/src/vespa/config/common/configvalue.h @@ -1,17 +1,14 @@ // Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once +#include <vespa/config/frt/protocol.h> +#include <vespa/config/configgen/configpayload.h> #include <vespa/vespalib/stllike/string.h> #include <vector> #include <memory> -#include <vespa/config/frt/protocol.h> -#include <vespa/config/configgen/configpayload.h> +#include <climits> -namespace vespalib { - namespace slime { - class Cursor; - } -} +namespace vespalib::slime { class Cursor; } namespace config { diff --git a/config/src/vespa/config/frt/frtconfigagent.cpp b/config/src/vespa/config/frt/frtconfigagent.cpp index d5c662d1bda..ff16ef77a1b 100644 --- a/config/src/vespa/config/frt/frtconfigagent.cpp +++ b/config/src/vespa/config/frt/frtconfigagent.cpp @@ -26,7 +26,7 @@ FRTConfigAgent::handleResponse(const ConfigRequest & request, ConfigResponse::UP { if (LOG_WOULD_LOG(spam)) { const ConfigKey & key(request.getKey()); - LOG(spam, "current state for %s: generation %" PRId64 " md5 %s", key.toString().c_str(), _configState.generation, _configState.md5.c_str()); + LOG(spam, "current state for %s: generation %ld md5 %s", key.toString().c_str(), _configState.generation, _configState.md5.c_str()); } if (response->validateResponse() && !response->isError()) { handleOKResponse(std::move(response)); @@ -57,7 +57,7 @@ void FRTConfigAgent::handleUpdatedGeneration(const ConfigKey & key, const ConfigState & newState, const ConfigValue & configValue) { if (LOG_WOULD_LOG(spam)) { - LOG(spam, "new generation %" PRId64 " for key %s", newState.generation, key.toString().c_str()); + LOG(spam, "new generation %ld for key %s", newState.generation, key.toString().c_str()); } _configState.generation = newState.generation; bool hasDifferentPayload = newState.hasDifferentPayloadFrom(_configState); @@ -84,7 +84,7 @@ FRTConfigAgent::handleErrorResponse(const ConfigRequest & request, ConfigRespons setWaitTime(_numConfigured > 0 ? _timingValues.configuredErrorDelay : _timingValues.unconfiguredDelay, multiplier); _nextTimeout = _timingValues.errorTimeout; const ConfigKey & key(request.getKey()); - LOG(info, "Error response or no response from config server (key: %s) (errcode=%d, validresponse:%d), trying again in %" PRId64 " milliseconds", key.toString().c_str(), response->errorCode(), response->hasValidResponse() ? 1 : 0, _waitTime); + LOG(info, "Error response or no response from config server (key: %s) (errcode=%d, validresponse:%d), trying again in %ld milliseconds", key.toString().c_str(), response->errorCode(), response->hasValidResponse() ? 1 : 0, _waitTime); } void @@ -92,7 +92,7 @@ FRTConfigAgent::setWaitTime(uint64_t delay, int multiplier) { uint64_t prevWait = _waitTime; _waitTime = _timingValues.fixedDelay + (multiplier * delay); - LOG(spam, "Adjusting waittime from %" PRId64 " to %" PRId64, prevWait, _waitTime); + LOG(spam, "Adjusting waittime from %ld to %ld", prevWait, _waitTime); } uint64_t FRTConfigAgent::getTimeout() const { return _nextTimeout; } diff --git a/config/src/vespa/config/subscription/configsubscriptionset.cpp b/config/src/vespa/config/subscription/configsubscriptionset.cpp index 170bacf104d..51c29823664 100644 --- a/config/src/vespa/config/subscription/configsubscriptionset.cpp +++ b/config/src/vespa/config/subscription/configsubscriptionset.cpp @@ -67,7 +67,7 @@ ConfigSubscriptionSet::acquireSnapshot(uint64_t timeoutInMillis, bool ignoreChan } else { LOG(spam, "Config subscription did not change, id(%s), defname(%s)", key.getConfigId().c_str(), key.getDefName().c_str()); } - LOG(spam, "Previous generation is %" PRId64 ", updates is %" PRId64, generation, subscription->getGeneration()); + LOG(spam, "Previous generation is %ld, updates is %ld", generation, subscription->getGeneration()); if (isGenerationNewer(subscription->getGeneration(), _currentGeneration)) { numGenerationChanged++; } @@ -88,7 +88,7 @@ ConfigSubscriptionSet::acquireSnapshot(uint64_t timeoutInMillis, bool ignoreChan bool updated = inSync && isGenerationNewer(lastGeneration, _currentGeneration); if (updated) { - LOG(spam, "Config was updated from %" PRId64 " to %" PRId64, _currentGeneration, lastGeneration); + LOG(spam, "Config was updated from %ld to %ld", _currentGeneration, lastGeneration); _currentGeneration = lastGeneration; _state = CONFIGURED; for (SubscriptionList::iterator it(_subscriptionList.begin()), mt(_subscriptionList.end()); |