From: <ama...@us...> - 2012-07-07 21:20:15
|
Revision: 18706 http://bibdesk.svn.sourceforge.net/bibdesk/?rev=18706&view=rev Author: amaxwell Date: 2012-07-07 21:20:08 +0000 (Sat, 07 Jul 2012) Log Message: ----------- add clang compatibility definitions Modified Paths: -------------- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView_Prefix.pch Modified: trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView_Prefix.pch =================================================================== --- trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView_Prefix.pch 2012-07-07 17:58:34 UTC (rev 18705) +++ trunk/bibdesk_vendorsrc/amaxwell/FileView/FileView_Prefix.pch 2012-07-07 21:20:08 UTC (rev 18706) @@ -2,10 +2,39 @@ // Prefix header for all source files of the 'FileView' target in the 'FileView' project. // +/* http://clang-analyzer.llvm.org/annotations.html */ +#ifndef __has_feature // Optional. +#define __has_feature(x) 0 // Compatibility with non-clang compilers. +#endif + +#ifndef CF_RETURNS_NOT_RETAINED +#if __has_feature(attribute_cf_returns_not_retained) +#define CF_RETURNS_NOT_RETAINED __attribute__((cf_returns_not_retained)) +#else +#define CF_RETURNS_NOT_RETAINED +#endif +#endif + +#ifndef CLANG_ANALYZER_NORETURN +#if __has_feature(attribute_analyzer_noreturn) +#define CLANG_ANALYZER_NORETURN __attribute__((analyzer_noreturn)) +#else +#define CLANG_ANALYZER_NORETURN +#endif +#endif + #ifdef __OBJC__ #import <Cocoa/Cocoa.h> #import <tgmath.h> +#ifndef NS_RETURNS_NOT_RETAINED +#if __has_feature(attribute_ns_returns_not_retained) +#define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) +#else +#define NS_RETURNS_NOT_RETAINED +#endif +#endif + // docs say not to send [super initialize], but that's a bug #if !defined(FVINITIALIZE) #define FVINITIALIZE(aClass) \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |