Skip to content

Commit 386291f

Browse files
committed
Fix more includes
1 parent e5d6c07 commit 386291f

File tree

9 files changed

+28
-15
lines changed

9 files changed

+28
-15
lines changed

test/t/osm/test_timestamp.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
#include <osmium/osm/timestamp.hpp>
44

5+
#include <cstdint>
6+
#include <ctime>
57
#include <sstream>
68
#include <stdexcept>
79
#include <string>

test/t/relations/test_relations_manager.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22

33
#include "utils.hpp"
44

5+
#include <osmium/io/file.hpp>
56
#include <osmium/io/xml_input.hpp>
67
#include <osmium/osm/relation.hpp>
78
#include <osmium/relations/relations_manager.hpp>
9+
#include <osmium/visitor.hpp>
810

11+
#include <cstdlib>
912
#include <iterator>
1013

1114
struct EmptyRM : public osmium::relations::RelationsManager<EmptyRM, true, true, true> {

test/t/tags/test_tag_matcher.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
#include <osmium/builder/attr.hpp>
44
#include <osmium/memory/buffer.hpp>
5+
#include <osmium/osm/tag.hpp>
56
#include <osmium/tags/matcher.hpp>
7+
#include <osmium/util/string_matcher.hpp>
68

79
#include <iterator>
810
#include <string>

test/t/tags/test_tags_filter.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
#include <osmium/builder/attr.hpp>
44
#include <osmium/memory/buffer.hpp>
5+
#include <osmium/osm/tag.hpp>
56
#include <osmium/tags/tags_filter.hpp>
7+
#include <osmium/util/string_matcher.hpp>
68

79
#include <functional>
810
#include <iterator>

test/t/thread/test_util.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
#include <osmium/thread/util.hpp>
44

5+
#include <exception>
56
#include <future>
67
#include <stdexcept>
78
#include <type_traits>

test/t/util/test_memory.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
#include <osmium/util/memory.hpp>
44

5-
#include <vector>
6-
75
TEST_CASE("Check memory usage") {
86
#ifdef __linux__
97
const osmium::MemoryUsage m1;

test/t/util/test_memory_mapping.cpp

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55

66
#include <cstdint>
77
#include <cstdlib>
8-
#include <limits>
98
#include <utility>
109

1110
#if defined(_MSC_VER) || (defined(__GNUC__) && defined(_WIN32))
1211
#include "win_mkstemp.hpp"
1312
#endif
1413

14+
#ifndef _MSC_VER
15+
# include <unistd.h>
16+
#endif
17+
1518
TEST_CASE("Anonymous mapping: simple memory mapping should work") {
1619
osmium::MemoryMapping mapping{1000, osmium::MemoryMapping::mapping_mode::write_private};
1720
REQUIRE(mapping.get_addr() != nullptr);
@@ -142,8 +145,8 @@ TEST_CASE("File-based mapping: writing to a mapped file should work") {
142145
mapping.unmap();
143146
}
144147

145-
REQUIRE(0 == close(fd));
146-
REQUIRE(0 == unlink(filename));
148+
REQUIRE(0 == ::close(fd));
149+
REQUIRE(0 == ::unlink(filename));
147150
}
148151

149152
TEST_CASE("File-based mapping: Reading from a zero-sized mapped file should work") {
@@ -157,8 +160,8 @@ TEST_CASE("File-based mapping: Reading from a zero-sized mapped file should work
157160
mapping.unmap();
158161
}
159162

160-
REQUIRE(0 == close(fd));
161-
REQUIRE(0 == unlink(filename));
163+
REQUIRE(0 == ::close(fd));
164+
REQUIRE(0 == ::unlink(filename));
162165
}
163166

164167
TEST_CASE("File-based mapping: writing to a privately mapped file should work") {
@@ -193,8 +196,8 @@ TEST_CASE("File-based mapping: writing to a privately mapped file should work")
193196
mapping.unmap();
194197
}
195198

196-
REQUIRE(0 == close(fd));
197-
REQUIRE(0 == unlink(filename));
199+
REQUIRE(0 == ::close(fd));
200+
REQUIRE(0 == ::unlink(filename));
198201
}
199202

200203
TEST_CASE("File-based mapping: remapping to larger size should work") {
@@ -218,8 +221,8 @@ TEST_CASE("File-based mapping: remapping to larger size should work") {
218221

219222
mapping.unmap();
220223

221-
REQUIRE(0 == close(fd));
222-
REQUIRE(0 == unlink(filename));
224+
REQUIRE(0 == ::close(fd));
225+
REQUIRE(0 == ::unlink(filename));
223226
}
224227

225228
TEST_CASE("File-based mapping: remapping to smaller size should work") {
@@ -243,8 +246,8 @@ TEST_CASE("File-based mapping: remapping to smaller size should work") {
243246
REQUIRE(*addr2 == 42);
244247
}
245248

246-
REQUIRE(0 == close(fd));
247-
REQUIRE(0 == unlink(filename));
249+
REQUIRE(0 == ::close(fd));
250+
REQUIRE(0 == ::unlink(filename));
248251
}
249252

250253
TEST_CASE("Typed anonymous mapping: simple memory mapping should work") {
@@ -360,8 +363,8 @@ TEST_CASE("Typed file-based mapping: writing to a mapped file should work") {
360363
mapping.unmap();
361364
}
362365

363-
REQUIRE(0 == close(fd));
364-
REQUIRE(0 == unlink(filename));
366+
REQUIRE(0 == ::close(fd));
367+
REQUIRE(0 == ::unlink(filename));
365368
}
366369

367370
TEST_CASE("Anonymous memory mapping class: simple memory mapping should work") {

test/t/util/test_minmax.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
#include <osmium/osm/timestamp.hpp>
44
#include <osmium/util/minmax.hpp>
55

6+
#include <cstdint>
67
#include <limits>
78

89
TEST_CASE("min_op numeric") {

test/t/util/test_string_matcher.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include <sstream>
66
#include <string>
77
#include <type_traits>
8+
#include <utility>
89
#include <vector>
910

1011
#ifdef OSMIUM_WITH_REGEX

0 commit comments

Comments
 (0)