added POCO_DEPRECATED macro

This commit is contained in:
Günter Obiltschnig 2017-09-08 11:46:59 +02:00
parent 6ec6932f34
commit 5ff8bdafdd

View File

@ -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
//