diff --git a/Source/Additions/GSObjCRuntime.m b/Source/Additions/GSObjCRuntime.m index 8324714d1..d60e3c662 100644 --- a/Source/Additions/GSObjCRuntime.m +++ b/Source/Additions/GSObjCRuntime.m @@ -156,9 +156,9 @@ GSSelectorFromNameAndTypes(const char *name, const char *types) { #if NeXT_RUNTIME return sel_getUid(name); -#elif defined (__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20110608) - return sel_registerTypedName(name, types); #elif defined (__GNUSTEP_RUNTIME__) + return sel_registerTypedName(name, types); +#elif defined (__GNU_LIBOBJC__) && (__GNU_LIBOBJC__ >= 20110608) return sel_registerTypedName_np(name, types); #else extern SEL sel_get_any_typed_uid(const char*); @@ -203,9 +203,9 @@ GSTypesFromSelector(SEL sel) { #if NeXT_RUNTIME return 0; -#elif defined (__GNU_LIBOBJC__) - return sel_getTypeEncoding(sel); #elif defined (__GNUSTEP_RUNTIME__) + return sel_getTypeEncoding(sel); +#elif defined (__GNU_LIBOBJC__) return sel_getType_np(sel); #else if (sel == 0) diff --git a/Source/GSFFIInvocation.m b/Source/GSFFIInvocation.m index 98a8d50d2..88ce1a3fb 100644 --- a/Source/GSFFIInvocation.m +++ b/Source/GSFFIInvocation.m @@ -69,7 +69,7 @@ static void GSFFIInvocationCallback(ffi_cif*, void*, void **, void*); case. */ GS_STATIC_INLINE SEL gs_find_best_typed_sel (SEL sel) -#ifdef __GNUSTEP_RUNTIME__ +#ifdef __GNU_LIBOBJC__ { const char *selName = sel_getName(sel); const char *types; @@ -83,7 +83,7 @@ gs_find_best_typed_sel (SEL sel) sel_copyTypes_np (selName, &types, 1); return GSSelectorFromNameAndTypes(selName, types); } -#elif defined (__GNU_LIBOBJC__) +#elif defined (__GNUSTEP_RUNTIME__) { /* The sel_getTypedSelector() function returns a typed selector if there * is only one, nul if there are zero or more tha one. diff --git a/Source/NSException.m b/Source/NSException.m index 9c187977c..2fcee7ee3 100644 --- a/Source/NSException.m +++ b/Source/NSException.m @@ -43,6 +43,10 @@ #import "GSPThread.h" +#ifdef __GNU_LIBOBJC__ +#include +#endif + #ifdef __GNUSTEP_RUNTIME__ #include #endif diff --git a/Source/objc-load.m b/Source/objc-load.m index c57b96627..a53a0bee7 100644 --- a/Source/objc-load.m +++ b/Source/objc-load.m @@ -282,7 +282,7 @@ NSString *GSPrivateSymbolPath(Class theClass) if (theClass != nil) { const char *prefix -#if __OBJC_GNUSTEP_RUNTIME_ABI__ >= 20 +#ifdef __GNU_LIBOBJC__ = "._OBJC_CLASS_"; #else = "__objc_class_name_";