View Issue Details

IDProjectCategoryView StatusLast Update
0002234SOGoSOPEpublic2013-10-19 07:39
Reporterbuzzdee Assigned Toludovic  
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version2.0.4b 
Target Versionmaybe sometimesFixed in Version2.1.0 
Summary0002234: SOPE fails to compile with clang 3.2
Description

with clang 3.2, when linking, it leads to unresolved symbols regarding sel_eq, sel_get_name and friends.

Attached patch gets rid of:
sel_get_name, sel_get_any_uid, sel_register_name, sel_get_uid, sel_eq,
SEL_EQ, __objc_responds_to

exchanging them with their "modern" counterparts.
tested compiling with gcc 4.2.1 as example for an "old" compiler and with clang 3.2 as a "modern" one. Both against libobjc2.

Additional Information

Maybe someone could try the patches against libobjc from gcc.

TagsNo tags attached.

Activities

2013-02-06 10:23

 

sope-fix-selectors.diff (45,406 bytes)   
$OpenBSD$
--- sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m.orig	Wed Feb  6 09:21:40 2013
+++ sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m	Wed Feb  6 09:22:42 2013
@@ -30,7 +30,6 @@
 #define object_is_instance(XXX) (XXX != nil)
 #define class_get_class_method    class_getClassMethod
 #define class_get_instance_method class_getInstanceMethod
-#define sel_get_uid               sel_getUid
 #define method_get_imp			  method_getImplementation	
 typedef struct objc_method      *Method_t;
 
@@ -48,7 +47,6 @@ typedef struct objc_method      *Method_t;
 
 #define method_get_imp            method_getImplementation  
 #  define METHOD_NULL NULL
-#  define sel_get_uid               sel_getUid
 #  define class_get_class_method    class_getClassMethod
 #  define class_get_instance_method class_getInstanceMethod
 
@@ -424,14 +422,14 @@ static inline void _fillInfo(WOKeyPathAssociation *sel
 		[[StringClass alloc] initWithCString:(char *)info->ckey];
             }
             else {
-              info->extra.sel.get = sel_get_uid((char *)info->ckey);
+              info->extra.sel.get = sel_getUid((char *)info->ckey);
               method = class_get_instance_method(clazz, info->extra.sel.get);
               if (method != METHOD_NULL)
                 info->type = WOKeyType_method;
             }
           }
           else {
-            info->extra.sel.get = sel_get_uid((char *)info->ckey);
+            info->extra.sel.get = sel_getUid((char *)info->ckey);
             method = class_get_instance_method(clazz, info->extra.sel.get);
             
             if (method != METHOD_NULL)
@@ -455,7 +453,7 @@ static inline void _fillInfo(WOKeyPathAssociation *sel
 	      [[StringClass alloc] initWithCString:(char *)info->ckey];
           }
           else {
-            info->extra.sel.get = sel_get_uid((char *)info->ckey);
+            info->extra.sel.get = sel_getUid((char *)info->ckey);
             method =
               class_get_class_method(*(Class *)object, info->extra.sel.get);
             if (method != METHOD_NULL) {
@@ -788,7 +786,7 @@ static inline SEL _getSetSel(register const unsigned c
                              register unsigned _len) {
   unsigned char buf[259];
   _getSetSelName(buf, _key, _len);
-  return sel_get_uid((char *)buf);
+  return sel_getUid((char *)buf);
 }
 
 static BOOL _setValue(WOKeyPathAssociation *self, id _value, id root) {
$OpenBSD$
--- sope-appserver/NGObjWeb/common.h.orig	Wed Feb  6 09:06:40 2013
+++ sope-appserver/NGObjWeb/common.h	Wed Feb  6 09:12:21 2013
@@ -51,13 +51,6 @@
 #include <NGExtensions/NGLogging.h>
 #include <NGStreams/NGStreams.h>
 
-#if NeXT_RUNTIME || APPLE_RUNTIME || (__GNU_LIBOBJC__ >= 20100911)
-#  ifndef sel_get_name
-#    define sel_get_name(__XXX__)    sel_getName(__XXX__)
-#    define sel_get_any_uid(__XXX__) sel_getUid(__XXX__)
-#  endif
-#endif
-
 #define IS_DEPRECATED \
   [self warnWithFormat:@"used deprecated method: %s:%i.", \
           __PRETTY_FUNCTION__, __LINE__];
$OpenBSD$
--- sope-appserver/NGObjWeb/DynamicElements/WOComponentContent.m.orig	Wed Feb  6 09:04:15 2013
+++ sope-appserver/NGObjWeb/DynamicElements/WOComponentContent.m	Wed Feb  6 09:04:40 2013
@@ -75,11 +75,7 @@ static Class NSDateClass = Nil;
         printf("  ");
       printf("content: [%s %s]: %0.3fs\n",
              [[component name] cString], 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 	     sel_getName(_cmd), 
-#else
-	     sel_get_name(_cmd), 
-#endif
 	     diff);
     }
     
@@ -115,11 +111,7 @@ static Class NSDateClass = Nil;
         printf("  ");
       printf("content: [%s %s]: %0.3fs\n",
              [[component name] cString], 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 	     sel_getName(_cmd), 
-#else
-	     sel_get_name(_cmd), 
-#endif
 	     diff);
     }
     
@@ -165,11 +157,7 @@ static Class NSDateClass = Nil;
         printf("  ");
       printf("content: [%s %s]: %0.3fs\n",
              [[component name] cString], 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 	     sel_getName(_cmd), 
-#else
-	     sel_get_name(_cmd), 
-#endif
 	     diff);
     }
     
$OpenBSD$
--- sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m.orig	Wed Feb  6 09:03:43 2013
+++ sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m	Wed Feb  6 09:04:08 2013
@@ -172,11 +172,7 @@ _updateComponent(WOComponentReference *self, WOContext
         printf("  ");
       printf("[%s %s]: %0.3fs\n",
              [[child name] cString], 
-#if APPLE_RUNTIME || NeXT_RUNTIME || (__GNU_LIBOBJC__ >= 20100911)
 	     sel_getName(_cmd), 
-#else
-	     sel_get_name(_cmd), 
-#endif
 	     diff);
     }
   }
$OpenBSD$
--- sope-appserver/NGObjWeb/NSObject+WO.m.orig	Mon Feb  4 21:13:18 2013
+++ sope-appserver/NGObjWeb/NSObject+WO.m	Wed Feb  6 11:22:39 2013
@@ -42,10 +42,6 @@
 
 #endif /* NeXT_Foundation_LIBRARY */
 
