Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -88,10 +88,25 @@ #if defined(__clang__) || __GCC_VERSION__ >= 406 # define OF_SENTINEL __attribute__((sentinel)) #else # define OF_SENTINEL #endif + +#ifdef OF_APPLE_RUNTIME +# if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \ + defined(__ppc__) +# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR +# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET +# endif +#else +# ifdef __ELF__ +# if defined(__amd64__) || defined(__x86_64__) || defined(__i386__) || \ + defined(__arm__) || defined(__ARM__) +# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR +# endif +# endif +#endif #if __has_feature(objc_arc) # define OF_RETURNS_RETAINED __attribute__((ns_returns_retained)) # define OF_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) # define OF_RETURNS_INNER_POINTER __attribute__((objc_returns_inner_pointer)) Index: src/macros.h ================================================================== --- src/macros.h +++ src/macros.h @@ -104,25 +104,10 @@ # define OF_ARMV6_ASM # endif # endif #endif -#ifdef OF_APPLE_RUNTIME -# if defined(__x86_64__) || defined(__i386__) || defined(__arm__) || \ - defined(__ppc__) -# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR -# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR_STRET -# endif -#else -# ifdef __ELF__ -# if defined(__amd64__) || defined(__x86_64__) || defined(__i386__) || \ - defined(__arm__) || defined(__ARM__) -# define OF_HAVE_FORWARDING_TARGET_FOR_SELECTOR -# endif -# endif -#endif - #define OF_ENSURE(cond) \ if (!(cond)) { \ fprintf(stderr, "Failed to ensure condition in " \ __FILE__ ":%d:\n" #cond "\n", __LINE__); \ abort(); \