diff --git a/SOPE/GDLContentStore/EOQualifier+GCS.m b/SOPE/GDLContentStore/EOQualifier+GCS.m index 15d54a9d6..255525ed7 100644 --- a/SOPE/GDLContentStore/EOQualifier+GCS.m +++ b/SOPE/GDLContentStore/EOQualifier+GCS.m @@ -27,6 +27,10 @@ #import "EOQualifier+GCS.h" +#if __GNU_LIBOBJC__ >= 20100911 +# define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__) +#endif + @implementation EOQualifier(GCS) - (void)_appendAndQualifier:(EOAndQualifier *)_q @@ -88,21 +92,21 @@ val = [_q value]; if (val && [val isNotNull]) { - if (sel_isEqual(op, EOQualifierOperatorEqual)) + if (sel_eq(op, EOQualifierOperatorEqual)) qOperator = @"="; - else if (sel_isEqual(op, EOQualifierOperatorNotEqual)) + else if (sel_eq(op, EOQualifierOperatorNotEqual)) qOperator = @"!="; - else if (sel_isEqual(op, EOQualifierOperatorLessThan)) + else if (sel_eq(op, EOQualifierOperatorLessThan)) qOperator = @"<"; - else if (sel_isEqual(op, EOQualifierOperatorGreaterThan)) + else if (sel_eq(op, EOQualifierOperatorGreaterThan)) qOperator = @">"; - else if (sel_isEqual(op, EOQualifierOperatorLessThanOrEqualTo)) + else if (sel_eq(op, EOQualifierOperatorLessThanOrEqualTo)) qOperator = @"<="; - else if (sel_isEqual(op, EOQualifierOperatorGreaterThanOrEqualTo)) + else if (sel_eq(op, EOQualifierOperatorGreaterThanOrEqualTo)) qOperator = @">="; - else if (sel_isEqual(op, EOQualifierOperatorLike)) + else if (sel_eq(op, EOQualifierOperatorLike)) qOperator = @"LIKE"; - else if (sel_isEqual(op, EOQualifierOperatorCaseInsensitiveLike)) { + else if (sel_eq(op, EOQualifierOperatorCaseInsensitiveLike)) { isCI = YES; qOperator = @"LIKE"; } @@ -124,11 +128,11 @@ } } else { - if (sel_isEqual(op, EOQualifierOperatorEqual)) { + if (sel_eq(op, EOQualifierOperatorEqual)) { qOperator = @"IS"; qValue = @"NULL"; } - else if (sel_isEqual(op, EOQualifierOperatorNotEqual)) { + else if (sel_eq(op, EOQualifierOperatorNotEqual)) { qOperator = @"IS NOT"; qValue = @"NULL"; } diff --git a/SOPE/GDLContentStore/GCSFolder.m b/SOPE/GDLContentStore/GCSFolder.m index 8002b67cb..af49f91ce 100644 --- a/SOPE/GDLContentStore/GCSFolder.m +++ b/SOPE/GDLContentStore/GCSFolder.m @@ -44,6 +44,10 @@ #import "EOQualifier+GCS.h" #import "GCSStringFormatter.h" +#if __GNU_LIBOBJC__ >= 20100911 +# define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__) +#endif + typedef enum { noTableRequired = 0, quickTableRequired = 1, @@ -391,20 +395,20 @@ static GCSStringFormatter *stringFormatter = nil; if (i > 0) [sql appendString:@", "]; - if (sel_isEqual(sel, EOCompareAscending)) { + if (sel_eq(sel, EOCompareAscending)) { [sql appendString:column]; [sql appendString:@" ASC"]; } - else if (sel_isEqual(sel, EOCompareDescending)) { + else if (sel_eq(sel, EOCompareDescending)) { [sql appendString:column]; [sql appendString:@" DESC"]; } - else if (sel_isEqual(sel, EOCompareCaseInsensitiveAscending)) { + else if (sel_eq(sel, EOCompareCaseInsensitiveAscending)) { [sql appendString:@"UPPER("]; [sql appendString:column]; [sql appendString:@") ASC"]; } - else if (sel_isEqual(sel, EOCompareCaseInsensitiveDescending)) { + else if (sel_eq(sel, EOCompareCaseInsensitiveDescending)) { [sql appendString:@"UPPER("]; [sql appendString:column]; [sql appendString:@") DESC"];