Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -41,15 +41,12 @@ #import "macros.h" #if defined(OF_OBJFW_RUNTIME) # import #elif defined(OF_OLD_GNU_RUNTIME) -# import # import # import -#else -# import #endif #ifdef _WIN32 # include #endif @@ -60,18 +57,10 @@ # import "atomic.h" #elif defined(OF_THREADS) # import "threading.h" #endif -/* A few macros to reduce #ifdefs */ -#ifdef OF_OLD_GNU_RUNTIME -# define class_getInstanceSize class_get_instance_size -# define class_getName class_get_class_name -# define class_getSuperclass class_get_super_class -# define sel_registerName sel_get_uid -#endif - struct pre_ivar { void **memoryChunks; unsigned int memoryChunksSize; int32_t retainCount; #if !defined(OF_ATOMIC_OPS) Index: src/OFXMLElement+Serialization.m ================================================================== --- src/OFXMLElement+Serialization.m +++ src/OFXMLElement+Serialization.m @@ -14,28 +14,20 @@ * file. */ #include "config.h" -#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME) -# import -#elif defined(OF_OLD_GNU_RUNTIME) -# import -#endif - #import "OFXMLElement.h" #import "OFXMLElement+Serialization.h" #import "OFSerialization.h" #import "OFString.h" #import "OFAutoreleasePool.h" #import "OFInvalidArgumentException.h" #import "OFNotImplementedException.h" -#if defined(OF_OBJFW_RUNTIME) || defined(OF_OLD_GNU_RUNTIME) -# define objc_lookUpClass objc_lookup_class -#endif +#import "macros.h" int _OFXMLElement_Serialization_reference; @implementation OFXMLElement (Serialization) - (id)objectByDeserializing Index: src/exceptions/common.h ================================================================== --- src/exceptions/common.h +++ src/exceptions/common.h @@ -14,19 +14,10 @@ * file. */ #include -#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME) -# import -#endif - -#ifdef OF_OLD_GNU_RUNTIME -# import -# define sel_getName(x) sel_get_name(x) -#endif - #ifndef _WIN32 #if !defined(HAVE_THREADSAFE_GETADDRINFO) && !defined(_PSP) # include #endif # include Index: src/macros.h ================================================================== --- src/macros.h +++ src/macros.h @@ -23,10 +23,16 @@ # define __STDC_CONSTANT_MACROS #endif #include #include + +#if defined(OF_APPLE_RUNTIME) || defined(OF_GNU_RUNTIME) +# import +#elif defined(OF_OLD_GNU_RUNTIME) +# import +#endif #ifdef _PSP # define INTMAX_MAX LONG_LONG_MAX #endif @@ -74,10 +80,22 @@ # define OF_PPC_ASM # elif defined(__arm__) || defined(__ARM__) # define OF_ARM_ASM # endif #endif + +#if defined(OF_OLD_GNU_RUNTIME) || defined(OF_OBJFW_RUNTIME) +# define objc_lookUpClass objc_lookup_class +#endif + +#ifdef OF_OLD_GNU_RUNTIME +# define class_getInstanceSize class_get_instance_size +# define class_getName class_get_class_name +# define class_getSuperclass class_get_super_class +# define sel_getName sel_get_name +# define sel_registerName sel_get_uid +#endif #ifndef _WIN32 # define OF_PATH_DELIMITER '/' #else # define OF_PATH_DELIMITER '\\'