View Issue Details

IDProjectCategoryView StatusLast Update
0001763SOGoSOPEpublic2012-05-09 15:57
Reporteravoegele Assigned Toludovic  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Versionnightly v2 
Target Version1.3.15Fixed in Version1.3.15 
Summary0001763: Support GCC 4.7 in SOPE
Description

GCC 4.7 removes several functions that were deprecated with GCC 4.6. Also, the libobjc distributed with GCC 4.7.0 sets __GNU_LIBOBJC__ to 20110608.

The attached patch replaces "GNU_LIBOBJC == 20100911" with "GNU_LIBOBJC >= 20100911" in several places. The condition "GNU_LIBOBJC != 20100911" is replaced with "!(GNU_LIBOBJC >= 20100911)".

In several modules the function sel_isEqual() is used instead of sel_eq() if a recent libobjc is installed. In sope-gdl1/GDLAccess/EOFaultHandler.m sel_getTypeEncoding() is used instead of selector->sel_types.

Tested on Slackware Linux, which recently switched to GCC 4.7.0.

TagsNo tags attached.

Activities

2012-04-09 16:18

 

sope_gcc_4_7.diff (27,092 bytes)   
#
# old_revision [91277a54bc09d99eb7c022687bc24ac4529c81d3]
#
# patch "sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m"
#  from [b5585a8779d92fe699f3edc58c3e81817fb2850c]
#    to [aa0635be8440b78c2a0dc75ec120972b198bfd14]
# 
# patch "sope-appserver/NGObjWeb/DynamicElements/WOComponentContent.m"
#  from [533a4a0b97a6336e13d02989c6fb4a23c2b24f9b]
#    to [12cfd6384312d2c37399397ae4b0a2c4088eb758]
# 
# patch "sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m"
#  from [ee75523fe44a4efe5be252f5bf8a950945587737]
#    to [75ab16b9fc8ba0482db38a770a35e6d32e76442e]
# 
# patch "sope-appserver/NGObjWeb/DynamicElements/WOCompoundElement.m"
#  from [d48af17bf652c81acd850ad9b1233f3d0beb18bb]
#    to [9b8dd5e24a25bf4b061ca1d97588896da02bec15]
# 
# patch "sope-appserver/NGObjWeb/NSObject+WO.m"
#  from [789d7b5f193b93767a300bac82b35df83e2fd20c]
#    to [fad2f5b5db9fff5441fe2e9ae7e075292ef9c549]
# 
# patch "sope-appserver/NGObjWeb/SoObjects/SoObjCClass.m"
#  from [f59757c12ed63d52cdd36f7ecb4a4659456b2818]
#    to [596e8c01916a4a93c6cd9ae92a6949ffcf7d4ba1]
# 
# patch "sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m"
#  from [b3939614dee42b4e061b53e815b2716425b8c337]
#    to [55963870272ad54919b719d467dce0d88d09f8ac]
# 
# patch "sope-appserver/NGObjWeb/WOApplication.m"
#  from [01ed97099e592b60adccb66f2bb27dce4a078309]
#    to [ab6b6620ac342dd7557db32ce2e4841002df9562]
# 
# patch "sope-appserver/NGObjWeb/WOComponent+Sync.m"
#  from [8289c302efc35c56ac2f94900d2416a10d0c96fa]
#    to [0ec059d57873a77846d61792bf5751de9ed69cae]
# 
# patch "sope-appserver/NGObjWeb/WODirectActionRequestHandler.m"
#  from [abcd4d153248d1f6bd45e102d8fa9f1510d51bcd]
#    to [87a44474c3bfef008ae374c440d929da70ccaff1]
# 
# patch "sope-appserver/NGObjWeb/WOSession.m"
#  from [2838dafb7c9f02ee141033403c30d4f829abe7e6]
#    to [b0d6df4a0c71d3c4293d7083c11f6e68c6f1a1b7]
# 
# patch "sope-appserver/NGObjWeb/common.h"
#  from [da608eeb9694956da84ee937d6c0c173d1dd4fae]
#    to [58229122fdf6292d149c90510ae7da9189e1945d]
# 
# patch "sope-core/EOControl/EOKeyValueCoding.m"
#  from [d767115c5d13fb624c1539a494784e306e50cabf]
#    to [05026433be504cab09fddc130b615e848745d940]
# 
# patch "sope-core/EOControl/EOValidation.m"
#  from [ede5fb08ebc5632ee82f623db062870e065b9b80]
#    to [f575e0bc45b4da79fdca5286cda96f0880582dbb]
# 
# patch "sope-core/EOControl/common.h"
#  from [9423a5c5505561fc183924bdb2c82d55fabaf061]
#    to [b5d35a6e03c74d4b89c3fadeb4c11c8cd1f463e3]
# 
# patch "sope-core/NGExtensions/EOExt.subproj/EOQualifier+CtxEval.m"
#  from [3e1ff61981b7b80fb4accdecfeaac668f32072d7]
#    to [6ac0c0db9c7e4448024ff260827e3e689eb6f8df]
# 
# patch "sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m"
#  from [53462c1d9ee5ecb4c97c13e24025a978deb77f78]
#    to [1d6430c2ba315a51baa4319685843cd1f056552a]
# 
# patch "sope-core/NGExtensions/NGBundleManager.m"
#  from [afdb978b26102d2324760ad3249682c65e823172]
#    to [50ba07bbaf49fa4fe3a44639d91ad429b0509644]
# 
# patch "sope-core/NGExtensions/NGExtensions/NGMemoryAllocation.h"
#  from [8eb6eb8e3bc0fcce9b21576022c1d85887f6af3e]
#    to [f12ec337b0c922ed7d8c7e9c2df57d77c549d7c1]
# 
# patch "sope-core/NGExtensions/common.h"
#  from [819ac09f20d4c77e1f9bdcf21e2bf9368d59a8ba]
#    to [910ffba8b124c77068f3377db3b4809ce0912cc3]
# 
# patch "sope-core/NGStreams/common.h"
#  from [6b3c6a2bb8aa5769aa7672be129daa8d958deed1]
#    to [1c56c74d1481888e91d4540abb6c6af939e29760]
# 
# patch "sope-gdl1/GDLAccess/EODatabaseFault.m"
#  from [39a385b41e25a05b2c6de3db4812b695f0246db9]
#    to [d43e06ab7a0dcede51cf94b5fe50d87481cb0b05]
# 
# patch "sope-gdl1/GDLAccess/EOFault.m"
#  from [48205793ddd1c54063e556c73bfe296bb5e08ab4]
#    to [fe711c2f7711ea6ab487eae9c5bfe744dee7a514]
# 
# patch "sope-gdl1/GDLAccess/EOFaultHandler.m"
#  from [2e2b559fdca27b14229dbe71a0b27d7f49a2bec9]
#    to [af382885f12b5524ac6af6fe6ebe83f1f71764a0]
# 
# patch "sope-gdl1/GDLAccess/EOKeyComparisonQualifier+SQL.m"
#  from [be0a5114f5e53f3667f56ac464807f2501d229c5]
#    to [6bd2a6d106a2975a76bc8faa6cb15a0301b7a9a2]
# 
# patch "sope-gdl1/GDLAccess/EORecordDictionary.m"
#  from [e3f92f26a9a7773ef40d641b1de8623f911da1a1]
#    to [3b82ce2c21444a2db1eae92ab582b47b2ad85f78]
# 
# patch "sope-gdl1/GDLAccess/common.h"
#  from [dc86e9e1d1625a95619642863250ad950ba74a51]
#    to [c9e30b6f0d38f32f695b4ceb3d56184ebff28c7f]
# 
# patch "sope-ldap/NGLdap/EOQualifier+LDAP.m"
#  from [8ec13c777164cced9931fa91c43830905676a25b]
#    to [de0e7b85962429e229eb6e23f71d41f09443b80b]
# 
# patch "sope-mime/NGImap4/imCommon.h"
#  from [ff80057bc0474f1dd3bcfcff7a7fbb39117d18f9]
#    to [f8376f722d03b0812bc9b9aab263c1e75252811f]
#
============================================================
--- sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m	b5585a8779d92fe699f3edc58c3e81817fb2850c
+++ sope-appserver/NGObjWeb/Associations/WOKeyPathAssociation.m	aa0635be8440b78c2a0dc75ec120972b198bfd14
@@ -25,7 +25,7 @@
 #include "common.h"
 #include <string.h>
 