-#if GNUSTEP_BASE_LIBRARY
-extern BOOL __objc_responds_to(id, SEL);
-#endif
-
 @implementation NSObject(NGObjWebKVC)
 
 - (BOOL)kvcIsPreferredInKeyPath {
@@ -131,11 +127,7 @@ static inline SEL _getSetSel(register const unsigned c
                              register unsigned _len) {
   char buf[259];
   _getSetSelName((unsigned char *)buf, _key, _len);
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
   return sel_getUid(buf);
-#else
-  return sel_get_uid(buf);
-#endif
 }
 
 typedef union {
@@ -267,15 +259,11 @@ IMP WOGetKVCGetMethod(id object, NSString *_key) {
     keyLen = [_key cStringLength];
     buf = malloc(keyLen + 1);
     [_key getCString:buf]; buf[keyLen] = '\0';
-    getSel = sel_get_uid(buf);
+    getSel = sel_getUid(buf);
     free(buf);
 
     if (getSel == NULL) // no such selector
       return NULL;
-#if GNUSTEP_BASE_LIBRARY
-    if (!__objc_responds_to(object, getSel))
-      return NULL;
-#endif
 
     return [object methodForSelector:getSel];
   }
@@ -308,19 +296,11 @@ id WOGetKVCValueUsingMethod(id object, NSString *_key)
     char *buf;
     buf = malloc(keyLen + 1);
     [_key getCString:buf];
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
     getSel = sel_getUid(buf);
-#else
-    getSel = sel_get_uid(buf);
-#endif
     if (getSel == NULL) // no such selector
       return nil;
     free(buf); buf = NULL;
   }
-#if GNUSTEP_BASE_LIBRARY
-  if (!__objc_responds_to(object, getSel))
-    return nil;
-#endif
   
   gm.method = [object methodForSelector:getSel];
   if (gm.method == NULL) // no such method
$OpenBSD$
--- sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m.orig	Mon Feb  4 21:13:18 2013
+++ sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m	Wed Feb  6 09:17:19 2013
@@ -28,11 +28,6 @@
 #include <DOM/EDOM.h>
 #include "common.h"
 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
-#  define sel_get_any_uid   sel_getUid
-#  define sel_register_name sel_registerName
-#endif
-
 @implementation SoSelectorInvocation
 
 static BOOL debugOn = NO;
@@ -109,8 +104,8 @@ static BOOL debugOn = NO;
     /* this can happen if the product bundle is not yet loaded ... */
 #if GNU_RUNTIME
     const char *sname = [_name cString];
-    if ((self->sel = sel_get_any_uid(sname)) == NULL)
-      self->sel = sel_register_name(sname);
+    if ((self->sel = sel_getUid(sname)) == NULL)
+      self->sel = sel_registerName(sname);
 #else
     /* TODO: not tested against this ObjC runtime */
     [self warnWithFormat:@"(%s): not tested against this ObjC runtime, "
$OpenBSD$
--- sope-appserver/NGObjWeb/WOChildComponentReference.m.orig	Wed Feb  6 09:05:04 2013
+++ sope-appserver/NGObjWeb/WOChildComponentReference.m	Wed Feb  6 09:05:32 2013
@@ -110,7 +110,7 @@ static Class NSDateClass = Nil;
     for (i = [_ctx componentStackCount]; i >= 0; i--)
       printf("  ");
     printf("[%s %s]: %0.3fs\n",
-           [[child name] cString], sel_get_name(_cmd), diff);
+           [[child name] cString], sel_getName(_cmd), diff);
   }
 }
 
@@ -147,7 +147,7 @@ static Class NSDateClass = Nil;
     for (i = [_ctx componentStackCount]; i >= 0; i--)
       printf("  ");
     printf("[%s %s]: %0.3fs\n",
-           [[child name] cString], sel_get_name(_cmd), diff);
+           [[child name] cString], sel_getName(_cmd), diff);
   }
 
   return result;
@@ -188,7 +188,7 @@ static Class NSDateClass = Nil;
     for (i = [_ctx componentStackCount]; i >= 0; i--)
       printf("  ");
     printf("[%s %s]: %0.3fs\n",
-           [[child name] cString], sel_get_name(_cmd), diff);
+           [[child name] cString], sel_getName(_cmd), diff);
   }
 }
 
$OpenBSD$
--- sope-appserver/NGObjWeb/WORunLoop.m.orig	Wed Feb  6 10:18:37 2013
+++ sope-appserver/NGObjWeb/WORunLoop.m	Wed Feb  6 10:18:52 2013
@@ -255,7 +255,7 @@ static char *activityDesc[8] = {
 {
     return [target isEqual:anotherHolder->target]
 	    && [argument isEqual:anotherHolder->argument]
-	    && SEL_EQ(action, anotherHolder->action);
+	    && sel_isEqual(action, anotherHolder->action);
 }
 
 - (void)execute
$OpenBSD$
--- sope-appserver/NGObjWeb/WOSession.m.orig	Wed Feb  6 09:05:44 2013
+++ sope-appserver/NGObjWeb/WOSession.m	Wed Feb  6 09:06:29 2013
@@ -33,10 +33,6 @@
 #include "common.h"
 #include <string.h>
 
-#if !defined(sel_get_name) && ((defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__))
-#  define sel_get_name sel_getName
-#endif
-
 #if APPLE_FOUNDATION_LIBRARY || NeXT_Foundation_LIBRARY
 @interface NSObject(Miss)
 - (id)notImplemented:(SEL)cmd;
@@ -417,7 +413,7 @@ static Class NSDateClass = Nil;
         
         diff = [[NSDateClass date] timeIntervalSince1970] - st;
         printf("prof[%s %s]: %0.3fs\n",
-               [[(WOComponent *)page name] cString], sel_get_name(_cmd), diff);
+               [[(WOComponent *)page name] cString], sel_getName(_cmd), diff);
       }
       
       WOContext_leaveComponent(_ctx, page);
@@ -459,7 +455,7 @@ static Class NSDateClass = Nil;
         
         diff = [[NSDateClass date] timeIntervalSince1970] - st;
         printf("prof[%s %s]: %0.3fs\n",
-               [[(WOComponent *)page name] cString], sel_get_name(_cmd), diff);
+               [[(WOComponent *)page name] cString], sel_getName(_cmd), diff);
       }
       
       WOContext_leaveComponent(_ctx, page);
@@ -506,8 +502,8 @@ static Class NSDateClass = Nil;
           
           diff = [[NSDateClass date] timeIntervalSince1970] - st;
           printf("prof[%s %s]: %0.3fs\n",
-                 [[page name] cString], sel_get_name(_cmd), diff);
-                 //[page name], sel_get_name(_cmd), diff);
+                 [[page name] cString], sel_getName(_cmd), diff);
+                 //[page name], sel_getName(_cmd), diff);
         }
       
         WOContext_leaveComponent(_ctx, page);
@@ -554,7 +550,7 @@ static Class NSDateClass = Nil;
         
         diff = [[NSDateClass date] timeIntervalSince1970] - st;
         printf("prof[%s %s]: %0.3fs\n",
-               [[page name] cString], sel_get_name(_cmd), diff);
+               [[page name] cString], sel_getName(_cmd), diff);
       }
       
       WOContext_leaveComponent(_ctx, page);
$OpenBSD$
--- sope-core/EOControl/common.h.orig	Wed Feb  6 10:10:14 2013
+++ sope-core/EOControl/common.h	Wed Feb  6 10:10:54 2013
@@ -34,15 +34,6 @@
 #  define objc_malloc(__size__) malloc(__size__)
 #  define objc_calloc(__cnt__, __size__) calloc(__cnt__, __size__)
 #  define objc_realloc(__ptr__, __size__) realloc(__ptr__, __size__)
-#  ifndef sel_eq
-#    define sel_eq(sela,selb) (sela==selb?YES:NO)
-#  endif
-#endif
-
-#if __GNU_LIBOBJC__ >= 20100911
-#  ifndef sel_eq
-#    define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
-#  endif
 #endif
 
 #ifndef ASSIGN
$OpenBSD$
--- sope-core/EOControl/EOKeyComparisonQualifier.m.orig	Wed Feb  6 09:48:50 2013
+++ sope-core/EOControl/EOKeyComparisonQualifier.m	Wed Feb  6 09:49:03 2013
@@ -200,7 +200,7 @@ static EONull *null = nil;
     return NO;
   if (![self->rightKey isEqual:[(EOKeyComparisonQualifier *)_qual rightKey]])
     return NO;
-  if (sel_eq(self->operator, [(EOKeyComparisonQualifier *)_qual selector]))
+  if (sel_isEqual(self->operator, [(EOKeyComparisonQualifier *)_qual selector]))
     return YES;
   return NO;
 }
