Index: src/OFApplication.m ================================================================== --- src/OFApplication.m +++ src/OFApplication.m @@ -53,12 +53,14 @@ #elif defined(OF_WINDOWS) # include extern int _CRT_glob; extern void __wgetmainargs(int *, wchar_t ***, wchar_t ***, int, int *); #elif defined(OF_AMIGAOS) +# define Class IntuitionClass # include # include +# undef Class #elif !defined(OF_IOS) extern char **environ; #endif #ifdef OF_PSP Index: src/OFFile.m ================================================================== --- src/OFFile.m +++ src/OFFile.m @@ -46,12 +46,14 @@ #ifdef OF_WINDOWS # include #endif #ifdef OF_AMIGAOS +# define Class IntuitionClass # include # include +# undef Class #endif #ifdef OF_WII # include #endif Index: src/OFFileIRIHandler.m ================================================================== --- src/OFFileIRIHandler.m +++ src/OFFileIRIHandler.m @@ -82,13 +82,15 @@ # include # include #endif #ifdef OF_AMIGAOS +# define Class IntuitionClass # include # include # include +# undef Class # ifdef OF_AMIGAOS4 # define DeleteFile(path) Delete(path) # endif #endif Index: src/OFFileManager.m ================================================================== --- src/OFFileManager.m +++ src/OFFileManager.m @@ -66,12 +66,14 @@ # include # include #endif #ifdef OF_AMIGAOS +# define Class IntuitionClass # include # include +# undef Class #endif #ifdef OF_MINT # include #endif Index: src/OFKernelEventObserver.m ================================================================== --- src/OFKernelEventObserver.m +++ src/OFKernelEventObserver.m @@ -46,11 +46,13 @@ #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" #ifdef OF_AMIGAOS +# define Class IntuitionClass # include +# undef Class #endif @implementation OFKernelEventObserver @synthesize delegate = _delegate; #ifdef OF_AMIGAOS Index: src/OFLocale.m ================================================================== --- src/OFLocale.m +++ src/OFLocale.m @@ -28,13 +28,15 @@ #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOpenItemFailedException.h" #ifdef OF_AMIGAOS +# define Class IntuitionClass # include # include # include +# undef Class #endif static OFLocale *currentLocale = nil; static OFDictionary *operatorPrecedences = nil; Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -62,11 +62,13 @@ #ifdef OF_WINDOWS # include #endif #ifdef OF_AMIGAOS +# define Class IntuitionClass # include +# undef Class #endif #ifdef OF_APPLE_RUNTIME extern id _Nullable _objc_rootAutorelease(id _Nullable object); #endif Index: src/OFOnce.m ================================================================== --- src/OFOnce.m +++ src/OFOnce.m @@ -22,11 +22,13 @@ # import "OFAtomic.h" # import "OFPlainMutex.h" #endif #ifdef OF_AMIGAOS +# define Class IntuitionClass # include +# undef Class #endif void OFOnce(OFOnceControl *control, void (*function)(void)) { Index: src/OFSelectKernelEventObserver.m ================================================================== --- src/OFSelectKernelEventObserver.m +++ src/OFSelectKernelEventObserver.m @@ -36,11 +36,13 @@ #import "OFInitializationFailedException.h" #import "OFObserveKernelEventsFailedException.h" #import "OFOutOfRangeException.h" #ifdef OF_AMIGAOS +# define Class IntuitionClass # include +# undef Class #endif #ifdef OF_HPUX /* FD_SET causes warnings on HP-UX/IA64. */ # pragma GCC diagnostic ignored "-Wstrict-aliasing" Index: src/OFSocket.m ================================================================== --- src/OFSocket.m +++ src/OFSocket.m @@ -51,11 +51,13 @@ #ifdef HAVE_NET_IF_H # include #endif #ifdef OF_AMIGAOS +# define Class IntuitionClass # include +# undef Class #endif #ifdef OF_NINTENDO_3DS # include <3ds/types.h> # include <3ds/services/soc.h> Index: src/OFStdIOStream.m ================================================================== --- src/OFStdIOStream.m +++ src/OFStdIOStream.m @@ -45,12 +45,14 @@ #ifdef OF_IOS # undef HAVE_ISATTY #endif #ifdef OF_AMIGAOS +# define Class IntuitionClass # include # include +# undef Class # undef HAVE_ISATTY #endif #ifdef OF_WII_U # define BOOL WUT_BOOL Index: src/OFSystemInfo.m ================================================================== --- src/OFSystemInfo.m +++ src/OFSystemInfo.m @@ -29,12 +29,14 @@ #if defined(OF_MACOS) || defined(OF_IOS) || defined(OF_NETBSD) # include #endif #ifdef OF_AMIGAOS +# define Class IntuitionClass # include # include +# undef Class #endif #if defined(OF_AMIGAOS4) # include #elif defined(OF_MORPHOS) Index: src/OFThread.m ================================================================== --- src/OFThread.m +++ src/OFThread.m @@ -30,12 +30,14 @@ #include "unistd_wrapper.h" #include "platform.h" #ifdef OF_AMIGAOS +# define Class IntuitionClass # include # include +# undef Class #endif #ifdef OF_WII # define nanosleep ogc_nanosleep # include Index: src/libbases.m ================================================================== --- src/libbases.m +++ src/libbases.m @@ -13,11 +13,13 @@ * file. */ #include "config.h" +#define Class IntuitionClass #include +#undef Class #import "OFInitializationFailedException.h" #import "macros.h" Index: src/platform/AmigaOS/OFPlainCondition.m ================================================================== --- src/platform/AmigaOS/OFPlainCondition.m +++ src/platform/AmigaOS/OFPlainCondition.m @@ -17,15 +17,17 @@ #include #import "OFPlainCondition.h" +#define Class IntuitionClass #include #include #ifndef OF_AMIGAOS4 # include #endif +#undef Class int OFPlainConditionNew(OFPlainCondition *condition) { condition->waitingTasks = NULL; Index: src/platform/AmigaOS/OFPlainMutex.m ================================================================== --- src/platform/AmigaOS/OFPlainMutex.m +++ src/platform/AmigaOS/OFPlainMutex.m @@ -17,11 +17,13 @@ #include #import "OFPlainMutex.h" +#define Class IntuitionClass #include +#undef Class int OFPlainMutexNew(OFPlainMutex *mutex) { InitSemaphore(mutex); Index: src/platform/AmigaOS/OFPlainThread.m ================================================================== --- src/platform/AmigaOS/OFPlainThread.m +++ src/platform/AmigaOS/OFPlainThread.m @@ -20,13 +20,15 @@ #import "OFPlainThread.h" #import "OFData.h" #import "OFString.h" #import "OFTLSKey.h" +#define Class IntuitionClass #include #include #include +#undef Class #ifndef OF_MORPHOS extern void OFTLSKeyThreadExited(void); #endif static OFTLSKey threadKey; Index: src/platform/AmigaOS/OFTLSKey.m ================================================================== --- src/platform/AmigaOS/OFTLSKey.m +++ src/platform/AmigaOS/OFTLSKey.m @@ -15,12 +15,14 @@ #include "config.h" #import "OFTLSKey.h" +#define Class IntuitionClass #include #include +#undef Class /* * As we use this file in both the runtime and ObjFW, and since AmigaOS always * has the runtime, use the hashtable from the runtime. */ Index: src/runtime/amiga-library.m ================================================================== --- src/runtime/amiga-library.m +++ src/runtime/amiga-library.m @@ -18,14 +18,16 @@ #import "ObjFWRT.h" #import "private.h" #import "amiga-glue.h" +#define Class IntuitionClass #include #include #include #include +#undef Class #define CONCAT_VERSION2(major, minor) #major "." #minor #define CONCAT_VERSION(major, minor) CONCAT_VERSION2(major, minor) #define VERSION_STRING CONCAT_VERSION(OBJFWRT_LIB_MAJOR, OBJFWRT_LIB_MINOR) Index: src/runtime/linklib/init.m ================================================================== --- src/runtime/linklib/init.m +++ src/runtime/linklib/init.m @@ -17,12 +17,14 @@ #import "ObjFWRT.h" #import "private.h" #import "macros.h" +#define Class IntuitionClass #include #include +#undef Class struct ObjFWRTBase; #include #include Index: src/runtime/misc.m ================================================================== --- src/runtime/misc.m +++ src/runtime/misc.m @@ -25,18 +25,18 @@ #ifdef OF_WINDOWS # include #endif #ifdef OF_AMIGAOS +# define Class IntuitionClass # define USE_INLINE_STDARG # include # include # define __NOLIBBASE__ -# define Class IntuitionClass # include -# undef Class # undef __NOLIBBASE__ +# undef Class #endif static objc_enumeration_mutation_handler enumerationMutationHandler = NULL; void