diff --git a/Foundation/include/Poco/Foundation.h b/Foundation/include/Poco/Foundation.h index 092e6f376..760d1d88c 100644 --- a/Foundation/include/Poco/Foundation.h +++ b/Foundation/include/Poco/Foundation.h @@ -39,10 +39,10 @@ // -// The following block is the standard way of creating macros which make exporting +// The following block is the standard way of creating macros which make exporting // from a DLL simpler. All files within this DLL are compiled with the Foundation_EXPORTS // symbol defined on the command line. this symbol should not be defined on any project -// that uses this DLL. This way any other project whose source files include this file see +// that uses this DLL. This way any other project whose source files include this file see // Foundation_API functions as being imported from a DLL, whereas this DLL sees symbols // defined with this macro as being exported. // @@ -50,7 +50,7 @@ #if defined(Foundation_EXPORTS) #define Foundation_API __declspec(dllexport) #else - #define Foundation_API __declspec(dllimport) + #define Foundation_API __declspec(dllimport) #endif #endif @@ -143,6 +143,23 @@ #define POCO_DO_JOIN2(X, Y) X##Y +// +// POCO_DEPRECATED +// +// A macro expanding to a compiler-specific clause to +// mark a class or function as deprecated. +// +#ifdef _GNUC_ +#define POCO_DEPRECATED __attribute__((deprecated)) +#elif defined(__clang__) +#define POCO_DEPRECATED __attribute__((deprecated)) +#elif defined(_MSC_VER) +#define POCO_DEPRECATED __declspec(deprecated) +#else +#define POCO_DEPRECATED +#endif + + // // Pull in basic definitions //