From 30c95633d8e6a8ee26f77b93c97aff85aa21e532 Mon Sep 17 00:00:00 2001 From: James Xu Date: Mon, 18 Mar 2019 19:31:27 -0700 Subject: [PATCH] correct DEPRECATED helper macro (#22) * remove __attribute__((deprecated(msg))) on Windows * add deprecated macro (#2) * add deprecated macro * remove space --- kdl_parser/include/kdl_parser/visibility_control.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kdl_parser/include/kdl_parser/visibility_control.hpp b/kdl_parser/include/kdl_parser/visibility_control.hpp index 8ca3752..03e099a 100644 --- a/kdl_parser/include/kdl_parser/visibility_control.hpp +++ b/kdl_parser/include/kdl_parser/visibility_control.hpp @@ -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_