added UNAVAILABLE_ATTRIBUTE macro (OSX compatibility)

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@38113 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
znek 2014-10-11 12:44:05 +00:00
parent b9ddbf8033
commit f01e62e5cd
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,7 @@
2014-10-11 Marcus Mueller <znek@mulle-kybernetik.com>
* Headers/GNUstepBase/GSVersionMacros.h: UNAVAILABLE_ATTRIBUTE added
2014-08-19 Wolfgang Lux <wolfgang.lux@gmail.com>
* configure.ac:

View file

@ -421,6 +421,13 @@ static inline void gs_consumed(id NS_CONSUMED GS_UNUSED_ARG o) { return; }
#define NS_REQUIRES_NIL_TERMINATION __attribute__((sentinel))
// FIXME ... what exact version of clang and gcc?
#if defined(__clang__) || GS_GCC_MINREQ(4,0)
# define UNAVAILABLE_ATTRIBUTE __attribute__((unavailable))
#else
# define UNAVAILABLE_ATTRIBUTE
#endif
/* Check if compiler supports @optional in protocols
*/
#if defined(__clang__) || GS_GCC_MINREQ(4,6)