Upgrade libosmium to v2.15.6

This commit is contained in:
Desone Burns II
2020-11-17 14:59:06 -07:00
parent 98fd17589d
commit dfc1bfc27e
319 changed files with 6268 additions and 3946 deletions
+18
View File
@@ -0,0 +1,18 @@
#ifndef OSMIUM_TEST_CRC_HPP
#define OSMIUM_TEST_CRC_HPP
#ifdef OSMIUM_TEST_CRC_USE_BOOST
/* Use the CRC32 implementation from boost. */
#include <boost/crc.hpp>
using crc_type = boost::crc_32_type;
#else
/* Use the CRC32 implementation from zlib. */
#include <osmium/osm/crc_zlib.hpp>
using crc_type = osmium::CRC_zlib;
#endif
#endif // OSMIUM_TEST_CRC_HPP
+24
View File
@@ -2,6 +2,30 @@
#include <cstdlib>
#include <string>
#ifndef _WIN32
# include <unistd.h>
# include <fcntl.h>
// This function counts the number of open file descriptors. It is used in
// some tests to make sure that we are not leaking file descriptors.
inline int count_fds() noexcept {
int count = 0;
for (int fd = 0; fd < 100; ++fd) {
if (fcntl(fd, F_GETFD) == 0) {
++count;
}
}
return count;
}
#else
// Dummy for Windows which doesn't have fcntl
inline int count_fds() noexcept {
return 0;
}
#endif
inline std::string with_data_dir(const char* filename) {
const char* data_dir = getenv("OSMIUM_TEST_DATA_DIR");