-#if __GNU_LIBOBJC__ == 20100911
+#if __GNU_LIBOBJC__ >= 20100911
 #define METHOD_NULL NULL
 #define object_is_instance(XXX) (XXX != nil)
 #define class_get_class_method    class_getClassMethod
@@ -479,7 +479,7 @@ static inline void _fillInfo(WOKeyPathAs
     
     if (method != METHOD_NULL) {
       info->access.method = method_get_imp(method);
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
       info->retType = *(method_getTypeEncoding(method));
 #else
 	  info->retType = *(method->method_types);
============================================================
--- sope-appserver/NGObjWeb/DynamicElements/WOComponentContent.m	533a4a0b97a6336e13d02989c6fb4a23c2b24f9b
+++ sope-appserver/NGObjWeb/DynamicElements/WOComponentContent.m	12cfd6384312d2c37399397ae4b0a2c4088eb758
@@ -75,7 +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__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 	     sel_getName(_cmd), 
 #else
 	     sel_get_name(_cmd), 
@@ -115,7 +115,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__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 	     sel_getName(_cmd), 
 #else
 	     sel_get_name(_cmd), 
@@ -165,7 +165,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__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 	     sel_getName(_cmd), 
 #else
 	     sel_get_name(_cmd), 
============================================================
--- sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m	ee75523fe44a4efe5be252f5bf8a950945587737
+++ sope-appserver/NGObjWeb/DynamicElements/WOComponentReference.m	75ab16b9fc8ba0482db38a770a35e6d32e76442e
@@ -179,7 +179,7 @@ _updateComponent(WOComponentReference *s
         printf("  ");
       printf("[%s %s]: %0.3fs\n",
              [[child name] cString], 
-#if APPLE_RUNTIME || NeXT_RUNTIME
+#if APPLE_RUNTIME || NeXT_RUNTIME || (__GNU_LIBOBJC__ >= 20100911)
 	     sel_getName(_cmd), 
 #else
 	     sel_get_name(_cmd), 
============================================================
--- sope-appserver/NGObjWeb/DynamicElements/WOCompoundElement.m	d48af17bf652c81acd850ad9b1233f3d0beb18bb
+++ sope-appserver/NGObjWeb/DynamicElements/WOCompoundElement.m	9b8dd5e24a25bf4b061ca1d97588896da02bec15
@@ -262,7 +262,7 @@ static int descriptiveIDs = -1;
             printf("  ");
 #endif
           printf("  Child of 0x%p: i[%i] %s <%s>: %0.3fs\n",
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 				 self, i, [[_ctx elementID] cString], class_getName([child class]),
 #else
                  self, i, [[_ctx elementID] cString], [child class]->name,
============================================================
--- sope-appserver/NGObjWeb/NSObject+WO.m	789d7b5f193b93767a300bac82b35df83e2fd20c
+++ sope-appserver/NGObjWeb/NSObject+WO.m	fad2f5b5db9fff5441fe2e9ae7e075292ef9c549
@@ -131,7 +131,7 @@ static inline SEL _getSetSel(register co
                              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__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
   return sel_getUid(buf);
 #else
   return sel_get_uid(buf);
@@ -259,7 +259,7 @@ IMP WOGetKVCGetMethod(id object, NSStrin
   if (object == nil) return NULL;
   if (_key   == nil) return NULL;
 
-#if GNU_RUNTIME && !(defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911))
+#if GNU_RUNTIME && !(defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911))
   {
     unsigned keyLen;
     char     *buf;
@@ -308,7 +308,7 @@ id WOGetKVCValueUsingMethod(id object, N
     char *buf;
     buf = malloc(keyLen + 1);
     [_key getCString:buf];
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
     getSel = sel_getUid(buf);
 #else
     getSel = sel_get_uid(buf);
============================================================
--- sope-appserver/NGObjWeb/SoObjects/SoObjCClass.m	f59757c12ed63d52cdd36f7ecb4a4659456b2818
+++ sope-appserver/NGObjWeb/SoObjects/SoObjCClass.m	596e8c01916a4a93c6cd9ae92a6949ffcf7d4ba1
@@ -43,7 +43,7 @@
 
   a = [NSMutableArray array];
 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
   Method *p, *m;
   int count;
    
============================================================
--- sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m	b3939614dee42b4e061b53e815b2716425b8c337
+++ sope-appserver/NGObjWeb/SoObjects/SoSelectorInvocation.m	55963870272ad54919b719d467dce0d88d09f8ac
@@ -28,7 +28,7 @@
 #include <DOM/EDOM.h>
 #include "common.h"
 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#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
============================================================
--- sope-appserver/NGObjWeb/WOApplication.m	01ed97099e592b60adccb66f2bb27dce4a078309
+++ sope-appserver/NGObjWeb/WOApplication.m	ab6b6620ac342dd7557db32ce2e4841002df9562
@@ -38,7 +38,7 @@
 #include "common.h"
 #include <time.h>
 
-#if GNU_RUNTIME && !defined(__GNUSTEP_RUNTIME__)
+#if GNU_RUNTIME && !defined(__GNUSTEP_RUNTIME__) && !(__GNU_LIBOBJC__ >= 20110608)
 #  include <objc/sarray.h>
 #endif
 
============================================================
--- sope-appserver/NGObjWeb/WOComponent+Sync.m	8289c302efc35c56ac2f94900d2416a10d0c96fa
+++ sope-appserver/NGObjWeb/WOComponent+Sync.m	0ec059d57873a77846d61792bf5751de9ed69cae
@@ -23,7 +23,7 @@
 #include <NGObjWeb/WOAssociation.h>
 #include "common.h"
 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 #  include <objc/objc.h>
 #  define class_get_instance_method class_getInstanceMethod
 #  define method_get_imp method_getImplementation
============================================================
--- sope-appserver/NGObjWeb/WODirectActionRequestHandler.m	abcd4d153248d1f6bd45e102d8fa9f1510d51bcd
+++ sope-appserver/NGObjWeb/WODirectActionRequestHandler.m	87a44474c3bfef008ae374c440d929da70ccaff1
@@ -70,7 +70,7 @@ static Class NSDateClass = Nil;
 - (BOOL)isComponentClass:(Class)_clazz {
   if (_clazz == Nil) 
     return NO;
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
   while ((_clazz = class_getSuperclass(_clazz)) != Nil) {
 #else
   while ((_clazz = _clazz->super_class) != Nil) {
============================================================
--- sope-appserver/NGObjWeb/WOSession.m	2838dafb7c9f02ee141033403c30d4f829abe7e6
+++ sope-appserver/NGObjWeb/WOSession.m	b0d6df4a0c71d3c4293d7083c11f6e68c6f1a1b7
@@ -33,7 +33,7 @@
 #include "common.h"
 #include <string.h>
 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 #  define sel_get_name sel_getName
 #endif
 
============================================================
--- sope-appserver/NGObjWeb/common.h	da608eeb9694956da84ee937d6c0c173d1dd4fae
+++ sope-appserver/NGObjWeb/common.h	58229122fdf6292d149c90510ae7da9189e1945d
@@ -51,7 +51,7 @@
 #include <NGExtensions/NGLogging.h>
 #include <NGStreams/NGStreams.h>
 
-#if NeXT_RUNTIME || APPLE_RUNTIME
+#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__)
============================================================
--- sope-core/EOControl/EOKeyValueCoding.m	d767115c5d13fb624c1539a494784e306e50cabf
+++ sope-core/EOControl/EOKeyValueCoding.m	05026433be504cab09fddc130b615e848745d940
@@ -25,7 +25,7 @@
 
 #if GNU_RUNTIME
 
-#if __GNU_LIBOBJC__ == 20100911
+#if __GNU_LIBOBJC__ >= 20100911
 #  define sel_get_any_uid sel_getUid
 #  include <objc/runtime.h>
 #else
============================================================
--- sope-core/EOControl/EOValidation.m	ede5fb08ebc5632ee82f623db062870e065b9b80
+++ sope-core/EOControl/EOValidation.m	f575e0bc45b4da79fdca5286cda96f0880582dbb
@@ -24,7 +24,7 @@
 #include "EONull.h"
 #include "common.h"
 
-#if __GNU_LIBOBJC__ == 20100911
+#if __GNU_LIBOBJC__ >= 20100911
 #  define sel_get_any_uid sel_getUid
 #endif
 
============================================================
--- sope-core/EOControl/common.h	9423a5c5505561fc183924bdb2c82d55fabaf061
+++ sope-core/EOControl/common.h	b5d35a6e03c74d4b89c3fadeb4c11c8cd1f463e3
@@ -39,6 +39,12 @@
 #  endif
 #endif
 
+#if __GNU_LIBOBJC__ >= 20100911
+#  ifndef sel_eq
+#    define sel_eq(__A__,__B__) sel_isEqual(__A__,__B__)
+#  endif
+#endif
+
 #ifndef ASSIGN
 #  define ASSIGN(object, value) \
        ({id __object = (id)object;    \
============================================================
--- sope-core/NGExtensions/EOExt.subproj/EOQualifier+CtxEval.m	3e1ff61981b7b80fb4accdecfeaac668f32072d7
+++ sope-core/NGExtensions/EOExt.subproj/EOQualifier+CtxEval.m	6ac0c0db9c7e4448024ff260827e3e689eb6f8df
@@ -29,7 +29,7 @@
 #  import <objc/objc.h>
 #  import <extensions/objc-runtime.h>
 #elif GNUSTEP_BASE_LIBRARY
-#if __GNU_LIBOBJC__ == 20100911
+#if __GNU_LIBOBJC__ >= 20100911
 #  define sel_get_name sel_getName
 #  import <objc/runtime.h>
 #else
============================================================
--- sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m	53462c1d9ee5ecb4c97c13e24025a978deb77f78
+++ sope-core/NGExtensions/FdExt.subproj/NSNull+misc.m	1d6430c2ba315a51baa4319685843cd1f056552a
@@ -23,7 +23,7 @@
 #include "common.h"
 
 #if LIB_FOUNDATION_LIBRARY || GNUSTEP_BASE_LIBRARY
-#if __GNU_LIBOBJC__ == 20100911
+#if __GNU_LIBOBJC__ >= 20100911
 #  include <objc/runtime.h>
 #else
 #  include <objc/objc-api.h>
============================================================
--- sope-core/NGExtensions/NGBundleManager.m	afdb978b26102d2324760ad3249682c65e823172
+++ sope-core/NGExtensions/NGBundleManager.m	50ba07bbaf49fa4fe3a44639d91ad429b0509644
@@ -2005,7 +2005,7 @@ static BOOL debugLanguageLookup = NO;
   
   sprintf (buffer,
 	   "<%s %p fullPath: %s infoDictionary: %p loaded=%s>",
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) 
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) 
 	   (char*)class_getName([self class]),
 #else
 	   (char*)object_get_class_name(self),
============================================================
--- sope-core/NGExtensions/NGExtensions/NGMemoryAllocation.h	8eb6eb8e3bc0fcce9b21576022c1d85887f6af3e
+++ sope-core/NGExtensions/NGExtensions/NGMemoryAllocation.h	f12ec337b0c922ed7d8c7e9c2df57d77c549d7c1
@@ -22,7 +22,7 @@
 #ifndef __NGExtensions_NGMemoryAllocation_H__
 #define __NGExtensions_NGMemoryAllocation_H__
 
-#if __GNU_LIBOBJC__ != 20100911
+#if !(__GNU_LIBOBJC__ >= 20100911)
 #include <objc/objc-api.h>
 #endif
 
============================================================
--- sope-core/NGExtensions/common.h	819ac09f20d4c77e1f9bdcf21e2bf9368d59a8ba
+++ sope-core/NGExtensions/common.h	910ffba8b124c77068f3377db3b4809ce0912cc3
@@ -41,7 +41,7 @@
 #endif
 
 #if GNU_RUNTIME
-#if __GNU_LIBOBJC__ == 20100911
+#if __GNU_LIBOBJC__ >= 20100911
 #  include <objc/runtime.h>
 #else
 #  import <objc/objc-api.h>
============================================================
--- sope-core/NGStreams/common.h	6b3c6a2bb8aa5769aa7672be129daa8d958deed1
+++ sope-core/NGStreams/common.h	1c56c74d1481888e91d4540abb6c6af939e29760
@@ -40,7 +40,7 @@
 #endif
 
 #ifdef GNU_RUNTIME
-#if __GNU_LIBOBJC__ == 20100911
+#if __GNU_LIBOBJC__ >= 20100911
 #  include <objc/runtime.h>
 #else
 #  include <objc/objc-api.h>
============================================================
--- sope-gdl1/GDLAccess/EODatabaseFault.m	39a385b41e25a05b2c6de3db4812b695f0246db9
+++ sope-gdl1/GDLAccess/EODatabaseFault.m	d43e06ab7a0dcede51cf94b5fe50d87481cb0b05
@@ -66,7 +66,7 @@ typedef struct {
     
     if (fault == nil)
         return nil;
-#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) 
+#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) || (__GNU_LIBOBJC__ >= 20100911)
     if (class_getInstanceSize([fault class]) < class_getInstanceSize([self class])) {
 #else
 	if ([fault class]->instance_size < ((Class)self)->instance_size) {
@@ -77,7 +77,7 @@ typedef struct {
 		       @"Instances from class %@ must be at least %d in size "
 		       @"to fault",
 		       NSStringFromClass([fault class]),
-#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) || (__GNU_LIBOBJC__ >= 20100911)
 		       class_getInstanceSize([self class])];
 #else
 			   ((Class)self)->instance_size];
@@ -132,7 +132,7 @@ typedef struct {
     
   fault = [NSMutableArray allocWithZone:zone];
 
-#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) 
+#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) || (__GNU_LIBOBJC__ >= 20100911)
   if (class_getInstanceSize([fault class]) < class_getInstanceSize([self class])) {
 #else
   if ([fault class]->instance_size < ((Class)(self))->instance_size) {
@@ -143,7 +143,7 @@ typedef struct {
                     @"Instances from class %s must be at least %d "
                     @"in size to fault",
                     NSStringFromClass([fault class]),
-#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) 
+#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) || (__GNU_LIBOBJC__ >= 20100911)
                     class_getInstanceSize([self class])];
 #else
 					((Class)self)->instance_size];
============================================================
--- sope-gdl1/GDLAccess/EOFault.m	48205793ddd1c54063e556c73bfe296bb5e08ab4
+++ sope-gdl1/GDLAccess/EOFault.m	fe711c2f7711ea6ab487eae9c5bfe744dee7a514
@@ -38,7 +38,7 @@ typedef struct {
     Class isa;
 } *my_objc_object;
 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 #  warning TODO: implement for NeXT/Apple runtime!
 #  define object_is_instance(object) (object!=nil?YES:NO)
 #  define class_get_super_class class_getSuperclass
@@ -51,7 +51,7 @@ typedef struct objc_method      *Method_
       ((object!=nil)&&CLS_ISCLASS(((my_objc_object)object)->isa))
 #endif
 
-#if __GNU_LIBOBJC__ == 20100911
+#if __GNU_LIBOBJC__ >= 20100911
 #  define METHOD_NULL NULL
 #  define class_get_super_class class_getSuperclass
 #  define object_is_instance(object) (object!=nil?YES:NO)
@@ -111,7 +111,7 @@ typedef struct objc_method      *Method_
   if (fault == nil) return NO;
   if (EOFaultClass == Nil) EOFaultClass = [EOFault class];
 
-#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__) || (__GNU_LIBOBJC__ >= 20100911)
   for (clazz = ((EOFault *)fault)->isa; clazz; clazz = class_getSuperclass(clazz)) {
 #else
   for (clazz = ((EOFault *)fault)->isa; clazz; clazz = clazz->super_class) {
============================================================
--- sope-gdl1/GDLAccess/EOFaultHandler.m	2e2b559fdca27b14229dbe71a0b27d7f49a2bec9
+++ sope-gdl1/GDLAccess/EOFaultHandler.m	af382885f12b5524ac6af6fe6ebe83f1f71764a0
@@ -29,7 +29,7 @@
 #include "EOFault.h"
 #include "common.h"
 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 #  define METHOD_NULL NULL
 #  define class_get_super_class class_getSuperclass
 #  define object_is_instance(object) (object!=nil?YES:NO)
@@ -47,6 +47,9 @@ typedef struct objc_method      *Method_
 #  define class_get_instance_method class_getInstanceMethod
 #endif
 
+#if !(__GNU_LIBOBJC__ >= 20100911)
+#  define sel_getTypeEncoding(selector) ((selector)->sel_types)
+#endif
 
 @implementation EOFaultHandler
 
@@ -114,7 +117,7 @@ typedef struct objc_method      *Method_
 - (BOOL)conformsToProtocol:(Protocol *)_protocol forFault:(EOFault *)_fault {
   Class class, sClass;
 
-#if GNU_RUNTIME && !defined(__GNUSTEP_RUNTIME__) && __GNU_LIBOBJC__ != 20100911
+#if GNU_RUNTIME && !defined(__GNUSTEP_RUNTIME__) && !(__GNU_LIBOBJC__ >= 20100911)
   struct objc_protocol_list* protos;
   int i;
   
@@ -181,7 +184,7 @@ typedef struct objc_method      *Method_
 
   /* first check for EOFault's own methods */
 
-#if __GNU_LIBOBJC__ != 20100911
+#if !(__GNU_LIBOBJC__ >= 20100911)
   if (types == NULL) {
     // lookup method for selector
     struct objc_method *mth;
@@ -202,7 +205,7 @@ typedef struct objc_method      *Method_
 #if GNU_RUNTIME
   // GNU runtime selectors may be typed, a lookup may not be necessary
   if (types == NULL)
-    types = _selector->sel_types;
+    types = sel_getTypeEncoding(_selector);
 #endif
   if (types == NULL)
     return nil;
============================================================
--- sope-gdl1/GDLAccess/EOKeyComparisonQualifier+SQL.m	be0a5114f5e53f3667f56ac464807f2501d229c5
+++ sope-gdl1/GDLAccess/EOKeyComparisonQualifier+SQL.m	6bd2a6d106a2975a76bc8faa6cb15a0301b7a9a2
@@ -28,12 +28,6 @@
 #import "EOSQLQualifier.h"
 #include "common.h"
 
-#if NeXT_RUNTIME || APPLE_RUNTIME
-#  ifndef SEL_EQ
-#    define SEL_EQ(__A__,__B__) (__A__==__B__?YES:NO)
-#  endif
-#endif
-
 @implementation EOKeyComparisonQualifier(SQLQualifier)
 
 /* SQL qualifier generation */
============================================================
--- sope-gdl1/GDLAccess/EORecordDictionary.m	e3f92f26a9a7773ef40d641b1de8623f911da1a1
+++ sope-gdl1/GDLAccess/EORecordDictionary.m	3b82ce2c21444a2db1eae92ab582b47b2ad85f78
@@ -39,7 +39,7 @@
 #  include <NGExtensions/NGObjectMacros.h>
 #endif
 
-#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ == 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
+#if (defined(__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20100911)) || defined(APPLE_RUNTIME) || defined(__GNUSTEP_RUNTIME__)
 #  include <objc/runtime.h>
 #  define method_get_imp method_getImplementation
 #  define class_get_instance_method class_getInstanceMethod
============================================================
--- sope-gdl1/GDLAccess/common.h	dc86e9e1d1625a95619642863250ad950ba74a51
+++ sope-gdl1/GDLAccess/common.h	c9e30b6f0d38f32f695b4ceb3d56184ebff28c7f
@@ -50,8 +50,18 @@
 
 #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
============================================================
--- sope-ldap/NGLdap/EOQualifier+LDAP.m	8ec13c777164cced9931fa91c43830905676a25b
+++ sope-ldap/NGLdap/EOQualifier+LDAP.m	de0e7b85962429e229eb6e23f71d41f09443b80b
@@ -26,6 +26,10 @@
 #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;
============================================================
--- sope-mime/NGImap4/imCommon.h	ff80057bc0474f1dd3bcfcff7a7fbb39117d18f9
+++ sope-mime/NGImap4/imCommon.h	f8376f722d03b0812bc9b9aab263c1e75252811f
@@ -43,6 +43,12 @@
 #  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;
sope_gcc_4_7.diff (27,092 bytes)   
kwirk

kwirk

2012-04-13 21:12

reporter   ~0003738

I can also confirm that the attached patch, "sope_gcc_4_7.diff", resolved the issue. Tested on ArchLinux which also recently switched to GCC 4.7.0.

ludovic

ludovic

2012-05-09 15:57

administrator   ~0003876

Patch pushed: http://mtn.inverse.ca/revision/diff/6f6c97530e1ca62307245ec25b6fab1b9399f99d/with/0681181778150eed5fe08a39588d7884861cdbf2

Issue History

Date Modified Username Field Change
2012-04-09 16:18 avoegele New Issue
2012-04-09 16:18 avoegele File Added: sope_gcc_4_7.diff
2012-04-13 21:12 kwirk Note Added: 0003738
2012-05-09 15:44 ludovic Target Version => 1.3.15
2012-05-09 15:57 ludovic Note Added: 0003876
2012-05-09 15:57 ludovic Status new => resolved
2012-05-09 15:57 ludovic Fixed in Version => 1.3.15
2012-05-09 15:57 ludovic Resolution open => fixed
2012-05-09 15:57 ludovic Assigned To => ludovic
2012-05-09 15:57 ludovic Status resolved => closed