diff --git a/include/upa/idna/bitmask_operators.hpp b/include/upa/idna/bitmask_operators.hpp index 0151e23..17ed3e8 100644 --- a/include/upa/idna/bitmask_operators.hpp +++ b/include/upa/idna/bitmask_operators.hpp @@ -33,7 +33,13 @@ // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#include +#include "config.h" + +#ifndef UPA_MODULE +# include +#endif // UPA_MODULE + +UPA_EXPORT_BEGIN namespace upa::idna { @@ -104,4 +110,6 @@ operator^=(E& lhs, E rhs) noexcept { return lhs; } +UPA_EXPORT_END + #endif // UPA_IDNA_BITMASK_OPERATORS_HPP diff --git a/include/upa/idna/config.h b/include/upa/idna/config.h index eaf3106..bdf7b7c 100644 --- a/include/upa/idna/config.h +++ b/include/upa/idna/config.h @@ -31,4 +31,12 @@ # define UPA_IDNA_API #endif +// The following macros have values when the library is compiled as a module + +#ifndef UPA_EXPORT +# define UPA_EXPORT +# define UPA_EXPORT_BEGIN +# define UPA_EXPORT_END +#endif + #endif // UPA_IDNA_CONFIG_H diff --git a/include/upa/idna/idna.h b/include/upa/idna/idna.h index 9cb240c..89804f1 100644 --- a/include/upa/idna/idna.h +++ b/include/upa/idna/idna.h @@ -1,4 +1,4 @@ -// Copyright 2017-2025 Rimas Misevičius +// Copyright 2017-2026 Rimas Misevičius // Distributed under the BSD-style license that can be // found in the LICENSE file. // @@ -8,10 +8,15 @@ #include "bitmask_operators.hpp" #include "config.h" // IWYU pragma: export #include "idna_version.h" // IWYU pragma: export -#include + +#ifndef UPA_MODULE +# include +#endif // UPA_MODULE namespace upa::idna { +UPA_EXPORT_BEGIN + enum class Option { Default = 0, UseSTD3ASCIIRules = 0x0001, @@ -27,6 +32,7 @@ enum class Option { template<> struct enable_bitmask_operators