$OpenBSD$
--- sope-core/EOControl/EOKeyValueCoding.m.orig	Wed Feb  6 09:13:20 2013
+++ sope-core/EOControl/EOKeyValueCoding.m	Wed Feb  6 09:14:57 2013
@@ -24,17 +24,9 @@
 #include "common.h"
 
 #if GNU_RUNTIME
-
-#if __GNU_LIBOBJC__ >= 20100911
-#  define sel_get_any_uid sel_getUid
 #  include <objc/runtime.h>
-#else
-#  include <objc/encoding.h>
-#  include <objc/objc-api.h>
 #endif
 
-#endif
-
 static EONull *null = nil;
 
 #if LIB_FOUNDATION_LIBRARY
@@ -152,7 +144,7 @@ static GetKeyValueBinding* newGetBinding(NSString* key
     cbuf = malloc(clen + 1);
     [key getCString:cbuf]; cbuf[clen] = '\0';
     ckey = cbuf;
-    sel = sel_get_any_uid(ckey);
+    sel = sel_getUid(ckey);
     
     if (sel && (mth = class_get_instance_method(class, sel)) &&
         method_get_number_of_arguments(mth) == 2) {
@@ -326,7 +318,7 @@ static SetKeyValueBinding* newSetBinding(NSString* key
     Strcat(sname, ckey);
     Strcat(sname, ":");
     sname[3] = islower((int)sname[3]) ? toupper((int)sname[3]) : sname[3];
-    sel = sel_get_any_uid(sname);
+    sel = sel_getUid(sname);
         
     if (sel && (mth = class_get_instance_method(class, sel)) &&
         method_get_number_of_arguments(mth) == 3 &&
@@ -966,7 +958,7 @@ static inline BOOL setValue(NSString* key, id instance
     strcpy(bufPtr, "ForKey:");
     if (kbuf) free(kbuf);
     
-    sel = sel_get_any_uid(buf);
+    sel = sel_getUid(buf);
     if (buf) free(buf);
     
     return sel != NULL ? [self performSelector:sel withObject:_key] : nil;
@@ -1531,11 +1523,7 @@ static void doubleIvarSetFunc(void* info1, void* info2
     strcpy(bufPtr, "ForKey:");
     if (kbuf) free(kbuf);
 
-#if NeXT_RUNTIME
     sel = sel_getUid(buf);
-#else    
-    sel = sel_get_any_uid(buf);
-#endif
     if (buf) free(buf);
     
     return sel != NULL ? [self performSelector:sel withObject:_key] : nil;
$OpenBSD$
--- sope-core/EOControl/EOKeyValueQualifier.m.orig	Wed Feb  6 09:53:18 2013
+++ sope-core/EOControl/EOKeyValueQualifier.m	Wed Feb  6 09:53:32 2013
@@ -227,7 +227,7 @@ static EONull *null = nil;
     return NO;
   if (![self->value isEqual:[(EOKeyValueQualifier *)_qual value]])
     return NO;
-  if (sel_eq(self->operator, [(EOKeyValueQualifier *)_qual selector]))
+  if (sel_isEqual(self->operator, [(EOKeyValueQualifier *)_qual selector]))
     return YES;
   return NO;
 }
$OpenBSD$
--- sope-core/EOControl/EOSortOrdering.m.orig	Wed Feb  6 10:12:03 2013
+++ sope-core/EOControl/EOSortOrdering.m	Wed Feb  6 10:19:20 2013
@@ -28,14 +28,6 @@
 #  include <objc/objc.h>
 #endif
 
-#ifndef SEL_EQ
-#  if GNU_RUNTIME
-#    define SEL_EQ(sel1,sel2) sel_eq(sel1,sel2)
-#  else
-#    define SEL_EQ(sel1,sel2) (sel1 == sel2)
-#  endif
-#endif
-
 @implementation EOSortOrdering
 /*"
   This class specifies a sort-ordering as used with
@@ -83,7 +75,7 @@
 /* equality */
 
 - (BOOL)isEqualToSortOrdering:(EOSortOrdering *)_sortOrdering {
-  if (!SEL_EQ([_sortOrdering selector], [self selector]))
+  if (!sel_isEqual([_sortOrdering selector], [self selector]))
     return NO;
   if (![[_sortOrdering key] isEqualToString:[self key]])
     return NO;
$OpenBSD$
--- sope-core/EOControl/EOValidation.m.orig	Wed Feb  6 09:12:30 2013
+++ sope-core/EOControl/EOValidation.m	Wed Feb  6 09:13:13 2013
@@ -24,10 +24,6 @@
 #include "EONull.h"
 #include "common.h"
 
-#if __GNU_LIBOBJC__ >= 20100911
-#  define sel_get_any_uid sel_getUid
-#endif
-
 #if !LIB_FOUNDATION_LIBRARY
 
 @interface NSException(UsedSetUI) /* does Jaguar allow -setUserInfo: ? */
@@ -150,11 +146,7 @@
     strcat(buf, ":");
     buf[8] = toupper(buf[8]);
     
-#if NeXT_RUNTIME
     sel = sel_getUid(buf);
-#else
-    sel = sel_get_any_uid(buf);
-#endif
     if (sel) {
       if ([self respondsToSelector:sel]) {
         if (buf) free(buf);
$OpenBSD$
--- sope-core/EOCoreData/common.h.orig	Wed Feb  6 10:11:05 2013
+++ sope-core/EOCoreData/common.h	Wed Feb  6 10:11:31 2013
@@ -56,12 +56,4 @@
 #  include <objc/objc.h>
 #endif
 
-#ifndef SEL_EQ
-#  if GNU_RUNTIME
-#    define SEL_EQ(sel1,sel2) sel_eq(sel1,sel2)
-#  else
-#    define SEL_EQ(sel1,sel2) (sel1 == sel2)
-#  endif
-#endif
-
 #endif /* __EOCoreData_COMMON_H__ */
$OpenBSD$
--- sope-core/EOCoreData/EOKeyComparisonQualifier+CoreData.m.orig	Wed Feb  6 10:21:29 2013
+++ sope-core/EOCoreData/EOKeyComparisonQualifier+CoreData.m	Wed Feb  6 10:38:50 2013
@@ -66,7 +66,7 @@
 }
 
 - (unsigned)options {
-  return (SEL_EQ([self selector], EOQualifierOperatorCaseInsensitiveLike))
+  return (sel_isEqual([self selector], EOQualifierOperatorCaseInsensitiveLike))
     ? NSCaseInsensitivePredicateOption : 0;
 }
 
$OpenBSD$
--- sope-core/EOCoreData/EOKeyValueQualifier+CoreData.m.orig	Wed Feb  6 10:39:27 2013
+++ sope-core/EOCoreData/EOKeyValueQualifier+CoreData.m	Wed Feb  6 10:39:38 2013
@@ -71,7 +71,7 @@
 }
 
 - (unsigned)options {
-  return (SEL_EQ([self selector], EOQualifierOperatorCaseInsensitiveLike))
+  return (sel_isEqual([self selector], EOQualifierOperatorCaseInsensitiveLike))
     ? NSCaseInsensitivePredicateOption : 0;
 }
 
$OpenBSD$
--- sope-core/EOCoreData/EOQualifier+CoreData.m.orig	Wed Feb  6 10:38:59 2013
+++ sope-core/EOCoreData/EOQualifier+CoreData.m	Wed Feb  6 10:39:19 2013
@@ -52,26 +52,26 @@
 @implementation EOQualifier(CoreData)
 
 + (NSPredicateOperatorType)predicateOperatorTypeForEOSelector:(SEL)_sel {
-  if (SEL_EQ(_sel, EOQualifierOperatorEqual))
+  if (sel_isEqual(_sel, EOQualifierOperatorEqual))
     return NSEqualToPredicateOperatorType;
-  if (SEL_EQ(_sel, EOQualifierOperatorNotEqual))
+  if (sel_isEqual(_sel, EOQualifierOperatorNotEqual))
     return NSNotEqualToPredicateOperatorType;
   
-  if (SEL_EQ(_sel, EOQualifierOperatorLessThan))
+  if (sel_isEqual(_sel, EOQualifierOperatorLessThan))
     return NSLessThanPredicateOperatorType;
-  if (SEL_EQ(_sel, EOQualifierOperatorGreaterThan))
+  if (sel_isEqual(_sel, EOQualifierOperatorGreaterThan))
     return NSGreaterThanPredicateOperatorType;
   
-  if (SEL_EQ(_sel, EOQualifierOperatorLessThanOrEqualTo))
+  if (sel_isEqual(_sel, EOQualifierOperatorLessThanOrEqualTo))
     return NSLessThanOrEqualToPredicateOperatorType;
-  if (SEL_EQ(_sel, EOQualifierOperatorGreaterThanOrEqualTo))
+  if (sel_isEqual(_sel, EOQualifierOperatorGreaterThanOrEqualTo))
     return NSGreaterThanOrEqualToPredicateOperatorType;
   
-  if (SEL_EQ(_sel, EOQualifierOperatorContains))
+  if (sel_isEqual(_sel, EOQualifierOperatorContains))
     return NSInPredicateOperatorType;
   
-  if (SEL_EQ(_sel, EOQualifierOperatorLike) ||
-      SEL_EQ(_sel, EOQualifierOperatorCaseInsensitiveLike))
+  if (sel_isEqual(_sel, EOQualifierOperatorLike) ||
+      sel_isEqual(_sel, EOQualifierOperatorCaseInsensitiveLike))
     return NSLikePredicateOperatorType;
   
   return NSCustomSelectorPredicateOperatorType;
@@ -164,7 +164,7 @@
   pmod  = NSDirectPredicateModifier;
   popts = 0;
   
-  if (SEL_EQ(_selector, EOQualifierOperatorCaseInsensitiveLike))
+  if (sel_isEqual(_selector, EOQualifierOperatorCaseInsensitiveLike))
     popts = NSCaseInsensitivePredicateOption;
   
   return [NSComparisonPredicate predicateWithLeftExpression:_lhs
$OpenBSD$
--- sope-core/EOCoreData/EOSortOrdering+CoreData.m.orig	Wed Feb  6 10:19:29 2013
+++ sope-core/EOCoreData/EOSortOrdering+CoreData.m	Wed Feb  6 10:20:23 2013
@@ -33,12 +33,12 @@
   }
   
   sel = [_descriptor selector];
-  if (SEL_EQ(sel, @selector(compare:))) {
+  if (sel_isEqual(sel, @selector(compare:))) {
     sel = [_descriptor ascending] 
       ? EOCompareAscending
       : EOCompareDescending;
   }
-  else if (SEL_EQ(sel, @selector(caseInsensitiveCompare:))) {
+  else if (sel_isEqual(sel, @selector(caseInsensitiveCompare:))) {
     sel = [_descriptor ascending] 
       ? EOCompareCaseInsensitiveAscending
       : EOCompareCaseInsensitiveDescending;
@@ -54,18 +54,18 @@
 }
 
 - (BOOL)isAscendingEOSortSelector:(SEL)_sel {
-  if (SEL_EQ(_sel, EOCompareDescending)) return NO;
-  if (SEL_EQ(_sel, EOCompareCaseInsensitiveAscending)) return NO;
+  if (sel_isEqual(_sel, EOCompareDescending)) return NO;
+  if (sel_isEqual(_sel, EOCompareCaseInsensitiveAscending)) return NO;
   return YES;
 }
 
 - (SEL)cdSortSelectorFromEOSortSelector:(SEL)_sel {
-  if (SEL_EQ(_sel, EOCompareAscending))  return @selector(compare:);
-  if (SEL_EQ(_sel, EOCompareDescending)) return @selector(compare:);
+  if (sel_isEqual(_sel, EOCompareAscending))  return @selector(compare:);
+  if (sel_isEqual(_sel, EOCompareDescending)) return @selector(compare:);
   
-  if (SEL_EQ(_sel, EOCompareCaseInsensitiveAscending))
+  if (sel_isEqual(_sel, EOCompareCaseInsensitiveAscending))
     return @selector(caseInsensitiveCompare:);
-  if (SEL_EQ(_sel, EOCompareCaseInsensitiveDescending))
+  if (sel_isEqual(_sel, EOCompareCaseInsensitiveDescending))
     return @selector(caseInsensitiveCompare:);
   
   return _sel;
$OpenBSD$
--- sope-core/NGExtensions/EOExt.subproj/EOQualifier+CtxEval.m.orig	Wed Feb  6 09:08:04 2013
+++ sope-core/NGExtensions/EOExt.subproj/EOQualifier+CtxEval.m	Wed Feb  6 09:09:49 2013
@@ -24,26 +24,12 @@
 #import <EOControl/EONull.h>
 #include "common.h"
 
-#if LIB_FOUNDATION_LIBRARY
-#  import <objc/objc-api.h>
-#  import <objc/objc.h>
-#  import <extensions/objc-runtime.h>
-#elif GNUSTEP_BASE_LIBRARY
-#if __GNU_LIBOBJC__ >= 20100911
-#  define sel_get_name sel_getName
 #  import <objc/runtime.h>
-#else
-#  import <objc/objc-api.h>
-#endif
-#else
-#  import <objc/objc.h>
-#  define sel_get_name sel_getName
-#endif
 
 static inline int countSelArgs(SEL _sel) {
   register const char *selName;
 
-  if ((selName = sel_get_name(_sel))) {
+  if ((selName = sel_getName(_sel))) {
     register int count;
     
     for (count = 0; *selName; selName++) {
$OpenBSD$
--- sope-core/NGStreams/NGStreamCoder.m.orig	Wed Feb  6 09:07:41 2013
+++ sope-core/NGStreams/NGStreamCoder.m	Wed Feb  6 09:15:23 2013
@@ -587,7 +587,7 @@ FINAL void _readObjC(NGStreamCoder *self, void *_value
 
     case _C_SEL:
       _writeTag(self, _C_SEL);
-      _writeCString(self, (*(SEL *)_value) ? sel_get_name(*(SEL *)_value) : NULL);
+      _writeCString(self, (*(SEL *)_value) ? sel_getName(*(SEL *)_value) : NULL);
       break;
       
     case _C_PTR:
@@ -899,7 +899,7 @@ FINAL void _readObjC(NGStreamCoder *self, void *_value
       
       NSAssert(*_type == tag, @"invalid type ..");
       _readObjC(self, &name, @encode(char *));
-      *(SEL *)_value = name ? sel_get_any_uid(name) : NULL;
+      *(SEL *)_value = name ? sel_getUid(name) : NULL;
       NGFree(name); name = NULL;
     }
 
$OpenBSD$
--- sope-gdl1/GDLAccess/common.h.orig	Wed Feb  6 10:13:51 2013
+++ sope-gdl1/GDLAccess/common.h	Wed Feb  6 10:18:18 2013
@@ -48,26 +48,8 @@
 
 #import <Foundation/NSObjCRuntime.h>
 
-#if NeXT_RUNTIME || APPLE_RUNTIME
-#  define sel_eq(sela,selb) (sela==selb?YES:NO)
-#  ifndef SEL_EQ
-#    define SEL_EQ(__A__,__B__) (__A__==__B__?YES:NO)
-#  endif
-#endif
-
-#if __GNU_LIBOBJC__ >= 20100911
-#  define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
-#  ifndef SEL_EQ
-#    define SEL_EQ(__A__,__B__) sel_isEqual(__A__,__B__)
-#  endif
-#endif
-
-#if LIB_FOUNDATION_LIBRARY
-#  import <extensions/objc-runtime.h>
-#else
 #  include <NGExtensions/NGObjectMacros.h>
 #  include <NGExtensions/NSString+Ext.h>
-#endif
 
 
 // ******************** common functions ********************
@@ -189,16 +171,12 @@ static inline long Atol(const char *str)
 	_a < _b ? _a : _b; })
 #endif
 
-#if !LIB_FOUNDATION_LIBRARY
 
 #ifndef CREATE_AUTORELEASE_POOL
 #define CREATE_AUTORELEASE_POOL(pool) \
   id pool = [[NSAutoreleasePool alloc] init]
 #endif
 
-#endif /* ! LIB_FOUNDATION_LIBRARY */
-
-
 #if !LIB_FOUNDATION_LIBRARY
 
 static inline char *Ltoa(long nr, char *str, int base)
@@ -235,24 +213,9 @@ static inline char *Ltoa(long nr, char *str, int base)
 }
 #endif
 
-#if !LIB_FOUNDATION_LIBRARY
-
 @interface NSObject(FoundationExtGDLAccess)
 - (void)subclassResponsibility:(SEL)sel;
 - (void)notImplemented:(SEL)sel;
 @end
-
-#endif
-
-#if !GNU_RUNTIME
-#  ifndef SEL_EQ
-#    define SEL_EQ(__A__,__B__) (__A__==__B__ ? YES : NO)
-#  endif
-#else
-#  ifndef SEL_EQ
-#    include <objc/objc.h>
-#    define SEL_EQ(__A__,__B__) sel_eq(__A__,__B__)
-#  endif
-#endif
 
 #endif /* __common_h__ */
$OpenBSD$
--- sope-gdl1/GDLAccess/EOAdaptorDataSource.m.orig	Wed Feb  6 10:20:59 2013
+++ sope-gdl1/GDLAccess/EOAdaptorDataSource.m	Wed Feb  6 10:21:17 2013
@@ -1023,15 +1023,15 @@ static NSNotificationCenter *getNC(void ) {
         [orderByExpr appendString:@", "];
       
       if ((selector = [sortOrdering selector])) {
-        if (SEL_EQ(selector, EOCompareAscending))
+        if (sel_isEqual(selector, EOCompareAscending))
           order = 1;
-        else if (SEL_EQ(selector, EOCompareDescending))
+        else if (sel_isEqual(selector, EOCompareDescending))
           order = 2;
-        else if (SEL_EQ(selector, EOCompareCaseInsensitiveAscending)) {
+        else if (sel_isEqual(selector, EOCompareCaseInsensitiveAscending)) {
 	  order       = 1;
 	  inSensitive = YES;
 	}
-        else if (SEL_EQ(selector, EOCompareCaseInsensitiveDescending)) {
+        else if (sel_isEqual(selector, EOCompareCaseInsensitiveDescending)) {
 	  order       = 2;
 	  inSensitive = YES;
 	}
@@ -1359,38 +1359,38 @@ static NSNotificationCenter *getNC(void ) {
 
   sql = nil;
   
-  if (SEL_EQ(EOQualifierOperatorEqual, self->operator)) {
+  if (sel_isEqual(EOQualifierOperatorEqual, self->operator)) {
     if ([self->value isNotNull])
       sql = [NSString stringWithFormat:@"%@ = %@", sqlKey, sqlValue];
     else
       sql = [NSString stringWithFormat:@"%@ IS NULL", sqlKey];
   }
-  else if (SEL_EQ(EOQualifierOperatorNotEqual, self->operator)) {
+  else if (sel_isEqual(EOQualifierOperatorNotEqual, self->operator)) {
     if ([self->value isNotNull])
       sql = [NSString stringWithFormat:@"NOT (%@ = %@)", sqlKey, sqlValue];
     else
       sql = [NSString stringWithFormat:@"%@ IS NOT NULL", sqlKey];
   }
-  else if (SEL_EQ(EOQualifierOperatorLessThan, self->operator)) {
+  else if (sel_isEqual(EOQualifierOperatorLessThan, self->operator)) {
     sql = [NSString stringWithFormat:@"%@ < %@", sqlKey, sqlValue];
   }
-  else if (SEL_EQ(EOQualifierOperatorLessThanOrEqualTo, self->operator)) {
+  else if (sel_isEqual(EOQualifierOperatorLessThanOrEqualTo, self->operator)) {
     sql = [NSString stringWithFormat:@"%@ <= %@", sqlKey, sqlValue];
   }
-  else if (SEL_EQ(EOQualifierOperatorGreaterThan, self->operator)) {
+  else if (sel_isEqual(EOQualifierOperatorGreaterThan, self->operator)) {
     sql = [NSString stringWithFormat:@"%@ > %@", sqlKey, sqlValue];
   }
-  else if (SEL_EQ(EOQualifierOperatorGreaterThanOrEqualTo, self->operator)) {
+  else if (sel_isEqual(EOQualifierOperatorGreaterThanOrEqualTo, self->operator)) {
     sql = [NSString stringWithFormat:@"%@ >= %@", sqlKey, sqlValue];
   }
-  else if (SEL_EQ(EOQualifierOperatorLike, self->operator)) {
+  else if (sel_isEqual(EOQualifierOperatorLike, self->operator)) {
     sqlValue = [[self->value stringValue]
                              stringByReplacingString:@"*" withString:@"%"];
     sqlValue = [_adaptor formatValue:sqlValue forAttribute:attr];
     
     sql = [NSString stringWithFormat:@"%@ LIKE %@", sqlKey, sqlValue];
   }
-  else if (SEL_EQ(EOQualifierOperatorCaseInsensitiveLike, self->operator)) {
+  else if (sel_isEqual(EOQualifierOperatorCaseInsensitiveLike, self->operator)) {
     sqlValue = [[self->value stringValue]
                              stringByReplacingString:@"*" withString:@"%"];
     sqlValue = [sqlValue lowercaseString];
@@ -1399,9 +1399,9 @@ static NSNotificationCenter *getNC(void ) {
     sql = [NSString stringWithFormat:@"LOWER(%@) LIKE %@", sqlKey, sqlValue];
   }
 #if 0
-  else if (SEL_EQ(EOQualifierOperatorLessThanOrEqualTo, self->operator)) {
+  else if (sel_isEqual(EOQualifierOperatorLessThanOrEqualTo, self->operator)) {
   }
-  else if (SEL_EQ(EOQualifierOperatorGreaterThanOrEqualTo, self->operator)) {
+  else if (sel_isEqual(EOQualifierOperatorGreaterThanOrEqualTo, self->operator)) {
   }
 #endif
   else {
$OpenBSD$
--- sope-gdl1/GDLAccess/EOKeyComparisonQualifier+SQL.m.orig	Wed Feb  6 10:39:45 2013
+++ sope-gdl1/GDLAccess/EOKeyComparisonQualifier+SQL.m	Wed Feb  6 10:40:04 2013
@@ -36,19 +36,19 @@
   EOSQLQualifier *q;
   NSString *format;
 
-  if (SEL_EQ(self->operator, EOQualifierOperatorEqual))
+  if (sel_isEqual(self->operator, EOQualifierOperatorEqual))
       format = @"%A = %A";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorNotEqual))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorNotEqual))
       format = @"%A <> %A";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorLessThan))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorLessThan))
       format = @"%A < %A";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorGreaterThan))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorGreaterThan))
       format = @"%A > %A";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorLessThanOrEqualTo))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorLessThanOrEqualTo))
       format = @"%A <= %A";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorGreaterThanOrEqualTo))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorGreaterThanOrEqualTo))
       format = @"%A >= %A";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorLike))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorLike))
       format = @"%A LIKE %A";
   else {
       format = [NSString stringWithFormat:@"%%A %@ %%A",
$OpenBSD$
--- sope-gdl1/GDLAccess/EOKeyValueQualifier+SQL.m.orig	Wed Feb  6 10:20:36 2013
+++ sope-gdl1/GDLAccess/EOKeyValueQualifier+SQL.m	Wed Feb  6 10:20:51 2013
@@ -36,19 +36,19 @@
   EOSQLQualifier *q;
   NSString *format;
   
-  if (SEL_EQ(self->operator,  EOQualifierOperatorEqual))
+  if (sel_isEqual(self->operator,  EOQualifierOperatorEqual))
       format = @"%A = %@";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorNotEqual))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorNotEqual))
       format = @"%A <> %@";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorLessThan))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorLessThan))
       format = @"%A < %@";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorGreaterThan))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorGreaterThan))
       format = @"%A > %@";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorLessThanOrEqualTo))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorLessThanOrEqualTo))
       format = @"%A <= %@";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorGreaterThanOrEqualTo))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorGreaterThanOrEqualTo))
       format = @"%A >= %@";
