diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-17 11:59:55 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2016-12-19 14:15:41 +0000 |
commit | 817991c5182f896273cde10534ddd4376ee2d8d2 (patch) | |
tree | 5bf7b6b46b8686e6b188b88f0ff12f5a1d043a70 | |
parent | df7414c6ba44bea9a381e88d2989fe86f7bc44c6 (diff) |
Do not include fastos.h in header files.
10 files changed, 24 insertions, 41 deletions
diff --git a/document/src/vespa/document/util/bytebuffer.cpp b/document/src/vespa/document/util/bytebuffer.cpp index 4b27a7afa59..c7e1182a279 100644 --- a/document/src/vespa/document/util/bytebuffer.cpp +++ b/document/src/vespa/document/util/bytebuffer.cpp @@ -10,6 +10,7 @@ #include "stringutil.h" #include <vespa/vespalib/stllike/asciistream.h> #include <sstream> +#include <arpa/inet.h> #define LOG_DEBUG1(a) // Enable this macros instead to see what bytebuffer calls come diff --git a/searchcommon/src/vespa/searchcommon/common/schema.cpp b/searchcommon/src/vespa/searchcommon/common/schema.cpp index a7dbca8ba8c..f024814037d 100644 --- a/searchcommon/src/vespa/searchcommon/common/schema.cpp +++ b/searchcommon/src/vespa/searchcommon/common/schema.cpp @@ -4,6 +4,7 @@ #include <fstream> #include <vespa/config/common/configparser.h> #include <vespa/vespalib/stllike/asciistream.h> +#include <vespa/fastos/file.h> #include <vespa/log/log.h> LOG_SETUP(".index.schema"); diff --git a/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.cpp b/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.cpp index 5158deb23ce..39cf5517eeb 100644 --- a/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/data_directory_upgrader.cpp @@ -6,6 +6,7 @@ #include <vespa/vespalib/stllike/asciistream.h> #include <algorithm> #include <iostream> +#include <sys/stat.h> namespace proton { diff --git a/searchlib/src/apps/fileheaderinspect/fileheaderinspect.cpp b/searchlib/src/apps/fileheaderinspect/fileheaderinspect.cpp index 8a0bbd2540d..0d6f8c6baf9 100644 --- a/searchlib/src/apps/fileheaderinspect/fileheaderinspect.cpp +++ b/searchlib/src/apps/fileheaderinspect/fileheaderinspect.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 <vespa/fastos/app.h> +#include <vespa/fastos/file.h> #include <iomanip> #include <iostream> #include <vespa/vespalib/data/fileheader.h> diff --git a/staging_vespalib/src/vespa/vespalib/data/fileheader.cpp b/staging_vespalib/src/vespa/vespalib/data/fileheader.cpp index 1bddef0830d..7ee0db4bdf3 100644 --- a/staging_vespalib/src/vespa/vespalib/data/fileheader.cpp +++ b/staging_vespalib/src/vespa/vespalib/data/fileheader.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 "fileheader.h" #include <vespa/vespalib/stllike/asciistream.h> +#include <vespa/fastos/file.h> #include <vespa/log/log.h> LOG_SETUP(".fileheader"); diff --git a/vespalib/src/vespa/vespalib/geo/zcurve.h b/vespalib/src/vespa/vespalib/geo/zcurve.h index 8986cdd35ba..750b635b2d3 100644 --- a/vespalib/src/vespa/vespalib/geo/zcurve.h +++ b/vespalib/src/vespa/vespalib/geo/zcurve.h @@ -1,15 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -/** - * @file zcurve.h - * @author Tor Egge - * - * $Id$ - */ #pragma once -#include <vespa/fastos/fastos.h> +#include <cstdint> #include <cassert> +#include <vector> namespace vespalib { namespace geo { @@ -34,38 +29,14 @@ public: int64_t _zMaxy; /* Max Y coordinate, interleaved (Z curve) */ public: - BoundingBox(int32_t minx, - int32_t maxx, - int32_t miny, - int32_t maxy); - - ~BoundingBox(void) - { - } + BoundingBox(int32_t minx, int32_t maxx, int32_t miny, int32_t maxy); - int64_t - getzMinx(void) const - { - return _zMinx; - } + ~BoundingBox() { } - int64_t - getzMaxx(void) const - { - return _zMaxx; - } - - int64_t - getzMiny(void) const - { - return _zMiny; - } - - int64_t - getzMaxy(void) const - { - return _zMaxy; - } + int64_t getzMinx() const { return _zMinx; } + int64_t getzMaxx() const { return _zMaxx; } + int64_t getzMiny() const { return _zMiny; } + int64_t getzMaxy() const { return _zMaxy; } /** * Returns true if the given z-encoded xy coordinate is diff --git a/vespalib/src/vespa/vespalib/stllike/asciistream.h b/vespalib/src/vespa/vespalib/stllike/asciistream.h index 4c414cc314f..64d1cbb7fcc 100644 --- a/vespalib/src/vespa/vespalib/stllike/asciistream.h +++ b/vespalib/src/vespa/vespalib/stllike/asciistream.h @@ -1,9 +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 <vespa/vespalib/stllike/string.h> +#include <vector> namespace vespalib { @@ -40,7 +39,7 @@ public: asciistream & operator << (bool v) { if (v) { *this << '1'; } else { *this << '0'; } return *this; } asciistream & operator << (char v) { doFill(1); write(&v, 1); return *this; } asciistream & operator << (unsigned char v) { doFill(1); write(&v, 1); return *this; } - asciistream & operator << (const char * v) { if (v != NULL) { size_t n(strlen(v)); doFill(n); write(v, n); } return *this; } + asciistream & operator << (const char * v) { if (v != nullptr) { size_t n(strlen(v)); doFill(n); write(v, n); } return *this; } asciistream & operator << (const string & v) { doFill(v.size()); write(v.c_str(), v.size()); return *this; } asciistream & operator << (const stringref & v) { doFill(v.size()); write(v.c_str(), v.size()); return *this; } asciistream & operator << (const std::string & v) { doFill(v.size()); write(v.c_str(), v.size()); return *this; } diff --git a/vespalib/src/vespa/vespalib/util/guard.h b/vespalib/src/vespa/vespalib/util/guard.h index be78e785b3d..bda60b03d68 100644 --- a/vespalib/src/vespa/vespalib/util/guard.h +++ b/vespalib/src/vespa/vespalib/util/guard.h @@ -4,6 +4,8 @@ #pragma once #include <stdio.h> +#include <dirent.h> +#include <unistd.h> namespace vespalib { diff --git a/vespalib/src/vespa/vespalib/util/stringfmt.h b/vespalib/src/vespa/vespalib/util/stringfmt.h index a8db9c93877..d71c809596c 100644 --- a/vespalib/src/vespa/vespalib/util/stringfmt.h +++ b/vespalib/src/vespa/vespalib/util/stringfmt.h @@ -1,9 +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 <stdarg.h> +#include <cstdarg> #include <vespa/vespalib/stllike/string.h> +#ifndef PRId64 + #define PRId64 "ld" + #define PRIu64 "lu" +#endif + namespace vespalib { extern vespalib::string make_string_va(const char *fmt, va_list ap); diff --git a/vespamalloc/src/tests/allocfree/producerconsumer.h b/vespamalloc/src/tests/allocfree/producerconsumer.h index daa0173af98..c9b7be3258f 100644 --- a/vespamalloc/src/tests/allocfree/producerconsumer.h +++ b/vespamalloc/src/tests/allocfree/producerconsumer.h @@ -3,6 +3,7 @@ #include <vector> #include "queue.h" +#include <vespa/fastos/thread.h> namespace vespalib { |