1 #ifndef OSMIUM_UTIL_CONFIG_HPP 2 #define OSMIUM_UTIL_CONFIG_HPP 45 # define strcasecmp _stricmp 52 #ifndef OSMIUM_TEST_RUNNER 53 inline const char* getenv_wrapper(
const char* var) noexcept {
63 auto env = osmium::detail::getenv_wrapper(
"OSMIUM_POOL_THREADS");
65 return osmium::detail::str_to_int<int>(env);
71 auto env = osmium::detail::getenv_wrapper(
"OSMIUM_USE_POOL_THREADS_FOR_PBF_PARSING");
73 if (!strcasecmp(env,
"off") ||
74 !strcasecmp(env,
"false") ||
75 !strcasecmp(env,
"no") ||
76 !strcasecmp(env,
"0")) {
83 inline std::size_t
get_max_queue_size(
const char* queue_name, std::size_t default_value) noexcept {
85 std::string name{
"OSMIUM_MAX_"};
87 name +=
"_QUEUE_SIZE";
88 auto env = osmium::detail::getenv_wrapper(name.c_str());
90 const auto value = osmium::detail::str_to_int<std::size_t>(env);
91 return value == 0 ? default_value : value;
100 #endif // OSMIUM_UTIL_CONFIG_HPP
std::size_t get_max_queue_size(const char *queue_name, std::size_t default_value) noexcept
Definition: config.hpp:83
bool use_pool_threads_for_pbf_parsing() noexcept
Definition: config.hpp:70
int get_pool_threads() noexcept
Definition: config.hpp:62
Namespace for everything in the Osmium library.
Definition: assembler.hpp:53