Fix some easy OS3 linker errors

This commit is contained in:
Chris Young 2015-01-18 23:29:49 +00:00
parent 201bc569a4
commit 392fa2ea4c
5 changed files with 26 additions and 4 deletions

View File

@ -4,7 +4,11 @@
# Force using glibc internal iconv implementation instead of external libiconv
# Valid options: YES, NO
NETSURF_USE_LIBICONV_PLUG := YES
ifneq ($(SUBTARGET),os3)
NETSURF_USE_LIBICONV_PLUG := YES
else
NETSURF_USE_LIBICONV_PLUG := NO
endif
# Enable NetSurf's use of librosprite for displaying RISC OS Sprites
# Valid options: YES, NO, AUTO

View File

@ -53,7 +53,7 @@ else
LDFLAGS += -L$(GCCSDK_INSTALL_ENV)/lib
ifeq ($(SUBTARGET),os3)
LDFLAGS += -lpbl -liconv
LDFLAGS += -lpbl -liconv -lamiga
else
LDFLAGS += -lpbl -liconv
endif

View File

@ -16,6 +16,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "amiga/os3support.h"
#include "amiga/help.h"
/* AmigaGuide class */

View File

@ -74,7 +74,11 @@
#define GraphicsBase GfxBase /* graphics.library is a bit weird */
#ifdef __amigaos4__
AMINS_LIB_STRUCT(Application);
#else
struct UtilityBase *UtilityBase; /* AMINS_LIB_STRUCT(Utility) */
#endif
AMINS_LIB_STRUCT(Asl);
AMINS_LIB_STRUCT(DataTypes);
AMINS_LIB_STRUCT(Diskfont);
@ -113,7 +117,14 @@ AMINS_LIB_STRUCT(Window);
bool ami_libs_open(void)
{
#ifdef __amigaos4__
/* Libraries only needed on OS4 */
AMINS_LIB_OPEN("application.library", 53, Application, "application", 2, false)
#else
/* Libraries we get automatically on OS4 but not OS3 */
AMINS_LIB_OPEN("utility.library", 37, Utility, "main", 1, true)
#endif
/* Standard libraries for both versions */
AMINS_LIB_OPEN("asl.library", 37, Asl, "main", 1, true)
AMINS_LIB_OPEN("datatypes.library", 37, DataTypes, "main", 1, true)
AMINS_LIB_OPEN("diskfont.library", 40, Diskfont, "main", 1, true)
@ -191,7 +202,6 @@ void ami_libs_close(void)
AMINS_LIB_CLOSE(String)
AMINS_LIB_CLOSE(Window)
AMINS_LIB_CLOSE(Application)
AMINS_LIB_CLOSE(Asl)
AMINS_LIB_CLOSE(DataTypes)
AMINS_LIB_CLOSE(Diskfont)
@ -205,5 +215,10 @@ void ami_libs_close(void)
AMINS_LIB_CLOSE(Locale)
AMINS_LIB_CLOSE(P96)
AMINS_LIB_CLOSE(Workbench)
#ifdef __amigaos4__
AMINS_LIB_CLOSE(Application)
#else
AMINS_LIB_CLOSE(Utility)
#endif
}

View File

@ -47,9 +47,9 @@
/* Macros */
#define IsMinListEmpty(L) (L)->mlh_Head->mln_Succ == 0
#define LIB_IS_AT_LEAST(B,V,R) ((B)->lib_Version>(V)) || \
((B)->lib_Version==(V) && (B)->lib_Revision>=(R))
#define EAD_IS_FILE(E) ((E)->ed_Type<0)
/* Define extra memory type flags */
#define MEMF_PRIVATE MEMF_ANY
@ -136,6 +136,7 @@
#define SetRPAttrs(...) (void)0 /*\todo Probably need to emulate this */
/* Intuition */
#define ICoerceMethod CoerceMethod
#define IDoMethod DoMethod
#define IDoMethodA DoMethodA
#define IDoSuperMethodA DoSuperMethodA