summaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-06-01 14:49:22 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-06-01 16:54:58 +0200
commit7e3047881eb9095c6a5bdd0394783f163ef2142f (patch)
tree7026683a78812a1af1d253ce4f434bcf5c3d16b8 /searchlib
parent349fee6bca3fbe9034a8e2b1cc65b287771e86e7 (diff)
Now everything builds without fastos.h
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/btree/iteratespeed.cpp6
-rw-r--r--searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp3
-rw-r--r--searchlib/src/tests/fileheadertk/fileheadertk_test.cpp6
-rw-r--r--searchlib/src/tests/postinglistbm/postinglistbm.cpp4
-rw-r--r--searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.cpp3
-rw-r--r--searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h4
-rw-r--r--searchlib/src/tests/url/testurl.cpp4
-rw-r--r--searchlib/src/tests/util/bufferwriter/work.h5
-rw-r--r--searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp21
-rw-r--r--searchlib/src/tests/util/rawbuf_test.cpp7
10 files changed, 38 insertions, 25 deletions
diff --git a/searchlib/src/tests/btree/iteratespeed.cpp b/searchlib/src/tests/btree/iteratespeed.cpp
index 18699fc7a8f..0a91b5a8a1b 100644
--- a/searchlib/src/tests/btree/iteratespeed.cpp
+++ b/searchlib/src/tests/btree/iteratespeed.cpp
@@ -6,8 +6,6 @@
#include <vespa/searchlib/btree/btree.h>
#include <vespa/searchlib/btree/btreestore.h>
#include <vespa/searchlib/util/rand48.h>
-#include <vespa/fastos/app.h>
-
#include <vespa/searchlib/btree/btreenodeallocator.hpp>
#include <vespa/searchlib/btree/btreenode.hpp>
#include <vespa/searchlib/btree/btreenodestore.hpp>
@@ -16,6 +14,10 @@
#include <vespa/searchlib/btree/btreebuilder.hpp>
#include <vespa/searchlib/btree/btree.hpp>
#include <vespa/searchlib/btree/btreestore.hpp>
+
+#include <vespa/fastos/app.h>
+#include <vespa/fastos/timestamp.h>
+
#include <vespa/log/log.h>
LOG_SETUP("iteratespeed");
diff --git a/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp b/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp
index 72510e593dd..a7e2d5738ce 100644
--- a/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp
+++ b/searchlib/src/tests/diskindex/pagedict4/pagedict4test.cpp
@@ -1,7 +1,6 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#include <vespa/searchlib/bitcompression/compression.h>
-#include <vector>
#include <vespa/searchlib/util/rand48.h>
#include <vespa/searchlib/index/schemautil.h>
#include <vespa/searchlib/bitcompression/countcompression.h>
@@ -12,6 +11,8 @@
#include <vespa/searchlib/diskindex/pagedict4file.h>
#include <vespa/searchlib/diskindex/pagedict4randread.h>
#include <vespa/searchlib/common/tunefileinfo.h>
+#include <vespa/fastos/app.h>
+
#include <vespa/log/log.h>
LOG_SETUP("pagedict4test");
diff --git a/searchlib/src/tests/fileheadertk/fileheadertk_test.cpp b/searchlib/src/tests/fileheadertk/fileheadertk_test.cpp
index 9384776fdba..e30413ede90 100644
--- a/searchlib/src/tests/fileheadertk/fileheadertk_test.cpp
+++ b/searchlib/src/tests/fileheadertk/fileheadertk_test.cpp
@@ -1,9 +1,11 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("fileheadertk_test");
#include <vespa/searchlib/util/fileheadertk.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/fastos/file.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("fileheadertk_test");
using namespace search;
diff --git a/searchlib/src/tests/postinglistbm/postinglistbm.cpp b/searchlib/src/tests/postinglistbm/postinglistbm.cpp
index b590b2fd0ba..02007e1ae64 100644
--- a/searchlib/src/tests/postinglistbm/postinglistbm.cpp
+++ b/searchlib/src/tests/postinglistbm/postinglistbm.cpp
@@ -11,6 +11,7 @@
#include <vespa/searchlib/test/fakedata/fakewordset.h>
#include <vespa/searchlib/test/fakedata/fpfactory.h>
#include <vespa/searchlib/index/docidandfeatures.h>
+#include <vespa/fastos/app.h>
using search::ResultSet;
using search::fef::TermFieldMatchData;
@@ -26,8 +27,7 @@ using namespace search::fakedata;
void FastS_block_usr2() {}
-namespace postinglistbm
-{
+namespace postinglistbm {
class PostingListBM : public FastOS_Application
{
diff --git a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.cpp b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.cpp
index e8cc1a22aec..190f8dda2fe 100644
--- a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.cpp
+++ b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.cpp
@@ -2,9 +2,10 @@
// Copyright (C) 2001-2003 Fast Search & Transfer ASA
// Copyright (C) 2003 Overture Services Norway AS
+#include "stackdumpiteratortest.h"
#include <vespa/searchlib/parsequery/simplequerystack.h>
#include <vespa/searchlib/parsequery/stackdumpiterator.h>
-#include "stackdumpiteratortest.h"
+#include <vespa/fastos/time.h>
#define NUMTESTS 5
diff --git a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h
index 121653a89d1..0d1ff63dd56 100644
--- a/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h
+++ b/searchlib/src/tests/stackdumpiterator/stackdumpiteratortest.h
@@ -5,6 +5,9 @@
#pragma once
#include <vespa/searchlib/parsequery/stackdumpiterator.h>
+#include <vespa/fastos/app.h>
+
+namespace search { class SimpleQueryStack; }
class StackDumpIteratorTest : public FastOS_Application
{
@@ -13,4 +16,3 @@ class StackDumpIteratorTest : public FastOS_Application
bool ShowResult(int testNo, search::SimpleQueryStackDumpIterator &actual, search::SimpleQueryStack &correct, unsigned int expected);
bool RunTest(int i, bool verify);
};
-
diff --git a/searchlib/src/tests/url/testurl.cpp b/searchlib/src/tests/url/testurl.cpp
index 2b0fad0ca94..5a168032986 100644
--- a/searchlib/src/tests/url/testurl.cpp
+++ b/searchlib/src/tests/url/testurl.cpp
@@ -3,7 +3,9 @@
// Copyright (C) 2003 Overture Services Norway AS
#include <vespa/searchlib/util/url.h>
-
+#include <cstdio>
+#include <cstring>
+#include <cassert>
// needed to resolve external symbol from httpd.h on AIX
void FastS_block_usr2() {}
diff --git a/searchlib/src/tests/util/bufferwriter/work.h b/searchlib/src/tests/util/bufferwriter/work.h
index 49a1cb8017d..ef58d2e523a 100644
--- a/searchlib/src/tests/util/bufferwriter/work.h
+++ b/searchlib/src/tests/util/bufferwriter/work.h
@@ -1,5 +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 <vector>
+
namespace search {
class BufferWriter;
@@ -16,4 +20,3 @@ template <class T>
void workFunctor2(const std::vector<T> &v, BufferWriter &writer);
} // namespace search
-
diff --git a/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp b/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp
index 9ae86841ab9..84d59010ceb 100644
--- a/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp
+++ b/searchlib/src/tests/util/ioerrorhandler/ioerrorhandler_test.cpp
@@ -1,41 +1,40 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-#include <vespa/log/log.h>
-LOG_SETUP("ioerrorhandler_test");
+
#include <vespa/vespalib/testkit/testapp.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/searchlib/util/statefile.h>
#include <vespa/searchlib/util/ioerrorhandler.h>
+#include <vespa/searchlib/test/statefile.h>
+#include <vespa/searchlib/test/statestring.h>
+#include <vespa/fastos/file.h>
#include <atomic>
#include <iostream>
#include <fstream>
#include <string>
#include <setjmp.h>
#include <dlfcn.h>
-#include <vespa/searchlib/test/statefile.h>
-#include <vespa/searchlib/test/statestring.h>
-extern "C"
-{
+#include <vespa/log/log.h>
+LOG_SETUP("ioerrorhandler_test");
+
+extern "C" {
ssize_t read(int fd, void *buf, size_t count);
ssize_t write(int fd, const void *buf, size_t count);
ssize_t pread(int fd, void *buf, size_t count, off_t offset);
ssize_t pwrite(int fd, const void *buf, size_t count, off_t offset);
-
}
using ReadFunc = ssize_t (*)(int fd, void *buf, size_t count);
using WriteFunc = ssize_t (*)(int fd, const void *buf, size_t count);
using PreadFunc = ssize_t (*)(int fd, void *buf, size_t count, off_t offset);
-using PwriteFunc = ssize_t (*)(int fd, const void *buf, size_t count,
- off_t offset);
+using PwriteFunc = ssize_t (*)(int fd, const void *buf, size_t count, off_t offset);
using namespace search::test::statefile;
using namespace search::test::statestring;
-namespace
-{
+namespace {
ReadFunc libc_read;
WriteFunc libc_write;
diff --git a/searchlib/src/tests/util/rawbuf_test.cpp b/searchlib/src/tests/util/rawbuf_test.cpp
index b80c580eeaa..6423e736998 100644
--- a/searchlib/src/tests/util/rawbuf_test.cpp
+++ b/searchlib/src/tests/util/rawbuf_test.cpp
@@ -1,12 +1,13 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
// Unit tests for rawbuf.
-#include <vespa/log/log.h>
-LOG_SETUP("rawbuf_test");
-
#include <vespa/searchlib/util/rawbuf.h>
#include <vespa/vespalib/stllike/string.h>
#include <vespa/vespalib/testkit/testapp.h>
+#include <vespa/fastos/file.h>
+
+#include <vespa/log/log.h>
+LOG_SETUP("rawbuf_test");
using vespalib::string;
using namespace search;