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,
const std::size_t default_value) noexcept {
85 std::string name{
"OSMIUM_MAX_"};
87 name +=
"_QUEUE_SIZE";
88 const auto env = osmium::detail::getenv_wrapper(name.c_str());
90 std::size_t value = default_value;
93 const auto new_value = osmium::detail::str_to_int<std::size_t>(env);
110 #endif // OSMIUM_UTIL_CONFIG_HPP