diff --git a/ChangeLog b/ChangeLog index 5c204ee90..199556c5f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2013-12-31 Marcus Mueller + + * Headers/Foundation/NSMetadata.h: use GS_PROTOCOLS_HAVE_OPTIONAL for + NSMetadataQueryDelegate. Always define the protocol, even if it's empty + (so we don't have to adjust any headers), but fallback to the informal + protocol if OS version < 10.6 OR compiler doesn't support @optional + keyword in protocols. + 2013-12-30 Marcus Mueller * Headers/GNUstepBase/GSVersionMacros.h: added macros diff --git a/Headers/Foundation/NSMetadata.h b/Headers/Foundation/NSMetadata.h index ddb91a9f1..29c835fc0 100644 --- a/Headers/Foundation/NSMetadata.h +++ b/Headers/Foundation/NSMetadata.h @@ -26,6 +26,7 @@ #ifndef __NSMetadata_h_GNUSTEP_BASE_INCLUDE #define __NSMetadata_h_GNUSTEP_BASE_INCLUDE +#import #import #import @@ -129,9 +130,12 @@ GS_EXPORT NSString * const NSMetadataQueryGatheringProgressNotification; @end @protocol NSMetadataQueryDelegate -#ifdef __OBJC2__ +#if OS_API_VERSION(MAC_OS_X_VERSION_10_6,GS_API_LATEST) && GS_PROTOCOLS_HAVE_OPTIONAL @optional -#endif +#else +@end +@interface NSObject (NSMetadataQueryDelegate) +#endif // GS_PROTOCOLS_HAVE_OPTIONAL - (id) metadataQuery: (NSMetadataQuery *)query replacementObjectForResultObject: (NSMetadataItem *)result; - (id) metadataQuery: (NSMetadataQuery *)query