MSVC: handle symbol visibility

On MSVC, the exported symbols have to be marked both in the header and
in the implementation as dllexport, whereas on GCC the visibility=normal
attribute is only supposed to be used in the implementation. As a
result, we need two types of macros here, one for the public headers,
and the other for TUs with implementation. Also, the symbol name cannot
be generic ("API") because we only want to mark as dllexport those
symbols which are in a library that we're building *now*. Otherwise this
will break havoc in any libraries which also use the `ABI` macro *and*
also use libyang.
diff --git a/src/plugins_exts_print.h b/src/plugins_exts_print.h
index 6a95419..aed3b36 100644
--- a/src/plugins_exts_print.h
+++ b/src/plugins_exts_print.h
@@ -17,6 +17,8 @@
 
 #include <stdint.h>
 
+#include "config.h"
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -47,21 +49,21 @@
  * @return Output handler where the data are being printed. Note that the address of the handler pointer in the context is
  * returned to allow to modify the handler.
  */
-struct ly_out **lys_ypr_ctx_get_out(const struct lyspr_ctx *ctx);
+LIBYANG_API_DECL struct ly_out **lys_ypr_ctx_get_out(const struct lyspr_ctx *ctx);
 
 /**
  * @brief YANG printer context getter for printer options.
  * @param[in] ctx YANG printer context.
  * @return pointer to the printer options to allow modifying them with @ref schemaprinterflags values.
  */
-uint32_t *lys_ypr_ctx_get_options(const struct lyspr_ctx *ctx);
+LIBYANG_API_DECL uint32_t *lys_ypr_ctx_get_options(const struct lyspr_ctx *ctx);
 
 /**
  * @brief YANG printer context getter for printer indentation level.
  * @param[in] ctx YANG printer context.
  * @return pointer to the printer's indentation level to allow modifying its value.
  */
-uint16_t *lys_ypr_ctx_get_level(const struct lyspr_ctx *ctx);
+LIBYANG_API_DECL uint16_t *lys_ypr_ctx_get_level(const struct lyspr_ctx *ctx);
 
 /**
  * @brief Print substatements of an extension instance
@@ -73,7 +75,7 @@
  * @param[in, out] flag Flag to be shared with the caller regarding the opening brackets - 0 if the '{' not yet printed,
  * 1 otherwise.
  */
-void lysc_print_extension_instance(struct lyspr_ctx *ctx, const struct lysc_ext_instance *ext, ly_bool *flag);
+LIBYANG_API_DECL void lysc_print_extension_instance(struct lyspr_ctx *ctx, const struct lysc_ext_instance *ext, ly_bool *flag);
 
 /** @} pluginsExtensionsPrint */