summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-12-17 09:07:21 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-12-19 14:15:41 +0000
commitdf7414c6ba44bea9a381e88d2989fe86f7bc44c6 (patch)
treefa8de84363dba162500037ee95de932fa701ff71
parent2959b5aefb258cf320f375f63a6555441fd0aa51 (diff)
Only include what you need.
-rw-r--r--build_settings.cmake5
-rw-r--r--vespalib/src/vespa/vespalib/util/active.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/alignedmemory.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/alloc.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/atomic.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/backtrace.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/barrier.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/benchmark_timer.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/benchmark_timer.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/blockingthreadstackexecutor.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/bobhash.h2
-rw-r--r--vespalib/src/vespa/vespalib/util/box.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/box.h2
-rw-r--r--vespalib/src/vespa/vespalib/util/dual_merge_director.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/exception.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/exceptions.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/gencnt.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/gencnt.h2
-rw-r--r--vespalib/src/vespa/vespalib/util/generationhandler.cpp23
-rw-r--r--vespalib/src/vespa/vespalib/util/generationholder.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/guard.h2
-rw-r--r--vespalib/src/vespa/vespalib/util/hashmap.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/joinable.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/left_right_heap.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/priority_queue.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/priority_queue.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/random.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/regexp.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/runnable.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/runnable_pair.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/rwlock.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/rwlock.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/sequence.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/sha1.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/sha1.h3
-rw-r--r--vespalib/src/vespa/vespalib/util/signalhandler.cpp10
-rw-r--r--vespalib/src/vespa/vespalib/util/signalhandler.h2
-rw-r--r--vespalib/src/vespa/vespalib/util/simple_thread_bundle.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/slaveproc.cpp2
-rw-r--r--vespalib/src/vespa/vespalib/util/slaveproc.h2
-rw-r--r--vespalib/src/vespa/vespalib/util/string_hash.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/stringfmt.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/thread.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/thread.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/thread_bundle.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/threadstackexecutor.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/time_tracker.cpp1
-rw-r--r--vespalib/src/vespa/vespalib/util/time_tracker.h1
-rw-r--r--vespalib/src/vespa/vespalib/util/valgrind.cpp1
50 files changed, 38 insertions, 58 deletions
diff --git a/build_settings.cmake b/build_settings.cmake
index 417fd2fa695..a6be947f888 100644
--- a/build_settings.cmake
+++ b/build_settings.cmake
@@ -53,12 +53,15 @@ if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin")
endif()
# Find ccache and use it if it is found
-find_program(CCACHE_EXECUTABLE ccache)
+find_program(CCACHE_EXECUTABLE time)
if(CCACHE_EXECUTABLE)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_EXECUTABLE})
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_EXECUTABLE})
endif()
+set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE /usr/bin/time)
+set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK /usr/bin/time)
+
# Check for valgrind and set flags
find_program(VALGRIND_EXECUTABLE valgrind)
if(VALGRIND_EXECUTABLE)
diff --git a/vespalib/src/vespa/vespalib/util/active.cpp b/vespalib/src/vespa/vespalib/util/active.cpp
index 54fc0cdd94f..c6066ac1273 100644
--- a/vespalib/src/vespa/vespalib/util/active.cpp
+++ b/vespalib/src/vespa/vespalib/util/active.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "active.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/alignedmemory.cpp b/vespalib/src/vespa/vespalib/util/alignedmemory.cpp
index bdb18b18a93..f045986e5e8 100644
--- a/vespalib/src/vespa/vespalib/util/alignedmemory.cpp
+++ b/vespalib/src/vespa/vespalib/util/alignedmemory.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "alignedmemory.h"
#include <stdint.h>
diff --git a/vespalib/src/vespa/vespalib/util/alloc.cpp b/vespalib/src/vespa/vespalib/util/alloc.cpp
index 5f4c882007b..8d899eae551 100644
--- a/vespalib/src/vespa/vespalib/util/alloc.cpp
+++ b/vespalib/src/vespa/vespalib/util/alloc.cpp
@@ -1,5 +1,4 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "alloc.h"
#include <stdlib.h>
#include <errno.h>
@@ -14,6 +13,7 @@
#include <map>
#include <atomic>
#include <unordered_map>
+#include <vespa/fastos/file.h>
LOG_SETUP(".vespalib.alloc");
diff --git a/vespalib/src/vespa/vespalib/util/atomic.cpp b/vespalib/src/vespa/vespalib/util/atomic.cpp
index ec21d18c672..980dea6dd09 100644
--- a/vespalib/src/vespa/vespalib/util/atomic.cpp
+++ b/vespalib/src/vespa/vespalib/util/atomic.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "atomic.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/backtrace.cpp b/vespalib/src/vespa/vespalib/util/backtrace.cpp
index 48fb07410ec..73b0fcddd73 100644
--- a/vespalib/src/vespa/vespalib/util/backtrace.cpp
+++ b/vespalib/src/vespa/vespalib/util/backtrace.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include <vespa/vespalib/util/backtrace.h>
#include <vespa/vespalib/util/memory.h>
#include <vespa/vespalib/util/classname.h>
diff --git a/vespalib/src/vespa/vespalib/util/barrier.cpp b/vespalib/src/vespa/vespalib/util/barrier.cpp
index 6a9732fe9f9..2530f881d59 100644
--- a/vespalib/src/vespa/vespalib/util/barrier.cpp
+++ b/vespalib/src/vespa/vespalib/util/barrier.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "barrier.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/benchmark_timer.cpp b/vespalib/src/vespa/vespalib/util/benchmark_timer.cpp
index 00f12dea02f..5c2359825b4 100644
--- a/vespalib/src/vespa/vespalib/util/benchmark_timer.cpp
+++ b/vespalib/src/vespa/vespalib/util/benchmark_timer.cpp
@@ -1,3 +1,2 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "benchmark_timer.h"
diff --git a/vespalib/src/vespa/vespalib/util/benchmark_timer.h b/vespalib/src/vespa/vespalib/util/benchmark_timer.h
index d2e72c8cef5..9b3e6be9e35 100644
--- a/vespalib/src/vespa/vespalib/util/benchmark_timer.h
+++ b/vespalib/src/vespa/vespalib/util/benchmark_timer.h
@@ -2,6 +2,7 @@
#pragma once
#include <chrono>
+#include <functional>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/blockingthreadstackexecutor.cpp b/vespalib/src/vespa/vespalib/util/blockingthreadstackexecutor.cpp
index eaaa429a5f8..bb6214b6011 100644
--- a/vespalib/src/vespa/vespalib/util/blockingthreadstackexecutor.cpp
+++ b/vespalib/src/vespa/vespalib/util/blockingthreadstackexecutor.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "blockingthreadstackexecutor.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/bobhash.h b/vespalib/src/vespa/vespalib/util/bobhash.h
index 439c582cccf..bc4fc3876fc 100644
--- a/vespalib/src/vespa/vespalib/util/bobhash.h
+++ b/vespalib/src/vespa/vespalib/util/bobhash.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fastos/fastos.h>
+#include <stdint.h>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/box.cpp b/vespalib/src/vespa/vespalib/util/box.cpp
index 13a0224f802..eefb41934c7 100644
--- a/vespalib/src/vespa/vespalib/util/box.cpp
+++ b/vespalib/src/vespa/vespalib/util/box.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "box.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/box.h b/vespalib/src/vespa/vespalib/util/box.h
index e16988fec46..9b9730a7d72 100644
--- a/vespalib/src/vespa/vespalib/util/box.h
+++ b/vespalib/src/vespa/vespalib/util/box.h
@@ -2,6 +2,8 @@
#pragma once
+#include <vector>
+
namespace vespalib {
/**
diff --git a/vespalib/src/vespa/vespalib/util/dual_merge_director.cpp b/vespalib/src/vespa/vespalib/util/dual_merge_director.cpp
index 5b894f7bd17..2e77ab3a09e 100644
--- a/vespalib/src/vespa/vespalib/util/dual_merge_director.cpp
+++ b/vespalib/src/vespa/vespalib/util/dual_merge_director.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "dual_merge_director.h"
#include <algorithm>
diff --git a/vespalib/src/vespa/vespalib/util/exception.cpp b/vespalib/src/vespa/vespalib/util/exception.cpp
index bba391ded0f..359bca2148f 100644
--- a/vespalib/src/vespa/vespalib/util/exception.cpp
+++ b/vespalib/src/vespa/vespalib/util/exception.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include <vespa/vespalib/util/exception.h>
#include <algorithm>
#include <vespa/fastos/backtrace.h>
diff --git a/vespalib/src/vespa/vespalib/util/exceptions.cpp b/vespalib/src/vespa/vespalib/util/exceptions.cpp
index 99485422493..0520556aa60 100644
--- a/vespalib/src/vespa/vespalib/util/exceptions.cpp
+++ b/vespalib/src/vespa/vespalib/util/exceptions.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/vespalib/stllike/asciistream.h>
#include <vespa/vespalib/util/stringfmt.h>
diff --git a/vespalib/src/vespa/vespalib/util/gencnt.cpp b/vespalib/src/vespa/vespalib/util/gencnt.cpp
index c2d5f3f6fde..ae198ceb108 100644
--- a/vespalib/src/vespa/vespalib/util/gencnt.cpp
+++ b/vespalib/src/vespa/vespalib/util/gencnt.cpp
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "gencnt.h"
+#include <cassert>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/gencnt.h b/vespalib/src/vespa/vespalib/util/gencnt.h
index a2279fbf426..cc6c5e76e86 100644
--- a/vespalib/src/vespa/vespalib/util/gencnt.h
+++ b/vespalib/src/vespa/vespalib/util/gencnt.h
@@ -1,6 +1,8 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
+#include <cstdint>
+
namespace vespalib {
/**
diff --git a/vespalib/src/vespa/vespalib/util/generationhandler.cpp b/vespalib/src/vespa/vespalib/util/generationhandler.cpp
index 64692d975db..b9d8db441ee 100644
--- a/vespalib/src/vespa/vespalib/util/generationhandler.cpp
+++ b/vespalib/src/vespa/vespalib/util/generationhandler.cpp
@@ -1,12 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "generationhandler.h"
namespace vespalib {
GenerationHandler::Guard::Guard()
- : _hold(NULL)
+ : _hold(nullptr)
{
}
@@ -63,7 +62,7 @@ GenerationHandler::updateFirstUsedGeneration()
break; // First element still in use
}
GenerationHold *toFree = _first;
- assert(toFree->_next != NULL);
+ assert(toFree->_next != nullptr);
_first = toFree->_next;
// Must ensure _first is updated before changing next pointer to
// avoid temporarily inconsistent state (breaks hasReaders())
@@ -78,9 +77,9 @@ GenerationHandler::updateFirstUsedGeneration()
GenerationHandler::GenerationHandler()
: _generation(0),
_firstUsedGeneration(0),
- _last(NULL),
- _first(NULL),
- _free(NULL),
+ _last(nullptr),
+ _first(nullptr),
+ _free(nullptr),
_numHolds(0u)
{
_last = _first = new GenerationHold;
@@ -95,7 +94,7 @@ GenerationHandler::~GenerationHandler(void)
updateFirstUsedGeneration();
assert(_first == _last);
- while (_free != NULL) {
+ while (_free != nullptr) {
GenerationHold *toFree = _free;
_free = toFree->_next;
--_numHolds;
@@ -139,8 +138,8 @@ GenerationHandler::incGeneration()
updateFirstUsedGeneration();
return;
}
- GenerationHold *nhold = NULL;
- if (_free == NULL) {
+ GenerationHold *nhold = nullptr;
+ if (_free == nullptr) {
nhold = new GenerationHold;
++_numHolds;
} else {
@@ -148,7 +147,7 @@ GenerationHandler::incGeneration()
_free = nhold->_next;
}
nhold->_generation = ngen;
- nhold->_next = NULL;
+ nhold->_next = nullptr;
nhold->setValid();
// new hold must be updated before next pointer is updated
@@ -173,7 +172,7 @@ GenerationHandler::getGenerationRefCount(generation_t gen) const
return 0u;
if (static_cast<sgeneration_t>(_firstUsedGeneration - gen) > 0)
return 0u;
- for (GenerationHold *hold = _first; hold != NULL; hold = hold->_next) {
+ for (GenerationHold *hold = _first; hold != nullptr; hold = hold->_next) {
if (hold->_generation == gen)
return hold->getRefCount();
}
@@ -185,7 +184,7 @@ uint64_t
GenerationHandler::getGenerationRefCount(void) const
{
uint64_t ret = 0;
- for (GenerationHold *hold = _first; hold != NULL; hold = hold->_next) {
+ for (GenerationHold *hold = _first; hold != nullptr; hold = hold->_next) {
ret += hold->getRefCount();
}
return ret;
diff --git a/vespalib/src/vespa/vespalib/util/generationholder.cpp b/vespalib/src/vespa/vespalib/util/generationholder.cpp
index 8af57a3a2a3..047c9676bb4 100644
--- a/vespalib/src/vespa/vespalib/util/generationholder.cpp
+++ b/vespalib/src/vespa/vespalib/util/generationholder.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "generationholder.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/guard.h b/vespalib/src/vespa/vespalib/util/guard.h
index ffc0908fd87..be78e785b3d 100644
--- a/vespalib/src/vespa/vespalib/util/guard.h
+++ b/vespalib/src/vespa/vespalib/util/guard.h
@@ -3,7 +3,7 @@
#pragma once
-#include <vespa/fastos/fastos.h>
+#include <stdio.h>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/hashmap.cpp b/vespalib/src/vespa/vespalib/util/hashmap.cpp
index 687f443c3ff..7462f0cd384 100644
--- a/vespalib/src/vespa/vespalib/util/hashmap.cpp
+++ b/vespalib/src/vespa/vespalib/util/hashmap.cpp
@@ -8,7 +8,6 @@
* @date 2006/03/16
**/
-#include <vespa/fastos/fastos.h>
#include "hashmap.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/joinable.cpp b/vespalib/src/vespa/vespalib/util/joinable.cpp
index 118e4928800..e6a8ba2a190 100644
--- a/vespalib/src/vespa/vespalib/util/joinable.cpp
+++ b/vespalib/src/vespa/vespalib/util/joinable.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "joinable.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/left_right_heap.cpp b/vespalib/src/vespa/vespalib/util/left_right_heap.cpp
index d988f824e33..1d7a63e9a32 100644
--- a/vespalib/src/vespa/vespalib/util/left_right_heap.cpp
+++ b/vespalib/src/vespa/vespalib/util/left_right_heap.cpp
@@ -1,4 +1,3 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "left_right_heap.h"
diff --git a/vespalib/src/vespa/vespalib/util/priority_queue.cpp b/vespalib/src/vespa/vespalib/util/priority_queue.cpp
index 14d502b6fc1..f869dc2872b 100644
--- a/vespalib/src/vespa/vespalib/util/priority_queue.cpp
+++ b/vespalib/src/vespa/vespalib/util/priority_queue.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "priority_queue.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/priority_queue.h b/vespalib/src/vespa/vespalib/util/priority_queue.h
index 32f80cfa4c4..ce499fd26a3 100644
--- a/vespalib/src/vespa/vespalib/util/priority_queue.h
+++ b/vespalib/src/vespa/vespalib/util/priority_queue.h
@@ -3,6 +3,7 @@
#pragma once
#include <vector>
+#include <functional>
#include <algorithm>
#include "left_right_heap.h"
diff --git a/vespalib/src/vespa/vespalib/util/random.cpp b/vespalib/src/vespa/vespalib/util/random.cpp
index 051b1ca3ba5..06bfc1f9c25 100644
--- a/vespalib/src/vespa/vespalib/util/random.cpp
+++ b/vespalib/src/vespa/vespalib/util/random.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "random.h"
#include <cmath>
diff --git a/vespalib/src/vespa/vespalib/util/regexp.cpp b/vespalib/src/vespa/vespalib/util/regexp.cpp
index 93c210169e9..ceb3486bb65 100644
--- a/vespalib/src/vespa/vespalib/util/regexp.cpp
+++ b/vespalib/src/vespa/vespalib/util/regexp.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include <sys/types.h>
#include <regex.h>
#include <vespa/vespalib/util/regexp.h>
diff --git a/vespalib/src/vespa/vespalib/util/runnable.cpp b/vespalib/src/vespa/vespalib/util/runnable.cpp
index d21e2a76d34..ecd89d784f6 100644
--- a/vespalib/src/vespa/vespalib/util/runnable.cpp
+++ b/vespalib/src/vespa/vespalib/util/runnable.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "runnable.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/runnable_pair.cpp b/vespalib/src/vespa/vespalib/util/runnable_pair.cpp
index 7449e54d29c..ff4acabdb88 100644
--- a/vespalib/src/vespa/vespalib/util/runnable_pair.cpp
+++ b/vespalib/src/vespa/vespalib/util/runnable_pair.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "runnable_pair.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/rwlock.cpp b/vespalib/src/vespa/vespalib/util/rwlock.cpp
index f678089dcb5..fb5cce4ccbd 100644
--- a/vespalib/src/vespa/vespalib/util/rwlock.cpp
+++ b/vespalib/src/vespa/vespalib/util/rwlock.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include <vespa/vespalib/util/rwlock.h>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/rwlock.h b/vespalib/src/vespa/vespalib/util/rwlock.h
index eb3189586e7..061a114bf66 100644
--- a/vespalib/src/vespa/vespalib/util/rwlock.h
+++ b/vespalib/src/vespa/vespalib/util/rwlock.h
@@ -3,7 +3,6 @@
#pragma once
-#include <vespa/fastos/fastos.h>
#include <vespa/vespalib/util/sync.h>
#include <vespa/vespalib/util/guard.h>
diff --git a/vespalib/src/vespa/vespalib/util/sequence.cpp b/vespalib/src/vespa/vespalib/util/sequence.cpp
index c424f1a6a9b..4e4cabbee8a 100644
--- a/vespalib/src/vespa/vespalib/util/sequence.cpp
+++ b/vespalib/src/vespa/vespalib/util/sequence.cpp
@@ -1,4 +1,3 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "sequence.h"
diff --git a/vespalib/src/vespa/vespalib/util/sha1.cpp b/vespalib/src/vespa/vespalib/util/sha1.cpp
index 710a2052a41..de91cf592f7 100644
--- a/vespalib/src/vespa/vespalib/util/sha1.cpp
+++ b/vespalib/src/vespa/vespalib/util/sha1.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "sha1.h"
/* #define LITEND * This should be #define'd if true. */
diff --git a/vespalib/src/vespa/vespalib/util/sha1.h b/vespalib/src/vespa/vespalib/util/sha1.h
index 4a32f783b22..6c98892ec1f 100644
--- a/vespalib/src/vespa/vespalib/util/sha1.h
+++ b/vespalib/src/vespa/vespalib/util/sha1.h
@@ -2,6 +2,9 @@
#pragma once
+#include <cstdint>
+#include <cstring>
+
namespace vespalib {
/**
diff --git a/vespalib/src/vespa/vespalib/util/signalhandler.cpp b/vespalib/src/vespa/vespalib/util/signalhandler.cpp
index 31732bcafda..f16ef55fc30 100644
--- a/vespalib/src/vespa/vespalib/util/signalhandler.cpp
+++ b/vespalib/src/vespa/vespalib/util/signalhandler.cpp
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "signalhandler.h"
+#include <cassert>
namespace vespalib {
@@ -69,7 +69,7 @@ SignalHandler::hook()
act.sa_handler = handleSignal;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
- sigaction(_signal, &act, NULL);
+ sigaction(_signal, &act, nullptr);
}
void
@@ -79,7 +79,7 @@ SignalHandler::ignore()
act.sa_handler = SIG_IGN;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
- sigaction(_signal, &act, NULL);
+ sigaction(_signal, &act, nullptr);
}
bool
@@ -101,7 +101,7 @@ SignalHandler::unhook()
act.sa_handler = SIG_DFL;
sigemptyset(&act.sa_mask);
act.sa_flags = 0;
- sigaction(_signal, &act, NULL);
+ sigaction(_signal, &act, nullptr);
}
@@ -112,7 +112,7 @@ SignalHandler::shutdown(void)
it = _handlers.begin(), ite = _handlers.end();
it != ite;
++it) {
- if (*it != NULL)
+ if (*it != nullptr)
(*it)->unhook();
}
std::vector<SignalHandler *>().swap(_handlers);
diff --git a/vespalib/src/vespa/vespalib/util/signalhandler.h b/vespalib/src/vespa/vespalib/util/signalhandler.h
index 493da65f464..3ac7926531f 100644
--- a/vespalib/src/vespa/vespalib/util/signalhandler.h
+++ b/vespalib/src/vespa/vespalib/util/signalhandler.h
@@ -1,7 +1,7 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
-#include <vespa/fastos/fastos.h>
+#include <signal.h>
#include <vector>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/simple_thread_bundle.cpp b/vespalib/src/vespa/vespalib/util/simple_thread_bundle.cpp
index 7ff84217b7e..ef3010e082d 100644
--- a/vespalib/src/vespa/vespalib/util/simple_thread_bundle.cpp
+++ b/vespalib/src/vespa/vespalib/util/simple_thread_bundle.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "simple_thread_bundle.h"
#include "exceptions.h"
diff --git a/vespalib/src/vespa/vespalib/util/slaveproc.cpp b/vespalib/src/vespa/vespalib/util/slaveproc.cpp
index c65f40c43cf..95829d62639 100644
--- a/vespalib/src/vespa/vespalib/util/slaveproc.cpp
+++ b/vespalib/src/vespa/vespalib/util/slaveproc.cpp
@@ -1,6 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
+#include <vespa/fastos/time.h>
#include "guard.h"
#include "slaveproc.h"
diff --git a/vespalib/src/vespa/vespalib/util/slaveproc.h b/vespalib/src/vespa/vespalib/util/slaveproc.h
index aedc1369b4b..69055feec27 100644
--- a/vespalib/src/vespa/vespalib/util/slaveproc.h
+++ b/vespalib/src/vespa/vespalib/util/slaveproc.h
@@ -3,7 +3,7 @@
#pragma once
-#include <vespa/fastos/fastos.h>
+#include <vespa/fastos/process.h>
#ifndef FASTOS_NO_THREADS
#include <string>
#include <queue>
diff --git a/vespalib/src/vespa/vespalib/util/string_hash.cpp b/vespalib/src/vespa/vespalib/util/string_hash.cpp
index 995782ef255..f58d081c58a 100644
--- a/vespalib/src/vespa/vespalib/util/string_hash.cpp
+++ b/vespalib/src/vespa/vespalib/util/string_hash.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "string_hash.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/stringfmt.cpp b/vespalib/src/vespa/vespalib/util/stringfmt.cpp
index 2782e1f0da6..ca6d2d5af17 100644
--- a/vespalib/src/vespa/vespalib/util/stringfmt.cpp
+++ b/vespalib/src/vespa/vespalib/util/stringfmt.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "stringfmt.h"
#include "vstringfmt.h"
diff --git a/vespalib/src/vespa/vespalib/util/thread.cpp b/vespalib/src/vespa/vespalib/util/thread.cpp
index 5ae7008a2c5..8160e6d53a8 100644
--- a/vespalib/src/vespa/vespalib/util/thread.cpp
+++ b/vespalib/src/vespa/vespalib/util/thread.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "thread.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/thread.h b/vespalib/src/vespa/vespalib/util/thread.h
index a0c53986daf..96948462ab3 100644
--- a/vespalib/src/vespa/vespalib/util/thread.h
+++ b/vespalib/src/vespa/vespalib/util/thread.h
@@ -5,6 +5,7 @@
#include "sync.h"
#include "runnable.h"
#include "active.h"
+#include <vespa/fastos/thread.h>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/thread_bundle.cpp b/vespalib/src/vespa/vespalib/util/thread_bundle.cpp
index 600da7c1e06..020c946f561 100644
--- a/vespalib/src/vespa/vespalib/util/thread_bundle.cpp
+++ b/vespalib/src/vespa/vespalib/util/thread_bundle.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "thread_bundle.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/threadstackexecutor.cpp b/vespalib/src/vespa/vespalib/util/threadstackexecutor.cpp
index 808fe01fea1..10fbd129ce6 100644
--- a/vespalib/src/vespa/vespalib/util/threadstackexecutor.cpp
+++ b/vespalib/src/vespa/vespalib/util/threadstackexecutor.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "threadstackexecutor.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp b/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp
index 070aead6463..28f9a57b3c5 100644
--- a/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp
+++ b/vespalib/src/vespa/vespalib/util/threadstackexecutorbase.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "threadstackexecutorbase.h"
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/time_tracker.cpp b/vespalib/src/vespa/vespalib/util/time_tracker.cpp
index 43212626af4..2636d3c7301 100644
--- a/vespalib/src/vespa/vespalib/util/time_tracker.cpp
+++ b/vespalib/src/vespa/vespalib/util/time_tracker.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include "time_tracker.h"
#include "stringfmt.h"
diff --git a/vespalib/src/vespa/vespalib/util/time_tracker.h b/vespalib/src/vespa/vespalib/util/time_tracker.h
index ab50a4f33ca..afbec786488 100644
--- a/vespalib/src/vespa/vespalib/util/time_tracker.h
+++ b/vespalib/src/vespa/vespalib/util/time_tracker.h
@@ -4,6 +4,7 @@
#include <vespa/vespalib/stllike/string.h>
#include <vector>
+#include <vespa/fastos/timestamp.h>
namespace vespalib {
diff --git a/vespalib/src/vespa/vespalib/util/valgrind.cpp b/vespalib/src/vespa/vespalib/util/valgrind.cpp
index a40776e261a..2673dcb4b8b 100644
--- a/vespalib/src/vespa/vespalib/util/valgrind.cpp
+++ b/vespalib/src/vespa/vespalib/util/valgrind.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/fastos/fastos.h>
#include <vespa/vespalib/util/valgrind.h>
#include <assert.h>
#include <fcntl.h>