#ifndef _OSDP_EXPORT_H_
#define _OSDP_EXPORT_H_
#if defined(__has_cpp_attribute)
#define API_HAS_CPP_ATTR(x) __has_cpp_attribute(x)
#else
#define API_HAS_CPP_ATTR(x) 0
#endif
#if defined(__has_attribute)
#define API_HAS_ATTR(x) __has_attribute(x)
#else
#define API_HAS_ATTR(x) 0
#endif
#if defined(_WIN32) || defined(__CYGWIN__)
#if defined(BUILDING_API)
#if defined(__GNUC__)
#define API_EXPORT __attribute__ ((dllexport))
#else
#define API_EXPORT __declspec(dllexport)
#endif
#else
#if defined(__GNUC__)
#define API_EXPORT __attribute__ ((dllimport))
#else
#define API_EXPORT __declspec(dllimport)
#endif
#endif
#define API_NO_EXPORT
#else
#if defined(__GNUC__) && (__GNUC__ >= 4)
#define API_EXPORT __attribute__ ((visibility ("default")))
#define API_NO_EXPORT __attribute__ ((visibility ("hidden")))
#else
#define API_EXPORT
#define API_NO_EXPORT
#endif
#endif
#if defined(__cplusplus) && API_HAS_CPP_ATTR(deprecated)
#define API_DEPRECATED(msg) [[deprecated(msg)]]
#elif defined(_MSC_VER)
#define API_DEPRECATED(msg) __declspec(deprecated(msg))
#elif (defined(__clang__) && API_HAS_ATTR(deprecated)) \
|| (defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)))
#define API_DEPRECATED(msg) __attribute__((deprecated(msg)))
#elif (defined(__GNUC__) || defined(__clang__))
#define API_DEPRECATED(msg) __attribute__((deprecated))
#else
#define API_DEPRECATED(msg)
#endif
#define OSDP_EXPORT API_EXPORT
#define OSDP_NO_EXPORT API_NO_EXPORT
#define OSDP_DEPRECATED_EXPORT(msg) API_DEPRECATED(msg) API_EXPORT
#define OSDP_DEPRECATED_NO_EXPORT(msg) API_DEPRECATED(msg) API_NO_EXPORT
#endif