-  else if (SEL_EQ(self->operator, EOQualifierOperatorLike))
+  else if (sel_isEqual(self->operator, EOQualifierOperatorLike))
       format = @"%A LIKE %@";
   else {
       format = [NSString stringWithFormat:@"%%A %@ %%@",
$OpenBSD$
--- sope-gdl1/GDLAccess/EOSQLExpression.m.orig	Wed Feb  6 10:12:42 2013
+++ sope-gdl1/GDLAccess/EOSQLExpression.m	Wed Feb  6 10:13:43 2013
@@ -480,20 +480,20 @@ NSString *EOBindVariableValueKey       = @"value";
       ordering  = [order selector];
       attribute = [self->entity attributeNamed:[order key]];
 
-      if (sel_eq(ordering, EOCompareCaseInsensitiveAscending) ||
-          sel_eq(ordering, EOCompareCaseInsensitiveDescending))
+      if (sel_isEqual(ordering, EOCompareCaseInsensitiveAscending) ||
+          sel_isEqual(ordering, EOCompareCaseInsensitiveDescending))
         fmt = @"LOWER(%@)";
       else
         fmt = @"%@";
       
       [orderBy appendFormat:fmt, [self expressionValueForAttribute:attribute]];
 
-      if (sel_eq(ordering, EOCompareCaseInsensitiveAscending) ||
-          sel_eq(ordering, EOCompareAscending)) {
+      if (sel_isEqual(ordering, EOCompareCaseInsensitiveAscending) ||
+          sel_isEqual(ordering, EOCompareAscending)) {
         [orderBy appendString:@" ASC"];
       }
-      else if (sel_eq(ordering, EOCompareCaseInsensitiveDescending) ||
-               sel_eq(ordering, EOCompareDescending)) {
+      else if (sel_isEqual(ordering, EOCompareCaseInsensitiveDescending) ||
+               sel_isEqual(ordering, EOCompareDescending)) {
         [orderBy appendString:@" DESC"];
       }
     }
@@ -1153,27 +1153,27 @@ NSString *EOBindVariableValueKey       = @"value";
 
 - (NSString *)sqlStringForSelector:(SEL)_selector value:(id)_value {
   if ((_value == null) || (_value == nil)) {
-    if (sel_eq(_selector, EOQualifierOperatorEqual))
+    if (sel_isEqual(_selector, EOQualifierOperatorEqual))
       return @"is";
-    else if (sel_eq(_selector, EOQualifierOperatorNotEqual))
+    else if (sel_isEqual(_selector, EOQualifierOperatorNotEqual))
       return @"is not";
   }
   else {
-    if (sel_eq(_selector, EOQualifierOperatorEqual))
+    if (sel_isEqual(_selector, EOQualifierOperatorEqual))
       return @"=";
-    else if (sel_eq(_selector, EOQualifierOperatorNotEqual))
+    else if (sel_isEqual(_selector, EOQualifierOperatorNotEqual))
       return @"<>";
   }
   
-  if (sel_eq(_selector, EOQualifierOperatorLessThan))
+  if (sel_isEqual(_selector, EOQualifierOperatorLessThan))
     return @"<";
-  else if (sel_eq(_selector, EOQualifierOperatorGreaterThan))
+  else if (sel_isEqual(_selector, EOQualifierOperatorGreaterThan))
     return @">";
-  else if (sel_eq(_selector, EOQualifierOperatorLessThanOrEqualTo))
+  else if (sel_isEqual(_selector, EOQualifierOperatorLessThanOrEqualTo))
     return @"<=";
-  else if (sel_eq(_selector, EOQualifierOperatorGreaterThanOrEqualTo))
+  else if (sel_isEqual(_selector, EOQualifierOperatorGreaterThanOrEqualTo))
     return @">=";
-  else if (sel_eq(_selector, EOQualifierOperatorLike))
+  else if (sel_isEqual(_selector, EOQualifierOperatorLike))
     return @"LIKE";
   else {
     return [NSString stringWithFormat:@"UNKNOWN<%@>",
$OpenBSD$
--- sope-ldap/NGLdap/EOQualifier+LDAP.m.orig	Wed Feb  6 09:50:55 2013
+++ sope-ldap/NGLdap/EOQualifier+LDAP.m	Wed Feb  6 09:53:04 2013
@@ -22,14 +22,6 @@
 #include "EOQualifier+LDAP.h"
 #include "common.h"
 
-#if NeXT_RUNTIME
-#define sel_eq(sel1, sel2) ((sel1)) == ((sel2))
-#endif
-
-#if __GNU_LIBOBJC__ >= 20100911
-#  define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
-#endif
-
 @interface EOQualifier(LDAPPrivates)
 
 - (void)addToLDAPFilterString:(NSMutableString *)_s inContext:(id)_ctx;
@@ -123,29 +115,29 @@
 
   sel = [self selector];
 
-  if (sel_eq(sel,  EOQualifierOperatorNotEqual))
+  if (sel_isEqual(sel,  EOQualifierOperatorNotEqual))
     [_s appendString:@"(!"];
   
   [_s appendString:@"("];
   [_s appendString:[self key]];
 
-  if (sel_eq(sel,  EOQualifierOperatorEqual))
+  if (sel_isEqual(sel,  EOQualifierOperatorEqual))
     [_s appendString:@"="];
-  else if (sel_eq(sel,  EOQualifierOperatorNotEqual))
+  else if (sel_isEqual(sel,  EOQualifierOperatorNotEqual))
     [_s appendString:@"="];
-  else if (sel_eq(sel,  EOQualifierOperatorLessThan))
+  else if (sel_isEqual(sel,  EOQualifierOperatorLessThan))
     [_s appendString:@"<"];
-  else if (sel_eq(sel,  EOQualifierOperatorGreaterThan))
+  else if (sel_isEqual(sel,  EOQualifierOperatorGreaterThan))
     [_s appendString:@">"];
-  else if (sel_eq(sel,  EOQualifierOperatorLessThanOrEqualTo))
+  else if (sel_isEqual(sel,  EOQualifierOperatorLessThanOrEqualTo))
     [_s appendString:@"<="];
-  else if (sel_eq(sel,  EOQualifierOperatorGreaterThanOrEqualTo))
+  else if (sel_isEqual(sel,  EOQualifierOperatorGreaterThanOrEqualTo))
     [_s appendString:@">="];
-  else if (sel_eq(sel,  EOQualifierOperatorContains))
+  else if (sel_isEqual(sel,  EOQualifierOperatorContains))
     [_s appendString:@"=*"];
-  else if (sel_eq(sel,  EOQualifierOperatorLike))
+  else if (sel_isEqual(sel,  EOQualifierOperatorLike))
     [_s appendString:@"="];
-  else if (sel_eq(sel,  EOQualifierOperatorCaseInsensitiveLike))
+  else if (sel_isEqual(sel,  EOQualifierOperatorCaseInsensitiveLike))
     [_s appendString:@"="];
   else {
     NSLog(@"UNKNOWN operator: %@", NSStringFromSelector([self selector]));
@@ -155,7 +147,7 @@
   [_s appendString:[[self value] description]];
   [_s appendString:@")"];
   
-  if (sel_eq(sel,  EOQualifierOperatorNotEqual))
+  if (sel_isEqual(sel,  EOQualifierOperatorNotEqual))
     [_s appendString:@")"];
 }
 
@@ -169,29 +161,29 @@
 
   sel = [self selector];
 
-  if (sel_eq(sel,  EOQualifierOperatorNotEqual))
+  if (sel_isEqual(sel,  EOQualifierOperatorNotEqual))
     [_s appendString:@"(!"];
   
   [_s appendString:@"("];
   [_s appendString:[self leftKey]];
 
-  if (sel_eq(sel,  EOQualifierOperatorEqual))
+  if (sel_isEqual(sel,  EOQualifierOperatorEqual))
     [_s appendString:@"="];
-  else if (sel_eq(sel,  EOQualifierOperatorNotEqual))
+  else if (sel_isEqual(sel,  EOQualifierOperatorNotEqual))
     [_s appendString:@"="];
-  else if (sel_eq(sel,  EOQualifierOperatorLessThan))
+  else if (sel_isEqual(sel,  EOQualifierOperatorLessThan))
     [_s appendString:@"<"];
-  else if (sel_eq(sel,  EOQualifierOperatorGreaterThan))
+  else if (sel_isEqual(sel,  EOQualifierOperatorGreaterThan))
     [_s appendString:@">"];
-  else if (sel_eq(sel,  EOQualifierOperatorLessThanOrEqualTo))
+  else if (sel_isEqual(sel,  EOQualifierOperatorLessThanOrEqualTo))
     [_s appendString:@"<="];
-  else if (sel_eq(sel,  EOQualifierOperatorGreaterThanOrEqualTo))
+  else if (sel_isEqual(sel,  EOQualifierOperatorGreaterThanOrEqualTo))
     [_s appendString:@">="];
-  else if (sel_eq(sel,  EOQualifierOperatorContains))
+  else if (sel_isEqual(sel,  EOQualifierOperatorContains))
     [_s appendString:@"=*"];
-  else if (sel_eq(sel,  EOQualifierOperatorLike))
+  else if (sel_isEqual(sel,  EOQualifierOperatorLike))
     [_s appendString:@"="];
-  else if (sel_eq(sel,  EOQualifierOperatorCaseInsensitiveLike))
+  else if (sel_isEqual(sel,  EOQualifierOperatorCaseInsensitiveLike))
     [_s appendString:@"="];
   else {
     NSLog(@"UNKNOWN operator: %@", NSStringFromSelector([self selector]));
@@ -201,7 +193,7 @@
   [_s appendString:[self rightKey]];
   [_s appendString:@")"];
   
-  if (sel_eq(sel,  EOQualifierOperatorNotEqual))
+  if (sel_isEqual(sel,  EOQualifierOperatorNotEqual))
     [_s appendString:@")"];
 }
 
$OpenBSD$
--- sope-mime/NGImap4/EOQualifier+IMAPAdditions.m.orig	Wed Feb  6 09:49:12 2013
+++ sope-mime/NGImap4/EOQualifier+IMAPAdditions.m	Wed Feb  6 09:50:40 2013
@@ -267,10 +267,10 @@ static void _initImap4SearchCategory(void) {
 
   // TODO: add support for <> qualifier? (seen => unseen)
       
-  if (sel_eq(lselector, EOQualifierOperatorEqual)) {
+  if (sel_isEqual(lselector, EOQualifierOperatorEqual)) {
     lvalue = [NSArray arrayWithObject:lvalue];
   }
-  else if (!sel_eq(lselector, EOQualifierOperatorContains)) {
+  else if (!sel_isEqual(lselector, EOQualifierOperatorContains)) {
     return [self invalidImap4SearchQualifier:
 		   @"unexpected EOKeyValueQualifier selector"];
   }
@@ -299,13 +299,13 @@ static void _initImap4SearchCategory(void) {
 andComparisonSelector:(SEL)lselector {
   NSString *operatorPrefix, *dateOperator, *imap4Operator;
 
-  if (sel_eq(lselector, EOQualifierOperatorEqual))
+  if (sel_isEqual(lselector, EOQualifierOperatorEqual))
     dateOperator = @"ON";
-  else if (sel_eq(lselector, EOQualifierOperatorGreaterThan)
-	   || sel_eq(lselector, EOQualifierOperatorGreaterThanOrEqualTo))
+  else if (sel_isEqual(lselector, EOQualifierOperatorGreaterThan)
+	   || sel_isEqual(lselector, EOQualifierOperatorGreaterThanOrEqualTo))
     dateOperator = @"SINCE";
-  else if (sel_eq(lselector, EOQualifierOperatorLessThan)
-	   || sel_eq(lselector, EOQualifierOperatorLessThanOrEqualTo))
+  else if (sel_isEqual(lselector, EOQualifierOperatorLessThan)
+	   || sel_isEqual(lselector, EOQualifierOperatorLessThanOrEqualTo))
     dateOperator = @"BEFORE";
   else
     dateOperator = nil;
@@ -371,7 +371,7 @@ andComparisonSelector:(SEL)lselector {
   }
 
   if ([lkey isEqualToString:@"UID"]) {
-    if (!sel_eq(lselector, EOQualifierOperatorEqual)) {
+    if (!sel_isEqual(lselector, EOQualifierOperatorEqual)) {
       return [self invalidImap4SearchQualifier:@"unexpected qualifier 2"];
     }
     
@@ -381,7 +381,7 @@ andComparisonSelector:(SEL)lselector {
   }
 
   if ([lkey isEqualToString:@"MODSEQ"]) {
-    if (!sel_eq(lselector, EOQualifierOperatorGreaterThanOrEqualTo)) {
+    if (!sel_isEqual(lselector, EOQualifierOperatorGreaterThanOrEqualTo)) {
       return [self invalidImap4SearchQualifier:@"'MODSEQ' can only take 'EOQualifierOperatorGreaterThanOrEqualTo' as qualifier operator"];
     }
     
@@ -391,11 +391,11 @@ andComparisonSelector:(SEL)lselector {
   }
   
   if ([lkey isEqualToString:@"SIZE"]) {
-    if (sel_eq(lselector, EOQualifierOperatorGreaterThan)
-	|| sel_eq(lselector, EOQualifierOperatorGreaterThanOrEqualTo))
+    if (sel_isEqual(lselector, EOQualifierOperatorGreaterThan)
+	|| sel_isEqual(lselector, EOQualifierOperatorGreaterThanOrEqualTo))
       [search appendString:@"LARGER "];
-    else if (sel_eq(lselector, EOQualifierOperatorLessThan)
-	     || sel_eq(lselector, EOQualifierOperatorLessThanOrEqualTo))
+    else if (sel_isEqual(lselector, EOQualifierOperatorLessThan)
+	     || sel_isEqual(lselector, EOQualifierOperatorLessThanOrEqualTo))
       [search appendString:@"SMALLER "];
     else
       return [self invalidImap4SearchQualifier:@"unexpected qualifier 3"];
@@ -416,9 +416,9 @@ andComparisonSelector:(SEL)lselector {
 
        Would be: "a caseInsensitiveLike: '*ABC*'"
     */
-    if (!sel_eq(lselector, EOQualifierOperatorEqual) &&
-	!sel_eq(lselector, EOQualifierOperatorCaseInsensitiveLike) &&
-	!sel_eq(lselector, EOQualifierOperatorContains)) {
+    if (!sel_isEqual(lselector, EOQualifierOperatorEqual) &&
+	!sel_isEqual(lselector, EOQualifierOperatorCaseInsensitiveLike) &&
+	!sel_isEqual(lselector, EOQualifierOperatorContains)) {
       [self logWithFormat:@"IMAP4 generation: got: %@, allowed: %@", 
 	    NSStringFromSelector(lselector),
 	    NSStringFromSelector(EOQualifierOperatorEqual)];
@@ -435,8 +435,8 @@ andComparisonSelector:(SEL)lselector {
   }
   
   
-  if (!sel_eq(lselector, EOQualifierOperatorEqual) &&
-      !sel_eq(lselector, EOQualifierOperatorCaseInsensitiveLike))
+  if (!sel_isEqual(lselector, EOQualifierOperatorEqual) &&
+      !sel_isEqual(lselector, EOQualifierOperatorCaseInsensitiveLike))
     return [self invalidImap4SearchQualifier:@"unexpected qualifier 5"];
   
   [search appendString:@"HEADER "];
$OpenBSD$
--- sope-mime/NGImap4/EOSortOrdering+IMAPAdditions.m.orig	Wed Feb  6 10:15:25 2013
+++ sope-mime/NGImap4/EOSortOrdering+IMAPAdditions.m	Wed Feb  6 10:15:40 2013
@@ -68,8 +68,8 @@ static NSArray *AllowedSortKeys = nil;
   /* check selector */
   
   sel = [self selector];
-  if (sel_eq(sel, EOCompareDescending) ||
-      sel_eq(sel, EOCompareCaseInsensitiveDescending)) {
+  if (sel_isEqual(sel, EOCompareDescending) ||
+      sel_isEqual(sel, EOCompareCaseInsensitiveDescending)) {
     return [@"REVERSE " stringByAppendingString:lkey];
   }
   // TODO: check other selectors whether they make sense instead of silent acc.
$OpenBSD$
--- sope-mime/NGImap4/imCommon.h.orig	Wed Feb  6 10:15:49 2013
+++ sope-mime/NGImap4/imCommon.h	Wed Feb  6 10:16:11 2013
@@ -37,18 +37,6 @@
 #include <NGMime/NGMime.h>
 #include <NGMail/NGMail.h>
 
-#if NeXT_RUNTIME || APPLE_RUNTIME
-#  ifndef sel_eq
-#    define sel_eq(__A__,__B__) (__A__==__B__)
-#  endif
-#endif
-
-#if __GNU_LIBOBJC__ >= 20100911
-#  ifndef sel_eq
-#    define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
-#  endif
-#endif
-
 @interface NSObject(NGImap4_OSXHacks)
 - (void)subclassResponsibility:(SEL)_acmd;
 - (void)notImplemented:(SEL)_acmd;
$OpenBSD$
--- sope-mime/NGImap4/NGImap4Folder.m.orig	Wed Feb  6 10:15:03 2013
+++ sope-mime/NGImap4/NGImap4Folder.m	Wed Feb  6 10:15:16 2013
@@ -702,8 +702,8 @@ static int FetchNewUnseenMessagesInSubFoldersOnDemand 
       }
       muids = [[NSMutableArray alloc] initWithCapacity:255];
 
-      if (sel_eq([so selector], EOCompareAscending) ||
-          sel_eq([so selector], EOCompareCaseInsensitiveAscending)) {
+      if (sel_isEqual([so selector], EOCompareAscending) ||
+          sel_isEqual([so selector], EOCompareCaseInsensitiveAscending)) {
         qual1 = UnseenQual;
         if (_unseen)
           qual2 = nil;
$OpenBSD$
--- sope-mime/NGMime/common.h.orig	Wed Feb  6 10:16:19 2013
+++ sope-mime/NGMime/common.h	Wed Feb  6 10:16:38 2013
@@ -36,12 +36,6 @@
 
 #include "NGMimeType.h"
 
-#if !GNU_RUNTIME
-#  ifndef sel_eq
-#    define sel_eq(__A__, __B__) (__A__==__B__)
-#  endif
-#endif
-
 @interface NSObject(OSXHacks)
 - (void)subclassResponsibility:(SEL)_acmd;
 - (void)notImplemented:(SEL)_acmd;
sope-fix-selectors.diff (45,406 bytes)   
buzzdee

buzzdee

2013-06-29 08:56

reporter   ~0005724

I think I was wrong with the title, its not about clang, but libobjc2. Now I upgraded to libobjc2-1.7, and I get the same errors and I am unable to build with gcc, using gcc-4.2.1 that comes with OpenBSD.

ludovic

ludovic

2013-07-18 11:04

administrator   ~0005757

https://github.com/inverse-inc/sope/commit/d93b3d55d889219a5b0e0b8af9fcf2d2ba3d2967

ludovic

ludovic

2013-07-19 10:16

administrator   ~0005763

This patch was seriously breaking SOGo on previous gcc/gnu objc runtime.

ludovic

ludovic

2013-10-19 07:34

administrator   ~0006144

So this one can be closed now?

buzzdee

buzzdee

2013-10-19 07:38

reporter   ~0006145

yes, with the stuff from David, this should be no issue anymore.

thanks,
Sebastian

ludovic

ludovic

2013-10-19 07:39

administrator   ~0006146

Closed due to commit https://github.com/inverse-inc/sope/commit/663174ffee0f3680eda328a6510e48ee8a34d62d

Issue History

Date Modified Username Field Change
2013-02-06 10:23 buzzdee New Issue
2013-02-06 10:23 buzzdee File Added: sope-fix-selectors.diff
2013-06-25 10:57 ludovic Target Version => 2.0.7
2013-06-29 08:56 buzzdee Note Added: 0005724
2013-07-18 11:04 ludovic Note Added: 0005757
2013-07-18 11:04 ludovic Status new => closed
2013-07-18 11:04 ludovic Resolution open => fixed
2013-07-18 11:04 ludovic Fixed in Version => 2.0.7
2013-07-19 10:16 ludovic Note Added: 0005763
2013-07-19 10:16 ludovic Status closed => feedback
2013-07-19 10:16 ludovic Resolution fixed => reopened
2013-07-19 10:17 ludovic Fixed in Version 2.0.7 =>
2013-07-19 10:17 ludovic Target Version 2.0.7 => maybe sometimes
2013-10-19 07:34 ludovic Note Added: 0006144
2013-10-19 07:38 buzzdee Note Added: 0006145
2013-10-19 07:38 buzzdee Status feedback => new
2013-10-19 07:39 ludovic Note Added: 0006146
2013-10-19 07:39 ludovic Status new => closed
2013-10-19 07:39 ludovic Assigned To => ludovic
2013-10-19 07:39 ludovic Resolution reopened => fixed
2013-10-19 07:39 ludovic Fixed in Version => 2.1.0