From bb9d23d04041e4647a2d8c71a98e0bb30defa3ce Mon Sep 17 00:00:00 2001 From: Chris Young Date: Sun, 25 Jan 2015 01:06:46 +0000 Subject: Fix build on OS3 --- amiga/libs.c | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) (limited to 'amiga/libs.c') diff --git a/amiga/libs.c b/amiga/libs.c index 6e9bcf9e0..da47010b5 100644 --- a/amiga/libs.c +++ b/amiga/libs.c @@ -27,6 +27,30 @@ #include #include +#ifndef __amigaos4__ +/* OS3 needs these for the XXXX_GetClass() functions */ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#endif + #ifdef __amigaos4__ #define AMINS_LIB_OPEN(LIB, LIBVER, PREFIX, INTERFACE, INTVER, FAIL) \ LOG(("Opening %s v%d", LIB, LIBVER)); \ @@ -93,14 +117,14 @@ } #define AMINS_LIB_CLOSE(PREFIX) \ - if(PREFIX##Base) CloseLibrary(PREFIX##Base); + if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base); #define AMINS_LIB_STRUCT(PREFIX) \ struct PREFIX##Base *PREFIX##Base; #define AMINS_CLASS_OPEN(CLASS, CLASSVER, PREFIX, CLASSGET, NEEDINTERFACE) \ LOG(("Opening %s v%d", CLASS, CLASSVER)); \ - if((PREFIX##Base = (struct PREFIX##Base *)OpenLibrary(CLASS, CLASSVER))) { \ + if((PREFIX##Base = OpenLibrary(CLASS, CLASSVER))) { \ PREFIX##Class = CLASSGET##_GetClass(); \ } else { \ STRPTR error = ASPrintf("Unable to open %s v%d (fatal error)", CLASS, CLASSVER); \ @@ -110,10 +134,10 @@ } #define AMINS_CLASS_CLOSE(PREFIX) \ - if(PREFIX##Base) CloseLibrary((struct Library *)PREFIX##Base); + if(PREFIX##Base) CloseLibrary(PREFIX##Base); #define AMINS_CLASS_STRUCT(PREFIX) \ - struct PREFIX##Base *PREFIX##Base; \ + struct Library *PREFIX##Base; \ Class *PREFIX##Class; #endif -- cgit v1.2.3