correct DEPRECATED helper macro (#22)

* remove __attribute__((deprecated(msg))) on Windows

* add deprecated macro (#2)

* add deprecated macro

* remove space
This commit is contained in:
James Xu 2019-03-18 19:31:27 -07:00 committed by Shane Loretz
parent 9c6c7c60f2
commit 30c95633d8
1 changed files with 3 additions and 2 deletions

View File

@ -45,15 +45,15 @@
// This logic was borrowed (then namespaced) from the examples on the gcc wiki:
// https://gcc.gnu.org/wiki/Visibility
#define KDL_PARSER_DEPRECATED(msg) __attribute__((deprecated(msg)))
#if defined _WIN32 || defined __CYGWIN__
#ifdef __GNUC__
#define KDL_PARSER_EXPORT __attribute__ ((dllexport))
#define KDL_PARSER_IMPORT __attribute__ ((dllimport))
#define KDL_PARSER_DEPRECATED(msg) __attribute__((deprecated(msg)))
#else
#define KDL_PARSER_EXPORT __declspec(dllexport)
#define KDL_PARSER_IMPORT __declspec(dllimport)
#define KDL_PARSER_DEPRECATED(msg) __declspec(deprecated(msg))
#endif
#ifdef KDL_PARSER_BUILDING_DLL
#define KDL_PARSER_PUBLIC KDL_PARSER_EXPORT
@ -73,6 +73,7 @@
#define KDL_PARSER_LOCAL
#endif
#define KDL_PARSER_PUBLIC_TYPE
#define KDL_PARSER_DEPRECATED(msg) __attribute__((deprecated(msg)))
#endif
#endif // KDL_PARSER__VISIBILITY_CONTROL_HPP_