diff options
128 files changed, 88 insertions, 212 deletions
diff --git a/config/src/vespa/config/common/source.h b/config/src/vespa/config/common/source.h index a1c0633d47b..df507bd8b4a 100644 --- a/config/src/vespa/config/common/source.h +++ b/config/src/vespa/config/common/source.h @@ -1,7 +1,6 @@ // 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 <memory> namespace config { diff --git a/config/src/vespa/config/common/timingvalues.h b/config/src/vespa/config/common/timingvalues.h index 78a64050a22..4741e9063fe 100644 --- a/config/src/vespa/config/common/timingvalues.h +++ b/config/src/vespa/config/common/timingvalues.h @@ -7,7 +7,6 @@ #pragma once -#include <vespa/fastos/fastos.h> namespace config { diff --git a/config/src/vespa/config/subscription/subscriptionid.h b/config/src/vespa/config/subscription/subscriptionid.h index 00af2a55696..d9b78684641 100644 --- a/config/src/vespa/config/subscription/subscriptionid.h +++ b/config/src/vespa/config/subscription/subscriptionid.h @@ -1,6 +1,5 @@ // 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> namespace config { diff --git a/document/src/vespa/document/bucket/bucketidfactory.h b/document/src/vespa/document/bucket/bucketidfactory.h index a09bb4156a6..fb4fc919fed 100644 --- a/document/src/vespa/document/bucket/bucketidfactory.h +++ b/document/src/vespa/document/bucket/bucketidfactory.h @@ -15,7 +15,6 @@ #pragma once #include <vespa/document/util/printable.h> -#include <vespa/fastos/fastos.h> namespace document { diff --git a/documentapi/src/vespa/documentapi/messagebus/messages/testandsetcondition.h b/documentapi/src/vespa/documentapi/messagebus/messages/testandsetcondition.h index 54800b96743..011c3400f09 100644 --- a/documentapi/src/vespa/documentapi/messagebus/messages/testandsetcondition.h +++ b/documentapi/src/vespa/documentapi/messagebus/messages/testandsetcondition.h @@ -1,7 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. // @author Vegard Sjonfjell #pragma once -#include <vespa/fastos/fastos.h> namespace documentapi { diff --git a/fastlib/src/vespa/fastlib/io/bufferedfile.h b/fastlib/src/vespa/fastlib/io/bufferedfile.h index 7443b325dd4..d0fb0fbf1f6 100644 --- a/fastlib/src/vespa/fastlib/io/bufferedfile.h +++ b/fastlib/src/vespa/fastlib/io/bufferedfile.h @@ -13,14 +13,13 @@ #pragma once -#include <vespa/fastos/fastos.h> -#include <vespa/vespalib/util/noncopyable.hpp> #include <vespa/vespalib/util/alloc.h> +#include <vespa/fastos/file.h> /** * Provides buffered file access. */ -class Fast_BufferedFile : public FastOS_FileInterface, public vespalib::noncopyable +class Fast_BufferedFile : public FastOS_FileInterface { private: using Alloc = vespalib::alloc::Alloc; @@ -56,6 +55,8 @@ public: Fast_BufferedFile(FastOS_FileInterface *file); Fast_BufferedFile(); Fast_BufferedFile(size_t bufferSize); + Fast_BufferedFile(const Fast_BufferedFile &) = delete; + Fast_BufferedFile & operator = (const Fast_BufferedFile &) = delete; /** * Delete the file instance used for low-level file access. diff --git a/fastlib/src/vespa/fastlib/io/fileinputstream.h b/fastlib/src/vespa/fastlib/io/fileinputstream.h index 16920632396..08806f1d19d 100644 --- a/fastlib/src/vespa/fastlib/io/fileinputstream.h +++ b/fastlib/src/vespa/fastlib/io/fileinputstream.h @@ -16,7 +16,6 @@ ******************************************************************************/ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/io/inputstream.h> diff --git a/fastlib/src/vespa/fastlib/io/fileoutputstream.h b/fastlib/src/vespa/fastlib/io/fileoutputstream.h index 3b4ce2bcba3..1c198c8dd8d 100644 --- a/fastlib/src/vespa/fastlib/io/fileoutputstream.h +++ b/fastlib/src/vespa/fastlib/io/fileoutputstream.h @@ -16,7 +16,6 @@ ******************************************************************************/ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/io/outputstream.h> diff --git a/fastlib/src/vespa/fastlib/io/inputstream.h b/fastlib/src/vespa/fastlib/io/inputstream.h index dcc031ef675..56f4d666dc3 100644 --- a/fastlib/src/vespa/fastlib/io/inputstream.h +++ b/fastlib/src/vespa/fastlib/io/inputstream.h @@ -16,7 +16,6 @@ ******************************************************************************/ #pragma once -#include <vespa/fastos/fastos.h> diff --git a/fastlib/src/vespa/fastlib/io/outputstream.h b/fastlib/src/vespa/fastlib/io/outputstream.h index 2fb4c364e38..9e6f42fd4c5 100644 --- a/fastlib/src/vespa/fastlib/io/outputstream.h +++ b/fastlib/src/vespa/fastlib/io/outputstream.h @@ -16,7 +16,6 @@ ******************************************************************************/ #pragma once -#include <vespa/fastos/fastos.h> diff --git a/fastlib/src/vespa/fastlib/net/httpchunkedinputstream.h b/fastlib/src/vespa/fastlib/net/httpchunkedinputstream.h index 4381e0f5741..2505ae42d4e 100644 --- a/fastlib/src/vespa/fastlib/net/httpchunkedinputstream.h +++ b/fastlib/src/vespa/fastlib/net/httpchunkedinputstream.h @@ -18,7 +18,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/io/filterinputstream.h> diff --git a/fastlib/src/vespa/fastlib/net/httpchunkedoutputstream.h b/fastlib/src/vespa/fastlib/net/httpchunkedoutputstream.h index 97c6e926323..b845f3402a7 100644 --- a/fastlib/src/vespa/fastlib/net/httpchunkedoutputstream.h +++ b/fastlib/src/vespa/fastlib/net/httpchunkedoutputstream.h @@ -18,7 +18,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/io/filteroutputstream.h> diff --git a/fastlib/src/vespa/fastlib/net/httpserver.cpp b/fastlib/src/vespa/fastlib/net/httpserver.cpp index e12477bd030..44e4dc6a8bc 100644 --- a/fastlib/src/vespa/fastlib/net/httpserver.cpp +++ b/fastlib/src/vespa/fastlib/net/httpserver.cpp @@ -1121,7 +1121,7 @@ Fast_HTTPConnection::~Fast_HTTPConnection(void) -void Fast_HTTPConnection::OutputFile(FastOS_File *file) +void Fast_HTTPConnection::OutputFile(FastOS_FileInterface *file) { const int bufferSize = 2048; char buffer[bufferSize]; diff --git a/fastlib/src/vespa/fastlib/net/httpserver.h b/fastlib/src/vespa/fastlib/net/httpserver.h index bbe8235cf8b..c644f5ef57c 100644 --- a/fastlib/src/vespa/fastlib/net/httpserver.h +++ b/fastlib/src/vespa/fastlib/net/httpserver.h @@ -18,13 +18,16 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/io/inputstream.h> #include <vespa/fastlib/io/outputstream.h> #include <vespa/fastlib/net/socket.h> #include <vespa/fastlib/util/bag.h> #include <vespa/vespalib/stllike/string.h> +#include <vespa/fastos/thread.h> +#include <vespa/fastos/cond.h> +#include <vespa/fastos/serversocket.h> +class FastOS_FileInterface; class Fast_HTTPServer; #define FASTLIB_SUCCESS (0) @@ -92,7 +95,7 @@ private: void Run (FastOS_ThreadInterface *thisThread, void *params); void Output(const char *outputString); void OutputData(const void *data, size_t len); - void OutputFile(FastOS_File *file); + void OutputFile(FastOS_FileInterface *file); const Fast_InputStream *GetInputStream() const {return _input;} Fast_InputStream *GetInputStream() {return _input;} diff --git a/fastlib/src/vespa/fastlib/net/socket.h b/fastlib/src/vespa/fastlib/net/socket.h index c2e933ab29d..ccd3a0dff23 100644 --- a/fastlib/src/vespa/fastlib/net/socket.h +++ b/fastlib/src/vespa/fastlib/net/socket.h @@ -1,38 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -/** -******************************************************************************* -* -* @author Stein Hardy Danielsen -* @date Creation date: 2000-9-28 -* @version $Id$ -* -* @file -* -* Socket class with input and output stream interfaces -* -* Copyright (c) : 1997-2000 Fast Search & Transfer ASA -* ALL RIGHTS RESERVED -* -******************************************************************************/ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/io/inputstream.h> #include <vespa/fastlib/io/outputstream.h> +#include <vespa/fastos/socket.h> -/** -******************************************************************************** -* -* Socket class with input and output stream interfaces -* @author Stein Hardy Danielsen -* @date Creation date: 2000-9-28 -* @version $Id$ -* -* -* Copyright (c) : 1997-1999 Fast Search & Transfer ASA -* ALL RIGHTS RESERVED -* -******************************************************************************/ class Fast_Socket : public FastOS_Socket, public Fast_InputStream, public Fast_OutputStream diff --git a/fastlib/src/vespa/fastlib/testsuite/suite.h b/fastlib/src/vespa/fastlib/testsuite/suite.h index ef844a7f85f..9ea242bb84d 100644 --- a/fastlib/src/vespa/fastlib/testsuite/suite.h +++ b/fastlib/src/vespa/fastlib/testsuite/suite.h @@ -18,7 +18,6 @@ * ----- * * #include <iosfwd> - * #include <vespa/fastos/fastos.h> * #include <vespa/fastlib/testsuite/suite.h> * * class MySuite : public Suite diff --git a/fastlib/src/vespa/fastlib/testsuite/test.h b/fastlib/src/vespa/fastlib/testsuite/test.h index 40b99c6ed66..09a2c31f795 100644 --- a/fastlib/src/vespa/fastlib/testsuite/test.h +++ b/fastlib/src/vespa/fastlib/testsuite/test.h @@ -16,7 +16,6 @@ * mytest.h: * ---- * #include <iosfwd> - * #include <vespa/fastos/fastos.h> * #include <vespa/fastlib/testsuite/test.h> * * class MyTest : public Test diff --git a/fastlib/src/vespa/fastlib/text/normwordfolder.cpp b/fastlib/src/vespa/fastlib/text/normwordfolder.cpp index f05377dae9b..94a2f8f2f28 100644 --- a/fastlib/src/vespa/fastlib/text/normwordfolder.cpp +++ b/fastlib/src/vespa/fastlib/text/normwordfolder.cpp @@ -1,11 +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 <vespa/fastlib/text/unicodeutil.h> #include <vespa/fastlib/text/normwordfolder.h> +#include <vespa/fastos/mutex.h> bool Fast_NormalizeWordFolder::_isInitialized = false; -FastOS_Mutex Fast_NormalizeWordFolder::_initMutex; +FastOS_Mutex _initMutex; bool Fast_NormalizeWordFolder::_doAccentRemoval = false; bool Fast_NormalizeWordFolder::_doSmallToNormalKana = false; bool Fast_NormalizeWordFolder::_doKatakanaToHiragana = false; diff --git a/fastlib/src/vespa/fastlib/text/normwordfolder.h b/fastlib/src/vespa/fastlib/text/normwordfolder.h index e5908c08ae9..c1240dc40bd 100644 --- a/fastlib/src/vespa/fastlib/text/normwordfolder.h +++ b/fastlib/src/vespa/fastlib/text/normwordfolder.h @@ -3,6 +3,7 @@ #pragma once #include <vespa/fastlib/text/wordfolder.h> +#include <cstdint> /** * WordFolder that both lowercases, removes accents, and converts @@ -12,7 +13,6 @@ class Fast_NormalizeWordFolder : public Fast_WordFolder { private: static bool _isInitialized; - static FastOS_Mutex _initMutex; /** Features */ static bool _doAccentRemoval; @@ -81,7 +81,7 @@ public: public: static const char *ReplacementString(ucs4_t testchar) { if (testchar < 0xc4 || testchar > 0x1f3) { - return NULL; + return nullptr; } if (testchar == 0xdf && _doSharpSSubstitution) { return "ss"; @@ -147,12 +147,12 @@ public: return "th"; default: - return NULL; + return nullptr; } } - return NULL; + return nullptr; } private: /** diff --git a/fastlib/src/vespa/fastlib/text/tests/unicodeutiltest.h b/fastlib/src/vespa/fastlib/text/tests/unicodeutiltest.h index d6a4ff44678..2300b83d6db 100644 --- a/fastlib/src/vespa/fastlib/text/tests/unicodeutiltest.h +++ b/fastlib/src/vespa/fastlib/text/tests/unicodeutiltest.h @@ -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 <vespa/fastlib/testsuite/test.h> #include "../unicodeutil.h" diff --git a/fastlib/src/vespa/fastlib/text/tests/wordfolderstest.h b/fastlib/src/vespa/fastlib/text/tests/wordfolderstest.h index d16ec40149f..28c7e8f06f2 100644 --- a/fastlib/src/vespa/fastlib/text/tests/wordfolderstest.h +++ b/fastlib/src/vespa/fastlib/text/tests/wordfolderstest.h @@ -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 <memory> -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/testsuite/test.h> #include "../wordfolder.h" diff --git a/fastlib/src/vespa/fastlib/text/unicodeutil.h b/fastlib/src/vespa/fastlib/text/unicodeutil.h index 06916616062..f314f9b1c68 100644 --- a/fastlib/src/vespa/fastlib/text/unicodeutil.h +++ b/fastlib/src/vespa/fastlib/text/unicodeutil.h @@ -4,9 +4,10 @@ */ #pragma once +#include <sys/types.h> + #define FASTLIB_UNICODEUTIL_USES_WORDCHARPROP -#include <vespa/fastos/fastos.h> /** utf8_t is the type of the multi-byte UTF-8 character components */ typedef unsigned char utf8_t; diff --git a/fastlib/src/vespa/fastlib/util/tests/bagtest.h b/fastlib/src/vespa/fastlib/util/tests/bagtest.h index 92e5eb3e9b1..3bfff40a50f 100644 --- a/fastlib/src/vespa/fastlib/util/tests/bagtest.h +++ b/fastlib/src/vespa/fastlib/util/tests/bagtest.h @@ -2,7 +2,6 @@ #include <iostream> -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/util/bag.h> #include <vespa/fastlib/testsuite/test.h> diff --git a/fnet/src/vespa/fnet/connector.h b/fnet/src/vespa/fnet/connector.h index db535d1c8bf..b9d8da4dc92 100644 --- a/fnet/src/vespa/fnet/connector.h +++ b/fnet/src/vespa/fnet/connector.h @@ -2,6 +2,8 @@ #pragma once +#include <vespa/fastos/serversocket.h> + /** * Class used to listen for incoming connections on a single TCP/IP * port. diff --git a/fnet/src/vespa/fnet/fnet.h b/fnet/src/vespa/fnet/fnet.h index 6144817b885..62c26ebc779 100644 --- a/fnet/src/vespa/fnet/fnet.h +++ b/fnet/src/vespa/fnet/fnet.h @@ -2,8 +2,9 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/component/vtag.h> +#include <vespa/fastos/mutex.h> +#include <vespa/fastos/cond.h> // FEATURES diff --git a/fnet/src/vespa/fnet/iocomponent.h b/fnet/src/vespa/fnet/iocomponent.h index 33075657372..5de7c11a77c 100644 --- a/fnet/src/vespa/fnet/iocomponent.h +++ b/fnet/src/vespa/fnet/iocomponent.h @@ -2,6 +2,8 @@ #pragma once +#include <vespa/fastos/socket.h> + /** * This is the common superclass of all components that may be part of * the transport layer event based I/O framework. Note that all IO diff --git a/fnet/src/vespa/fnet/scheduler.h b/fnet/src/vespa/fnet/scheduler.h index 0e60da8b9cf..af7044f3c4f 100644 --- a/fnet/src/vespa/fnet/scheduler.h +++ b/fnet/src/vespa/fnet/scheduler.h @@ -2,6 +2,8 @@ #pragma once +#include <vespa/fastos/time.h> + /** * An object of this class handles scheduling of @ref FNET_Task * objects. A task may be scheduled to be performed in a given number diff --git a/fnet/src/vespa/fnet/transport_thread.h b/fnet/src/vespa/fnet/transport_thread.h index e7a171f791b..6a9bb29e469 100644 --- a/fnet/src/vespa/fnet/transport_thread.h +++ b/fnet/src/vespa/fnet/transport_thread.h @@ -2,6 +2,9 @@ #pragma once +#include <vespa/fastos/thread.h> +#include <vespa/fastos/socketevent.h> + /** * This class represents a transport thread and handles a subset of * the network related work for the application in both client and diff --git a/frtstream/src/vespa/frtstream/frtstream.h b/frtstream/src/vespa/frtstream/frtstream.h index a640396b333..cd50b1eae32 100644 --- a/frtstream/src/vespa/frtstream/frtstream.h +++ b/frtstream/src/vespa/frtstream/frtstream.h @@ -7,7 +7,6 @@ #include <iosfwd> #include <iterator> -#include <vespa/fastos/fastos.h> #include <vespa/fastos/types.h> #include <vespa/fnet/frt/frt.h> diff --git a/juniper/src/test/testenv.h b/juniper/src/test/testenv.h index e7dde4da552..1200ce6928e 100644 --- a/juniper/src/test/testenv.h +++ b/juniper/src/test/testenv.h @@ -3,7 +3,6 @@ /* Include most of the stuff that we might need */ -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/text/unicodeutil.h> #include <vespa/fastlib/text/normwordfolder.h> #include <vespa/juniper/query.h> diff --git a/juniper/src/vespa/juniper/IJuniperProperties.h b/juniper/src/vespa/juniper/IJuniperProperties.h index d52b1e69058..7f5727b3b88 100644 --- a/juniper/src/vespa/juniper/IJuniperProperties.h +++ b/juniper/src/vespa/juniper/IJuniperProperties.h @@ -1,9 +1,6 @@ // 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> -/** @file IJuniperProperties.h Defining the IJuniperProperties class */ +#pragma once /** An abstract interface to configuration file settings used by Juniper to process * it's preconfigured parameter sets. @@ -18,9 +15,7 @@ public: * @param def A default value for the property if not found in configuration * @return The value of the property or @param def if no such property is set */ - virtual const char* GetProperty(const char* name, const char* def = NULL) = 0; + virtual const char* GetProperty(const char* name, const char* def = nullptr) = 0; virtual ~IJuniperProperties() {}; }; - - diff --git a/juniper/src/vespa/juniper/ITokenProcessor.h b/juniper/src/vespa/juniper/ITokenProcessor.h index 2bfe42ebb51..ff357c78335 100644 --- a/juniper/src/vespa/juniper/ITokenProcessor.h +++ b/juniper/src/vespa/juniper/ITokenProcessor.h @@ -1,6 +1,5 @@ // 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 <vespa/fastlib/text/unicodeutil.h> /** Implement this interface for objects that intend to serve as processing stages in diff --git a/juniper/src/vespa/juniper/juniperparams.h b/juniper/src/vespa/juniper/juniperparams.h index c5b97ec6d46..d6fd0f46031 100644 --- a/juniper/src/vespa/juniper/juniperparams.h +++ b/juniper/src/vespa/juniper/juniperparams.h @@ -2,7 +2,6 @@ #pragma once #include <string> -#include <vespa/fastos/fastos.h> #include <vespa/fastlib/text/wordfolder.h> class SummaryConfig; diff --git a/juniper/src/vespa/juniper/keyocc.h b/juniper/src/vespa/juniper/keyocc.h index 476a2c1a1be..aa8e9cf3e17 100644 --- a/juniper/src/vespa/juniper/keyocc.h +++ b/juniper/src/vespa/juniper/keyocc.h @@ -1,7 +1,6 @@ // 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 "multiset.h" #include <vector> #include "matchelem.h" diff --git a/juniper/src/vespa/juniper/query.h b/juniper/src/vespa/juniper/query.h index e4e2d7c3ee8..a7cd82ae308 100644 --- a/juniper/src/vespa/juniper/query.h +++ b/juniper/src/vespa/juniper/query.h @@ -7,7 +7,6 @@ #define JUNIPER_RPIF 1 #endif -#include <vespa/fastos/fastos.h> /** @file query.h * This file describes describes Juniper's expected interface for diff --git a/juniper/src/vespa/juniper/rewriter.h b/juniper/src/vespa/juniper/rewriter.h index ce46c83214a..33c4e2b874c 100644 --- a/juniper/src/vespa/juniper/rewriter.h +++ b/juniper/src/vespa/juniper/rewriter.h @@ -3,7 +3,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include "query.h" /** @file rewriter.h diff --git a/memfilepersistence/src/tests/helper/testhelper.h b/memfilepersistence/src/tests/helper/testhelper.h index 4445086d300..e1236756d95 100644 --- a/memfilepersistence/src/tests/helper/testhelper.h +++ b/memfilepersistence/src/tests/helper/testhelper.h @@ -5,7 +5,6 @@ #include <fstream> -#include <vespa/fastos/fastos.h> #include <sstream> #define ASSERT_REPLY_COUNT(count, dummylink) \ diff --git a/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h b/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h index 07c9521af5b..22c7dc5e865 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h +++ b/memfilepersistence/src/vespa/memfilepersistence/tools/dumpslotfile.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <iosfwd> namespace config { diff --git a/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h b/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h index c4f79a85126..7b69373e7df 100644 --- a/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h +++ b/memfilepersistence/src/vespa/memfilepersistence/tools/vdsdisktool.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <iosfwd> namespace storage { diff --git a/messagebus/src/vespa/messagebus/messenger.h b/messagebus/src/vespa/messagebus/messenger.h index 6dfe0636583..2b534301576 100644 --- a/messagebus/src/vespa/messagebus/messenger.h +++ b/messagebus/src/vespa/messagebus/messenger.h @@ -1,14 +1,14 @@ // 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 <vespa/vespalib/util/executor.h> -#include <vespa/vespalib/util/sync.h> -#include <vespa/vespalib/util/arrayqueue.hpp> #include "imessagehandler.h" #include "ireplyhandler.h" #include "message.h" #include "reply.h" +#include <vespa/vespalib/util/executor.h> +#include <vespa/vespalib/util/sync.h> +#include <vespa/vespalib/util/arrayqueue.hpp> +#include <vespa/fastos/thread.h> namespace mbus { diff --git a/persistence/src/vespa/persistence/conformancetest/conformancetest.h b/persistence/src/vespa/persistence/conformancetest/conformancetest.h index bd1899994a0..a5c96ba381b 100644 --- a/persistence/src/vespa/persistence/conformancetest/conformancetest.h +++ b/persistence/src/vespa/persistence/conformancetest/conformancetest.h @@ -8,7 +8,6 @@ */ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/document/repo/documenttyperepo.h> #include <vespa/persistence/spi/persistenceprovider.h> #include <vespa/vdstestlib/cppunit/macros.h> diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.h b/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.h index 1b27d647616..f79ba298fec 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.h +++ b/searchcore/src/vespa/searchcore/fdispatch/common/appcontext.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/util/clock.h> class FastS_NodeManager; diff --git a/searchcore/src/vespa/searchcore/fdispatch/common/rpc.h b/searchcore/src/vespa/searchcore/fdispatch/common/rpc.h index 9ac19c3fea7..9693d31314e 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/common/rpc.h +++ b/searchcore/src/vespa/searchcore/fdispatch/common/rpc.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/fnet/frt/frt.h> #include <vespa/searchcore/fdispatch/common/appcontext.h> #include <vespa/vespalib/stllike/string.h> diff --git a/searchcore/src/vespa/searchcore/fdispatch/program/rpc.h b/searchcore/src/vespa/searchcore/fdispatch/program/rpc.h index eb4f87610b9..341e9765d10 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/program/rpc.h +++ b/searchcore/src/vespa/searchcore/fdispatch/program/rpc.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/fnet/frt/frt.h> #include <vespa/searchcore/fdispatch/common/rpc.h> diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/child_info.h b/searchcore/src/vespa/searchcore/fdispatch/search/child_info.h index ce54bc6b38d..00495d86c6e 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/child_info.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/child_info.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include "poss_count.h" diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h index 863047e4695..ea873d3ab30 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/configdesc.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/searchlib/common/fslimits.h> #include <vespa/searchcore/fdispatch/common/stdincl.h> #include <vespa/searchcore/config/config-partitions.h> diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/dataset_base.h b/searchcore/src/vespa/searchcore/fdispatch/search/dataset_base.h index 6590c76e03b..425712cf1c7 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/dataset_base.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/dataset_base.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include "child_info.h" #include <vespa/searchcore/fdispatch/common/timestat.h> #include <vespa/searchcore/util/log.h> diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/datasetcollection.h b/searchcore/src/vespa/searchcore/fdispatch/search/datasetcollection.h index af47e6d953c..1c1db158d27 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/datasetcollection.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/datasetcollection.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/util/referencecounter.h> #include <vespa/searchcore/fdispatch/common/appcontext.h> #include <vespa/searchcore/fdispatch/search/configdesc.h> diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/engine_base.h b/searchcore/src/vespa/searchcore/fdispatch/search/engine_base.h index 002064aee77..d65367115d0 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/engine_base.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/engine_base.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/searchcore/fdispatch/common/timestat.h> #include "plain_dataset.h" #include "poss_count.h" diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.h b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.h index e87ce2a5670..8b1abdb0014 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/fnet_search.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/fnet/fnet.h> #include <vespa/vespalib/objects/nbostream.h> #include <vespa/searchcore/fdispatch/common/search.h> diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.h b/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.h index 004f3cf5e1a..cbdda7e39bf 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/mergehits.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/document/base/globalid.h> //----------------------------------------------------------------------------- diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/plain_dataset.h b/searchcore/src/vespa/searchcore/fdispatch/search/plain_dataset.h index a8d849469a4..8d73a216431 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/plain_dataset.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/plain_dataset.h @@ -6,7 +6,6 @@ #include <list> -#include <vespa/fastos/fastos.h> #include "child_info.h" #include <vespa/searchcore/fdispatch/search/dataset_base.h> #include <vespa/searchlib/util/rand48.h> diff --git a/searchcore/src/vespa/searchcore/fdispatch/search/poss_count.h b/searchcore/src/vespa/searchcore/fdispatch/search/poss_count.h index 53671e58de3..0ba99117d4f 100644 --- a/searchcore/src/vespa/searchcore/fdispatch/search/poss_count.h +++ b/searchcore/src/vespa/searchcore/fdispatch/search/poss_count.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> struct PossCount { bool valid; diff --git a/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp b/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp index 2c820b8e733..130e9731dec 100644 --- a/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp +++ b/searchcore/src/vespa/searchcore/proton/common/hw_info_sampler.cpp @@ -7,6 +7,7 @@ #include <vespa/searchcore/config/config-hwinfo.h> #include <vespa/config/print/fileconfigwriter.h> #include <vespa/vespalib/io/fileutil.h> +#include <vespa/fastos/file.h> using config::ConfigHandle; using config::ConfigSubscriber; diff --git a/searchcore/src/vespa/searchcore/proton/matching/querynodes.h b/searchcore/src/vespa/searchcore/proton/matching/querynodes.h index 586ed86e568..e29fdb4630f 100644 --- a/searchcore/src/vespa/searchcore/proton/matching/querynodes.h +++ b/searchcore/src/vespa/searchcore/proton/matching/querynodes.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/searchlib/queryeval/blueprint.h> #include <vespa/searchlib/fef/iindexenvironment.h> #include <vespa/searchlib/fef/itermdata.h> diff --git a/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp b/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp index c777f91d45b..3d56edd880d 100644 --- a/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/fileconfigmanager.cpp @@ -12,6 +12,7 @@ #include <vespa/config-rank-profiles.h> #include <vespa/searchsummary/config/config-juniperrc.h> #include <fstream> +#include <vespa/fastos/file.h> #include <vespa/log/log.h> LOG_SETUP(".proton.server.fileconfigmanager"); diff --git a/searchcore/src/vespa/searchcore/util/eventloop.h b/searchcore/src/vespa/searchcore/util/eventloop.h index 2bbb437675e..1858352b07f 100644 --- a/searchcore/src/vespa/searchcore/util/eventloop.h +++ b/searchcore/src/vespa/searchcore/util/eventloop.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> class FastS_TimeOut { diff --git a/searchcore/src/vespa/searchcore/util/log.h b/searchcore/src/vespa/searchcore/util/log.h index 873339a3253..0267e5d23e0 100644 --- a/searchcore/src/vespa/searchcore/util/log.h +++ b/searchcore/src/vespa/searchcore/util/log.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> /* * Define FastS_abort and FastS_assert macro's. diff --git a/searchlib/src/apps/loadattribute/loadattribute.cpp b/searchlib/src/apps/loadattribute/loadattribute.cpp index 1c7e940d381..ea1a3697f4c 100644 --- a/searchlib/src/apps/loadattribute/loadattribute.cpp +++ b/searchlib/src/apps/loadattribute/loadattribute.cpp @@ -9,6 +9,7 @@ #include <vespa/searchlib/attribute/attributevector.hpp> #include <vespa/fastlib/io/bufferedfile.h> +#include <vespa/fastos/app.h> namespace search { diff --git a/searchlib/src/tests/attribute/attributesearcher.h b/searchlib/src/tests/attribute/attributesearcher.h index 7456d22f306..8f9618b27db 100644 --- a/searchlib/src/tests/attribute/attributesearcher.h +++ b/searchlib/src/tests/attribute/attributesearcher.h @@ -3,7 +3,6 @@ #pragma once #include "runnable.h" -#include <vespa/fastos/fastos.h> #include <vespa/searchlib/attribute/attribute.h> #include <vespa/searchlib/attribute/attributeguard.h> #include <vespa/searchlib/queryeval/hitcollector.h> diff --git a/searchlib/src/tests/attribute/runnable.h b/searchlib/src/tests/attribute/runnable.h index 418230a2fc5..5038c22a1a5 100644 --- a/searchlib/src/tests/attribute/runnable.h +++ b/searchlib/src/tests/attribute/runnable.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/util/sync.h> namespace search { diff --git a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h index 63d41005932..e661431209c 100644 --- a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h +++ b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/searchlib/parsequery/stackdumpiterator.h> class StackDumpIteratorTest : public FastOS_Application diff --git a/searchlib/src/tests/transactionlogstress/translogstress.cpp b/searchlib/src/tests/transactionlogstress/translogstress.cpp index 1199ff48843..1e569f8791a 100644 --- a/searchlib/src/tests/transactionlogstress/translogstress.cpp +++ b/searchlib/src/tests/transactionlogstress/translogstress.cpp @@ -6,6 +6,7 @@ #include <vespa/searchlib/util/rand48.h> #include <vespa/searchlib/util/runnable.h> #include <vespa/searchlib/index/dummyfileheadercontext.h> +#include <vespa/fastos/app.h> #include <iostream> #include <stdexcept> diff --git a/searchlib/src/vespa/searchlib/aggregation/aggregation.h b/searchlib/src/vespa/searchlib/aggregation/aggregation.h index cedb5571c6e..e17ee88c113 100644 --- a/searchlib/src/vespa/searchlib/aggregation/aggregation.h +++ b/searchlib/src/vespa/searchlib/aggregation/aggregation.h @@ -1,7 +1,6 @@ // 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 <vespa/searchlib/common/identifiable.h> #include <vespa/searchlib/common/rankedhit.h> #include <vespa/searchlib/attribute/attributeguard.h> diff --git a/searchlib/src/vespa/searchlib/aggregation/hit.h b/searchlib/src/vespa/searchlib/aggregation/hit.h index 2f628c3003c..cd9758722ed 100644 --- a/searchlib/src/vespa/searchlib/aggregation/hit.h +++ b/searchlib/src/vespa/searchlib/aggregation/hit.h @@ -1,7 +1,6 @@ // 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 <vespa/searchlib/common/identifiable.h> #include <vespa/searchlib/common/hitrank.h> #include "rawrank.h" diff --git a/searchlib/src/vespa/searchlib/attribute/enumstore.h b/searchlib/src/vespa/searchlib/attribute/enumstore.h index a31693823b7..439c787f88f 100644 --- a/searchlib/src/vespa/searchlib/attribute/enumstore.h +++ b/searchlib/src/vespa/searchlib/attribute/enumstore.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include "enumstorebase.h" #include <vespa/searchlib/util/foldedstringcompare.h> #include <vespa/vespalib/util/buffer.h> diff --git a/searchlib/src/vespa/searchlib/bitcompression/compression.h b/searchlib/src/vespa/searchlib/bitcompression/compression.h index b2924dc42b7..6a8e1ce6790 100644 --- a/searchlib/src/vespa/searchlib/bitcompression/compression.h +++ b/searchlib/src/vespa/searchlib/bitcompression/compression.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/searchlib/util/comprfile.h> #include <vespa/searchlib/index/postinglistparams.h> #include <vespa/vespalib/stllike/string.h> diff --git a/searchlib/src/vespa/searchlib/common/gid.h b/searchlib/src/vespa/searchlib/common/gid.h index ac76c72fe7e..d896fa7d6b3 100644 --- a/searchlib/src/vespa/searchlib/common/gid.h +++ b/searchlib/src/vespa/searchlib/common/gid.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> namespace search { diff --git a/searchlib/src/vespa/searchlib/common/indexmetainfo.h b/searchlib/src/vespa/searchlib/common/indexmetainfo.h index 823f69e7a94..df731004362 100644 --- a/searchlib/src/vespa/searchlib/common/indexmetainfo.h +++ b/searchlib/src/vespa/searchlib/common/indexmetainfo.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/stllike/string.h> #include <vector> diff --git a/searchlib/src/vespa/searchlib/common/sortdata.h b/searchlib/src/vespa/searchlib/common/sortdata.h index 186e534ad5b..33a47841c9c 100644 --- a/searchlib/src/vespa/searchlib/common/sortdata.h +++ b/searchlib/src/vespa/searchlib/common/sortdata.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> namespace search { namespace common { diff --git a/searchlib/src/vespa/searchlib/common/sortresults.cpp b/searchlib/src/vespa/searchlib/common/sortresults.cpp index 8878e8bdd19..c071e06f3db 100644 --- a/searchlib/src/vespa/searchlib/common/sortresults.cpp +++ b/searchlib/src/vespa/searchlib/common/sortresults.cpp @@ -73,7 +73,6 @@ FastS_radixsort(RankedHit a[], uint32_t n, uint32_t ntop) memset(cnt, 0, 256*sizeof(uint32_t)); // Count occurrences [NB: will fail with n < 3] for(i = 0; i < n - 3; i += 4) { - FastOS_Prefetch::NT(((char *)(&a[i])) + PREFETCH); cnt[(R(a[i]._rankValue) >> SHIFT) & 0xFF]++; cnt[(R(a[i + 1]._rankValue) >> SHIFT) & 0xFF]++; cnt[(R(a[i + 2]._rankValue) >> SHIFT) & 0xFF]++; diff --git a/searchlib/src/vespa/searchlib/common/sortspec.h b/searchlib/src/vespa/searchlib/common/sortspec.h index 80b5cfaf795..bc8af043d55 100644 --- a/searchlib/src/vespa/searchlib/common/sortspec.h +++ b/searchlib/src/vespa/searchlib/common/sortspec.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/util/buffer.h> #include <vector> #include <vespa/vespalib/stllike/string.h> diff --git a/searchlib/src/vespa/searchlib/common/transport.h b/searchlib/src/vespa/searchlib/common/transport.h index a54d2660a5f..90e975d8221 100644 --- a/searchlib/src/vespa/searchlib/common/transport.h +++ b/searchlib/src/vespa/searchlib/common/transport.h @@ -6,7 +6,6 @@ #pragma once -#include <vespa/fastos/fastos.h> namespace search { diff --git a/searchlib/src/vespa/searchlib/expression/expressionnode.h b/searchlib/src/vespa/searchlib/expression/expressionnode.h index 69b7f430193..d22601326ca 100644 --- a/searchlib/src/vespa/searchlib/expression/expressionnode.h +++ b/searchlib/src/vespa/searchlib/expression/expressionnode.h @@ -1,7 +1,6 @@ // 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 <vespa/searchlib/common/identifiable.h> #include <vespa/vespalib/objects/identifiable.hpp> #include <vespa/vespalib/objects/visit.h> diff --git a/searchlib/src/vespa/searchlib/features/fieldmatch/computer.h b/searchlib/src/vespa/searchlib/features/fieldmatch/computer.h index 7e14c51a74c..6d71cd9a201 100644 --- a/searchlib/src/vespa/searchlib/features/fieldmatch/computer.h +++ b/searchlib/src/vespa/searchlib/features/fieldmatch/computer.h @@ -1,7 +1,6 @@ // 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 <vespa/searchlib/fef/iqueryenvironment.h> #include <vespa/searchlib/fef/fieldinfo.h> #include <vespa/searchlib/fef/matchdata.h> diff --git a/searchlib/src/vespa/searchlib/query/base.h b/searchlib/src/vespa/searchlib/query/base.h index ba066b5410d..d8e94de2b3e 100644 --- a/searchlib/src/vespa/searchlib/query/base.h +++ b/searchlib/src/vespa/searchlib/query/base.h @@ -1,7 +1,6 @@ // 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 <vespa/fastos/thread.h> #include <vespa/fastos/time.h> #include <vespa/fastlib/text/unicodeutil.h> diff --git a/searchlib/src/vespa/searchlib/query/tree/simplequery.h b/searchlib/src/vespa/searchlib/query/tree/simplequery.h index e0f66d70f28..0970ca597ae 100644 --- a/searchlib/src/vespa/searchlib/query/tree/simplequery.h +++ b/searchlib/src/vespa/searchlib/query/tree/simplequery.h @@ -7,7 +7,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include "intermediatenodes.h" #include "termnodes.h" diff --git a/searchlib/src/vespa/searchlib/query/tree/term.h b/searchlib/src/vespa/searchlib/query/tree/term.h index dafcc3976da..c13a586dd01 100644 --- a/searchlib/src/vespa/searchlib/query/tree/term.h +++ b/searchlib/src/vespa/searchlib/query/tree/term.h @@ -1,7 +1,6 @@ // 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 <vespa/vespalib/stllike/string.h> #include <vespa/searchlib/query/tree/node.h> #include <vespa/searchlib/query/weight.h> diff --git a/searchlib/src/vespa/searchlib/queryeval/iterator_pack.h b/searchlib/src/vespa/searchlib/queryeval/iterator_pack.h index b64af50a827..ac19bca3626 100644 --- a/searchlib/src/vespa/searchlib/queryeval/iterator_pack.h +++ b/searchlib/src/vespa/searchlib/queryeval/iterator_pack.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include "searchiterator.h" #include <vespa/searchlib/fef/termfieldmatchdata.h> #include <vespa/searchlib/fef/matchdata.h> diff --git a/searchlib/src/vespa/searchlib/transactionlog/domainpart.h b/searchlib/src/vespa/searchlib/transactionlog/domainpart.h index 59eb2f6be9a..1c081b8ecd7 100644 --- a/searchlib/src/vespa/searchlib/transactionlog/domainpart.h +++ b/searchlib/src/vespa/searchlib/transactionlog/domainpart.h @@ -5,23 +5,15 @@ #include <map> #include <vector> #include <atomic> -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/util/sync.h> #include <vespa/vespalib/util/memory.h> +#include <vespa/fastos/file.h> -namespace search -{ +namespace search { -namespace common -{ +namespace common { class FileHeaderContext; } -class FileHeaderContext; - -} - - -namespace transactionlog -{ +namespace transactionlog { class DomainPart { private: diff --git a/searchlib/src/vespa/searchlib/util/comprbuffer.h b/searchlib/src/vespa/searchlib/util/comprbuffer.h index 43a67bcfb97..9769f60fedb 100644 --- a/searchlib/src/vespa/searchlib/util/comprbuffer.h +++ b/searchlib/src/vespa/searchlib/util/comprbuffer.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/searchlib/util/filealign.h> namespace search { diff --git a/searchlib/src/vespa/searchlib/util/comprfile.h b/searchlib/src/vespa/searchlib/util/comprfile.h index 8c05884a0f1..29c3af9a945 100644 --- a/searchlib/src/vespa/searchlib/util/comprfile.h +++ b/searchlib/src/vespa/searchlib/util/comprfile.h @@ -4,18 +4,13 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <utility> #include <vespa/searchlib/util/filealign.h> #include <vespa/searchlib/util/comprbuffer.h> -namespace vespalib -{ - -class nbostream; - -} +class FastOS_FileInterface; +namespace vespalib { class nbostream; } namespace search { diff --git a/searchlib/src/vespa/searchlib/util/filealign.h b/searchlib/src/vespa/searchlib/util/filealign.h index 2bad98c9dd3..23586d02eea 100644 --- a/searchlib/src/vespa/searchlib/util/filealign.h +++ b/searchlib/src/vespa/searchlib/util/filealign.h @@ -2,15 +2,11 @@ #pragma once -namespace vespalib -{ - -class nbostream; +class FastOS_FileInterface; -} +namespace vespalib { class nbostream; } -namespace search -{ +namespace search { class FileAlign { diff --git a/searchlib/src/vespa/searchlib/util/foldedstringcompare.h b/searchlib/src/vespa/searchlib/util/foldedstringcompare.h index 1904e0ca940..1a4945335c0 100644 --- a/searchlib/src/vespa/searchlib/util/foldedstringcompare.h +++ b/searchlib/src/vespa/searchlib/util/foldedstringcompare.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> namespace search { diff --git a/searchlib/src/vespa/searchlib/util/memorytub.h b/searchlib/src/vespa/searchlib/util/memorytub.h index 40068e8e674..a217bf29622 100644 --- a/searchlib/src/vespa/searchlib/util/memorytub.h +++ b/searchlib/src/vespa/searchlib/util/memorytub.h @@ -10,7 +10,6 @@ #include <new> -#include <vespa/fastos/fastos.h> namespace search { namespace util { diff --git a/searchlib/src/vespa/searchlib/util/rand48.h b/searchlib/src/vespa/searchlib/util/rand48.h index 91fcf1b03e9..d8bfa683f15 100644 --- a/searchlib/src/vespa/searchlib/util/rand48.h +++ b/searchlib/src/vespa/searchlib/util/rand48.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> namespace search { diff --git a/searchlib/src/vespa/searchlib/util/randomgenerator.h b/searchlib/src/vespa/searchlib/util/randomgenerator.h index 92a7b190e80..b5cf60a4899 100644 --- a/searchlib/src/vespa/searchlib/util/randomgenerator.h +++ b/searchlib/src/vespa/searchlib/util/randomgenerator.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/searchlib/util/rand48.h> #include <vespa/vespalib/stllike/string.h> #include <vector> diff --git a/searchlib/src/vespa/searchlib/util/runnable.h b/searchlib/src/vespa/searchlib/util/runnable.h index 437a2333231..16dfdc06bd2 100644 --- a/searchlib/src/vespa/searchlib/util/runnable.h +++ b/searchlib/src/vespa/searchlib/util/runnable.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/util/sync.h> namespace search { diff --git a/searchsummary/src/tests/extractkeywords/extractkeywordstest.h b/searchsummary/src/tests/extractkeywords/extractkeywordstest.h index 1a037fcb9cd..9e9ba3ac09c 100644 --- a/searchsummary/src/tests/extractkeywords/extractkeywordstest.h +++ b/searchsummary/src/tests/extractkeywords/extractkeywordstest.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> namespace search { namespace docummary { diff --git a/slobrok/src/apps/slobrok/slobrok.cpp b/slobrok/src/apps/slobrok/slobrok.cpp index 6258ab18c90..b87b0e96127 100644 --- a/slobrok/src/apps/slobrok/slobrok.cpp +++ b/slobrok/src/apps/slobrok/slobrok.cpp @@ -2,6 +2,7 @@ #include <vespa/fnet/fnet.h> #include <vespa/slobrok/server/sbenv.h> #include <vespa/vespalib/util/exceptions.h> +#include <vespa/fastos/app.h> #include <vespa/log/log.h> LOG_SETUP("slobrok"); diff --git a/slobrok/src/vespa/slobrok/server/configshim.h b/slobrok/src/vespa/slobrok/server/configshim.h index e1c3cb38d80..1b80ceb7eab 100644 --- a/slobrok/src/vespa/slobrok/server/configshim.h +++ b/slobrok/src/vespa/slobrok/server/configshim.h @@ -1,7 +1,6 @@ // 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 <string> #include <vespa/slobrok/cfg.h> diff --git a/slobrok/src/vespa/slobrok/server/sbenv.h b/slobrok/src/vespa/slobrok/server/sbenv.h index 1988e8821a6..e77ff1504aa 100644 --- a/slobrok/src/vespa/slobrok/server/sbenv.h +++ b/slobrok/src/vespa/slobrok/server/sbenv.h @@ -1,7 +1,6 @@ // 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 "named_service.h" #include "rpc_server_map.h" #include "rpc_server_manager.h" diff --git a/slobrok/src/vespa/slobrok/server/slobrokserver.h b/slobrok/src/vespa/slobrok/server/slobrokserver.h index c6c41a45b12..500ff315fa3 100644 --- a/slobrok/src/vespa/slobrok/server/slobrokserver.h +++ b/slobrok/src/vespa/slobrok/server/slobrokserver.h @@ -1,7 +1,6 @@ // 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 "sbenv.h" #include "configshim.h" #include <vespa/vespalib/util/thread.h> diff --git a/staging_vespalib/src/vespa/vespalib/util/cpu.h b/staging_vespalib/src/vespa/vespalib/util/cpu.h index 2288a1fc1e2..719bf0d8a98 100644 --- a/staging_vespalib/src/vespa/vespalib/util/cpu.h +++ b/staging_vespalib/src/vespa/vespalib/util/cpu.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> namespace vespalib { diff --git a/staging_vespalib/src/vespa/vespalib/util/document_runnable.h b/staging_vespalib/src/vespa/vespalib/util/document_runnable.h index f9a666af507..67ca8a67d78 100644 --- a/staging_vespalib/src/vespa/vespalib/util/document_runnable.h +++ b/staging_vespalib/src/vespa/vespalib/util/document_runnable.h @@ -19,8 +19,8 @@ #pragma once -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/util/sync.h> +#include <vespa/fastos/thread.h> namespace document { diff --git a/staging_vespalib/src/vespa/vespalib/util/librarypool.h b/staging_vespalib/src/vespa/vespalib/util/librarypool.h index 95491865a3f..57a92f473c2 100644 --- a/staging_vespalib/src/vespa/vespalib/util/librarypool.h +++ b/staging_vespalib/src/vespa/vespalib/util/librarypool.h @@ -1,9 +1,9 @@ // 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 <vespa/vespalib/util/sync.h> #include <vespa/vespalib/stllike/string.h> +#include <vespa/fastos/dynamiclibrary.h> #include <map> namespace vespalib { diff --git a/staging_vespalib/src/vespa/vespalib/util/rand48.h b/staging_vespalib/src/vespa/vespalib/util/rand48.h index 91fcf1b03e9..d8bfa683f15 100644 --- a/staging_vespalib/src/vespa/vespalib/util/rand48.h +++ b/staging_vespalib/src/vespa/vespalib/util/rand48.h @@ -4,7 +4,6 @@ #pragma once -#include <vespa/fastos/fastos.h> namespace search { diff --git a/staging_vespalib/src/vespa/vespalib/util/shutdownguard.h b/staging_vespalib/src/vespa/vespalib/util/shutdownguard.h index 7c94127d903..b2a5ef3f27e 100644 --- a/staging_vespalib/src/vespa/vespalib/util/shutdownguard.h +++ b/staging_vespalib/src/vespa/vespalib/util/shutdownguard.h @@ -1,7 +1,6 @@ // 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> namespace vespalib { diff --git a/staging_vespalib/src/vespa/vespalib/util/timer.h b/staging_vespalib/src/vespa/vespalib/util/timer.h index eeb5f6b4c5d..66584f69e10 100644 --- a/staging_vespalib/src/vespa/vespalib/util/timer.h +++ b/staging_vespalib/src/vespa/vespalib/util/timer.h @@ -1,7 +1,6 @@ // 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 <vespa/vespalib/util/linkedptr.h> #include <vespa/vespalib/util/executor.h> #include <vespa/vespalib/util/sync.h> diff --git a/storage/src/tests/common/storagelinktest.h b/storage/src/tests/common/storagelinktest.h index efeebb1146e..22c85763009 100644 --- a/storage/src/tests/common/storagelinktest.h +++ b/storage/src/tests/common/storagelinktest.h @@ -3,7 +3,6 @@ #pragma once #include <cppunit/extensions/HelperMacros.h> -#include <vespa/fastos/fastos.h> #include <tests/common/dummystoragelink.h> namespace storage { diff --git a/storage/src/tests/common/testhelper.h b/storage/src/tests/common/testhelper.h index be2c3e7ec66..988ebee2798 100644 --- a/storage/src/tests/common/testhelper.h +++ b/storage/src/tests/common/testhelper.h @@ -5,7 +5,6 @@ #include <fstream> -#include <vespa/fastos/fastos.h> #include <vespa/messagebus/testlib/slobrok.h> #include <sstream> diff --git a/storage/src/tests/distributor/bucketdatabasetest.h b/storage/src/tests/distributor/bucketdatabasetest.h index f9429de8b1f..63c3a4cc4eb 100644 --- a/storage/src/tests/distributor/bucketdatabasetest.h +++ b/storage/src/tests/distributor/bucketdatabasetest.h @@ -1,7 +1,6 @@ // 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 <vespa/document/bucket/bucketid.h> #include <vespa/storage/bucketdb/bucketdatabase.h> #include <vespa/vespalib/util/document_runnable.h> diff --git a/storage/src/tests/testhelper.h b/storage/src/tests/testhelper.h index be2c3e7ec66..988ebee2798 100644 --- a/storage/src/tests/testhelper.h +++ b/storage/src/tests/testhelper.h @@ -5,7 +5,6 @@ #include <fstream> -#include <vespa/fastos/fastos.h> #include <vespa/messagebus/testlib/slobrok.h> #include <sstream> diff --git a/storage/src/vespa/storage/bucketdb/judyarray.h b/storage/src/vespa/storage/bucketdb/judyarray.h index 00bf3c6ef96..9789d387a03 100644 --- a/storage/src/vespa/storage/bucketdb/judyarray.h +++ b/storage/src/vespa/storage/bucketdb/judyarray.h @@ -18,7 +18,6 @@ #include <vespa/vespalib/util/exceptions.h> #include <vespa/vespalib/util/printable.h> -#include <vespa/fastos/fastos.h> #include <Judy.h> namespace storage { diff --git a/storage/src/vespa/storage/common/storagelink.h b/storage/src/vespa/storage/common/storagelink.h index d4cdb95a327..e9ea8403321 100644 --- a/storage/src/vespa/storage/common/storagelink.h +++ b/storage/src/vespa/storage/common/storagelink.h @@ -20,7 +20,6 @@ #pragma once #include <vespa/vespalib/util/printable.h> -#include <vespa/fastos/fastos.h> #include <memory> #include <vespa/storageapi/messageapi/messagehandler.h> #include <vespa/storageapi/messageapi/storagemessage.h> diff --git a/storage/src/vespa/storage/distributor/bucketdbupdater.h b/storage/src/vespa/storage/distributor/bucketdbupdater.h index cfed8d65ccc..84903b9fe57 100644 --- a/storage/src/vespa/storage/distributor/bucketdbupdater.h +++ b/storage/src/vespa/storage/distributor/bucketdbupdater.h @@ -1,7 +1,6 @@ // 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 <set> #include <vespa/document/bucket/bucketid.h> #include <vespa/storageapi/messageapi/returncode.h> diff --git a/storage/src/vespa/storage/distributor/pendingmessagetracker.h b/storage/src/vespa/storage/distributor/pendingmessagetracker.h index bcae5cc9790..40415a80e53 100644 --- a/storage/src/vespa/storage/distributor/pendingmessagetracker.h +++ b/storage/src/vespa/storage/distributor/pendingmessagetracker.h @@ -1,7 +1,6 @@ // 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 <vespa/document/bucket/bucketid.h> #include <vespa/storageapi/messageapi/returncode.h> #include <vespa/storageapi/message/bucket.h> diff --git a/storage/src/vespa/storage/storageserver/statemanager.cpp b/storage/src/vespa/storage/storageserver/statemanager.cpp index 06dd05bc8d7..f0ba1027afa 100644 --- a/storage/src/vespa/storage/storageserver/statemanager.cpp +++ b/storage/src/vespa/storage/storageserver/statemanager.cpp @@ -388,8 +388,8 @@ StateManager::onGetNodeState(const api::GetNodeStateCommand::SP& cmd) && (*cmd->getExpectedState() == *_nodeState || sentReply)) { LOG(debug, "Received get node state request with timeout of " - "%" PRIu32 " milliseconds. Scheduling to be answered in " - "%" PRIu32 " milliseconds unless a node state change " + "%u milliseconds. Scheduling to be answered in " + "%u milliseconds unless a node state change " "happens before that time.", cmd->getTimeout(), cmd->getTimeout() * 800 / 1000); TimeStatePair pair( @@ -473,7 +473,7 @@ StateManager::sendGetNodeStateReplies(framework::MilliSecTime olderThanTime, if (node != 0xffff && node != it->second->getSourceIndex()) { ++it; } else if (!olderThanTime.isSet() || it->first < olderThanTime) { - LOG(debug, "Sending reply to msg with id %" PRIu64, + LOG(debug, "Sending reply to msg with id %lu", it->second->getMsgId()); std::shared_ptr<api::GetNodeStateReply> reply( diff --git a/storage/src/vespa/storage/storageserver/storagenode.h b/storage/src/vespa/storage/storageserver/storagenode.h index 7429283808c..3e4a4b7642e 100644 --- a/storage/src/vespa/storage/storageserver/storagenode.h +++ b/storage/src/vespa/storage/storageserver/storagenode.h @@ -13,7 +13,6 @@ #pragma once #include <vespa/document/bucket/bucketidfactory.h> -#include <vespa/fastos/fastos.h> #include <memory> #include <string> #include <vespa/storage/config/config-stor-server.h> diff --git a/storage/src/vespa/storage/storageutil/recordflatfile.h b/storage/src/vespa/storage/storageutil/recordflatfile.h index b5eba556f5c..801338bd697 100644 --- a/storage/src/vespa/storage/storageutil/recordflatfile.h +++ b/storage/src/vespa/storage/storageutil/recordflatfile.h @@ -57,7 +57,6 @@ #include <cassert> #include <vespa/vespalib/util/exceptions.h> -#include <vespa/fastos/fastos.h> #include <list> #include <memory> #include <stdexcept> diff --git a/storageapi/src/vespa/storageapi/defs.h b/storageapi/src/vespa/storageapi/defs.h index 787e7bdfbee..89e4b90268a 100644 --- a/storageapi/src/vespa/storageapi/defs.h +++ b/storageapi/src/vespa/storageapi/defs.h @@ -6,7 +6,7 @@ */ #pragma once -#include <vespa/fastos/fastos.h> +#include <cstdint> namespace storage { namespace api { @@ -16,6 +16,5 @@ typedef uint32_t VisitorId; const Timestamp MAX_TIMESTAMP = (Timestamp)-1ll; -} // api -} // storage - +} +} diff --git a/storageserver/src/apps/storaged/forcelink.h b/storageserver/src/apps/storaged/forcelink.h index c3fa56c1b3c..8602dc055ab 100644 --- a/storageserver/src/apps/storaged/forcelink.h +++ b/storageserver/src/apps/storaged/forcelink.h @@ -8,7 +8,6 @@ #pragma once #include <vespa/documentapi/documentapi.h> -#include <vespa/fastos/fastos.h> #include <vespa/config-rank-profiles.h> namespace storage { diff --git a/storageserver/src/tests/testhelper.h b/storageserver/src/tests/testhelper.h index be2c3e7ec66..988ebee2798 100644 --- a/storageserver/src/tests/testhelper.h +++ b/storageserver/src/tests/testhelper.h @@ -5,7 +5,6 @@ #include <fstream> -#include <vespa/fastos/fastos.h> #include <vespa/messagebus/testlib/slobrok.h> #include <sstream> diff --git a/vespaclient/src/vespa/vespaclient/spoolmaster/application.h b/vespaclient/src/vespa/vespaclient/spoolmaster/application.h index 7697169d9b4..b82a89d51e9 100644 --- a/vespaclient/src/vespa/vespaclient/spoolmaster/application.h +++ b/vespaclient/src/vespa/vespaclient/spoolmaster/application.h @@ -3,7 +3,6 @@ #include <string> #include <vector> -#include <vespa/fastos/fastos.h> namespace spoolmaster { /** diff --git a/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h b/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h index c443d2f03a1..f498b522fea 100644 --- a/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h +++ b/vespaclient/src/vespa/vespaclient/vespadoclocator/application.h @@ -2,6 +2,7 @@ #pragma once #include "locator.h" +#include <vespa/fastos/app.h> class Application : public FastOS_Application { private: diff --git a/vespaclient/src/vespa/vespaclient/vespadoclocator/locator.h b/vespaclient/src/vespa/vespaclient/vespadoclocator/locator.h index 24af000e667..c8750ba892e 100644 --- a/vespaclient/src/vespa/vespaclient/vespadoclocator/locator.h +++ b/vespaclient/src/vespa/vespaclient/vespadoclocator/locator.h @@ -1,7 +1,6 @@ // 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 <vespa/document/base/documentid.h> #include <vespa/document/bucket/bucketidfactory.h> diff --git a/vespalib/src/tests/sha1/rfc_sha1.h b/vespalib/src/tests/sha1/rfc_sha1.h index a5e21eb1d1c..031b4194ca5 100644 --- a/vespalib/src/tests/sha1/rfc_sha1.h +++ b/vespalib/src/tests/sha1/rfc_sha1.h @@ -4,7 +4,6 @@ /* Modifications: - renamed file from "sha1.h" to "rfc_sha1.h" - - include "fastos/fastos.h" instead of <stdint.h> - use 'uint32_t' instead of 'int_least16_t' */ @@ -24,15 +23,8 @@ * */ #pragma once -/* - * If you do not have the ISO standard stdint.h header file, then you - * must typdef the following: - * name meaning - * uint32_t unsigned 32 bit integer - * uint8_t unsigned 8 bit integer (i.e., unsigned char) - * - */ -#include <vespa/fastos/fastos.h> + +#include <cstdint> #ifndef _SHA_enum_ #define _SHA_enum_ diff --git a/vespalib/src/vespa/vespalib/websocket/acceptor.h b/vespalib/src/vespa/vespalib/websocket/acceptor.h index 6d6965b4a80..329c5a0f998 100644 --- a/vespalib/src/vespa/vespalib/websocket/acceptor.h +++ b/vespalib/src/vespa/vespalib/websocket/acceptor.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include "handler.h" #include "server_socket.h" #include <thread> diff --git a/vespalib/src/vespa/vespalib/websocket/websocket_server.h b/vespalib/src/vespa/vespalib/websocket/websocket_server.h index cc0ebed8384..3b36a7bd12e 100644 --- a/vespalib/src/vespa/vespalib/websocket/websocket_server.h +++ b/vespalib/src/vespa/vespalib/websocket/websocket_server.h @@ -2,7 +2,6 @@ #pragma once -#include <vespa/fastos/fastos.h> #include "handler.h" #include "acceptor.h" #include <map> diff --git a/vespalog/src/vespa/log/log-target-file.h b/vespalog/src/vespa/log/log-target-file.h index 4ac71ff65ec..7851b231e7d 100644 --- a/vespalog/src/vespa/log/log-target-file.h +++ b/vespalog/src/vespa/log/log-target-file.h @@ -4,7 +4,6 @@ #include <sys/types.h> #include <sys/stat.h> -#include <vespa/fastos/fastos.h> #include "log-target.h" diff --git a/vespamalloc/src/vespamalloc/malloc/common.cpp b/vespamalloc/src/vespamalloc/malloc/common.cpp index 68181c664a4..d14a0317630 100644 --- a/vespamalloc/src/vespamalloc/malloc/common.cpp +++ b/vespamalloc/src/vespamalloc/malloc/common.cpp @@ -1,5 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/common.h> +#include <pthread.h> namespace vespamalloc { diff --git a/vespamalloc/src/vespamalloc/malloc/common.h b/vespamalloc/src/vespamalloc/malloc/common.h index a065bc43a0a..ee08cfbafaa 100644 --- a/vespamalloc/src/vespamalloc/malloc/common.h +++ b/vespamalloc/src/vespamalloc/malloc/common.h @@ -1,7 +1,6 @@ // 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 <vespa/vespalib/util/atomic.h> #include <vespa/vespalib/util/optimized.h> #include <new> @@ -13,6 +12,8 @@ extern "C" void MallocRecurseOnSuspend(bool recurse) __attribute__ ((noinline)); namespace vespamalloc { +#define VESPA_DLL_EXPORT __attribute__ ((visibility("default"))) + #define NELEMS(a) sizeof(a)/sizeof(a[0]) #define NUM_SIZE_CLASSES 32 // Max 64G diff --git a/vespamalloc/src/vespamalloc/malloc/memorywatcher.h b/vespamalloc/src/vespamalloc/malloc/memorywatcher.h index 8b41e1cc5e3..9bbfa38c416 100644 --- a/vespamalloc/src/vespamalloc/malloc/memorywatcher.h +++ b/vespamalloc/src/vespamalloc/malloc/memorywatcher.h @@ -6,6 +6,7 @@ #include <limits.h> #include <sys/stat.h> #include <ctype.h> +#include <fcntl.h> #include <vespa/defaults.h> #include <vespamalloc/malloc/malloc.h> #include <vespamalloc/util/callstack.h> diff --git a/vespamalloc/src/vespamalloc/malloc/overload.h b/vespamalloc/src/vespamalloc/malloc/overload.h index caf8184acd0..4f3f62b8655 100644 --- a/vespamalloc/src/vespamalloc/malloc/overload.h +++ b/vespamalloc/src/vespamalloc/malloc/overload.h @@ -28,7 +28,7 @@ void operator delete[](void* ptr, std::size_t sz, const std::nothrow_t&) noexcep void* operator new(std::size_t sz) throw (std::bad_alloc) { void * ptr(vespamalloc::createAllocator()->malloc(sz)); - if (ptr == NULL) { + if (ptr == nullptr) { throw std::bad_alloc(); } return ptr; @@ -90,7 +90,7 @@ void * realloc(void * ptr, size_t sz) void* memalign(size_t align, size_t sz) __attribute__((visibility ("default"))); void* memalign(size_t align, size_t sz) { - void *ptr(NULL); + void *ptr(nullptr); size_t align_1(align - 1); if ((align & (align_1)) == 0) { ptr = vespamalloc::_GmemP->malloc(vespamalloc::_GmemP->getMinSizeForAlignment(align, sz)); @@ -151,13 +151,13 @@ extern "C" VESPA_DLL_EXPORT void * local_dlopen(const char *filename, int flag) VESPA_DLL_EXPORT void * local_dlopen(const char *filename, int flag) { // A pointer to the library version of dlopen. - static dlopen_function real_dlopen = NULL; + static dlopen_function real_dlopen = nullptr; const char * dlopenName = "dlopen"; - if (real_dlopen == NULL) { + if (real_dlopen == nullptr) { real_dlopen = (dlopen_function) dlsym (RTLD_NEXT, dlopenName); - if (real_dlopen == NULL) { + if (real_dlopen == nullptr) { fprintf (stderr, "Could not find the dlopen function!\n"); abort(); } @@ -174,13 +174,13 @@ extern "C" VESPA_DLL_EXPORT int local_dlclose(void * handle) __asm__("dlclose"); VESPA_DLL_EXPORT int local_dlclose(void * handle) { // A pointer to the library version of dlclose. - static dlclose_function real_dlclose = NULL; + static dlclose_function real_dlclose = nullptr; const char * dlcloseName = "dlclose"; - if (real_dlclose == NULL) { + if (real_dlclose == nullptr) { real_dlclose = (dlclose_function) dlsym (RTLD_NEXT, dlcloseName); - if (real_dlclose == NULL) { + if (real_dlclose == nullptr) { fprintf (stderr, "Could not find the dlclose function!\n"); abort(); } @@ -195,13 +195,13 @@ extern "C" VESPA_DLL_EXPORT void * local_dlsym(void * handle, const char * symbo VESPA_DLL_EXPORT void * local_dlsym(void * handle, const char * symbol) { // A pointer to the library version of dlsym. - static dlsym_function real_dlsym = NULL; + static dlsym_function real_dlsym = nullptr; const char * dlsymName = "dlsym"; - if (real_dlsym == NULL) { + if (real_dlsym == nullptr) { real_dlsym = (dlsym_function) dlvsym (RTLD_NEXT, dlsymName, "GLIBC_2.2.5"); - if (real_dlsym == NULL) { + if (real_dlsym == nullptr) { fprintf (stderr, "Could not find the dlsym function!\n"); abort(); } diff --git a/vespamalloc/src/vespamalloc/malloc/threadproxy.cpp b/vespamalloc/src/vespamalloc/malloc/threadproxy.cpp index 7bbe2da345d..17da09f9b35 100644 --- a/vespamalloc/src/vespamalloc/malloc/threadproxy.cpp +++ b/vespamalloc/src/vespamalloc/malloc/threadproxy.cpp @@ -1,6 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include <vespamalloc/malloc/threadproxy.h> #include <dlfcn.h> +#include <pthread.h> +#include <cstdio> +#include <cerrno> namespace vespamalloc { diff --git a/vespamalloc/src/vespamalloc/util/stream.cpp b/vespamalloc/src/vespamalloc/util/stream.cpp index 592d3a07709..dc0692350d1 100644 --- a/vespamalloc/src/vespamalloc/util/stream.cpp +++ b/vespamalloc/src/vespamalloc/util/stream.cpp @@ -1,6 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <algorithm> #include "stream.h" +#include <algorithm> +#include <stdio.h> namespace vespamalloc { @@ -15,7 +16,7 @@ asciistream::asciistream() : asciistream::~asciistream() { free(_buffer); - _buffer = NULL; + _buffer = nullptr; } asciistream::asciistream(const asciistream & rhs) : @@ -64,7 +65,7 @@ asciistream & asciistream::operator << (uint32_t v) asciistream & asciistream::operator << (int64_t v) { char tmp[32]; - int len = snprintf(tmp, sizeof(tmp), "%" PRId64, v); + int len = snprintf(tmp, sizeof(tmp), "%ld", v); write(tmp, len); return *this; } @@ -72,7 +73,7 @@ asciistream & asciistream::operator << (int64_t v) asciistream & asciistream::operator << (uint64_t v) { char tmp[32]; - int len = snprintf(tmp, sizeof(tmp), "%" PRIu64, v); + int len = snprintf(tmp, sizeof(tmp), "%lu", v); write(tmp, len); return *this; } diff --git a/vespamalloc/src/vespamalloc/util/stream.h b/vespamalloc/src/vespamalloc/util/stream.h index 175ae5de00f..67a33a542db 100644 --- a/vespamalloc/src/vespamalloc/util/stream.h +++ b/vespamalloc/src/vespamalloc/util/stream.h @@ -1,8 +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 <vespa/fastos/fastos.h> -#include <string> +#include <cstring> +#include <cstdint> namespace vespamalloc { @@ -16,7 +16,7 @@ public: void swap(asciistream & rhs); asciistream & operator << (char v) { write(&v, 1); return *this; } asciistream & operator << (unsigned char v) { write(&v, 1); return *this; } - asciistream & operator << (const char * v) { if (v != NULL) { write(v, strlen(v)); } return *this; } + asciistream & operator << (const char * v) { if (v != nullptr) { write(v, strlen(v)); } return *this; } asciistream & operator << (int32_t v); asciistream & operator << (uint32_t v); asciistream & operator << (int64_t v); @@ -38,7 +38,7 @@ private: class string : public asciistream { public: - string(const char * v = NULL) : asciistream() { *this << v; } + string(const char * v = nullptr) : asciistream() { *this << v; } string & operator += (const char * v) { *this << v; return *this; } string & operator += (const asciistream & v) { *this << v.c_str(); return *this; } }; diff --git a/vsm/src/vespa/vsm/config/vsm-cfif.h b/vsm/src/vespa/vsm/config/vsm-cfif.h index db0b2df2a4f..abf92ae8e8e 100644 --- a/vsm/src/vespa/vsm/config/vsm-cfif.h +++ b/vsm/src/vespa/vsm/config/vsm-cfif.h @@ -1,7 +1,6 @@ // 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 <vespa/vsm/config/config-vsmfields.h> #include <vespa/vsm/config/config-vsm.h> #include <vespa/vsm/config/config-vsmsummary.h> |