From 4785ea2b9af8c07b83bfbbc81fe61eb905459830 Mon Sep 17 00:00:00 2001 From: cebix <> Date: Fri, 9 Feb 2001 20:04:15 +0000 Subject: [PATCH] fixed compilation problems under BeOS --- BasiliskII/src/BeOS/Makefile | 2 +- BasiliskII/src/BeOS/clip_beos.cpp | 2 +- BasiliskII/src/BeOS/extfs_beos.cpp | 4 ++-- BasiliskII/src/BeOS/sysdeps.h | 4 ++++ BasiliskII/src/uae_cpu/fpu_x86.cpp | 1 + 5 files changed, 9 insertions(+), 4 deletions(-) diff --git a/BasiliskII/src/BeOS/Makefile b/BasiliskII/src/BeOS/Makefile index 906b9972..fef67f62 100644 --- a/BasiliskII/src/BeOS/Makefile +++ b/BasiliskII/src/BeOS/Makefile @@ -33,7 +33,7 @@ TYPE= APP MACHINE=$(shell uname -m) ifeq ($(MACHINE), BePC) CPUSRCS = ../uae_cpu/basilisk_glue.cpp ../uae_cpu/memory.cpp ../uae_cpu/newcpu.cpp \ - ../uae_cpu/readcpu.cpp ../uae_cpu/fpp.cpp cpustbl.cpp cpudefs.cpp cpufast.s + ../uae_cpu/readcpu.cpp ../uae_cpu/fpu_x86.cpp cpustbl.cpp cpudefs.cpp cpufast.s else # CPUSRCS = ../powerrom_cpu/powerrom_cpu.cpp CPUSRCS = ../uae_cpu/basilisk_glue.cpp ../uae_cpu/newcpu.cpp \ diff --git a/BasiliskII/src/BeOS/clip_beos.cpp b/BasiliskII/src/BeOS/clip_beos.cpp index 75046ca4..e1f170c9 100644 --- a/BasiliskII/src/BeOS/clip_beos.cpp +++ b/BasiliskII/src/BeOS/clip_beos.cpp @@ -73,7 +73,7 @@ void PutScrap(uint32 type, void *scrap, int32 length) if (no_clip_conversion) { // Only convert CR->LF - char *buf = new char[dest_length]; + char *buf = new char[length]; for (int i=0; i 0) { // Translate MIME type to MacOS type/creator - char mactype[4]; + uint8 mactype[4]; if (sscanf(mime, "application/x-MacOS-%c%c%c%c", mactype, mactype+1, mactype+2, mactype+3) == 4) { // MacOS style type - WriteMacInt32(finfo + fdType, mactype); + WriteMacInt32(finfo + fdType, (mactype[0] << 24) | (mactype[1] << 16) | (mactype[2] << 8) | mactype[3]); } else { diff --git a/BasiliskII/src/BeOS/sysdeps.h b/BasiliskII/src/BeOS/sysdeps.h index d64338c4..990abbd2 100644 --- a/BasiliskII/src/BeOS/sysdeps.h +++ b/BasiliskII/src/BeOS/sysdeps.h @@ -91,6 +91,8 @@ static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {__asm__ ("rolw $8,%0" #endif #define X86_ASSEMBLY +#define UNALIGNED_PROFITABLE +#define OPTIMIZED_FLAGS #define ASM_SYM_FOR_FUNC(a) __asm__(a) #define REGPARAM __attribute__((regparm(3))) @@ -103,6 +105,8 @@ static inline void do_put_mem_long(uae_u32 *a, uae_u32 v) {*a = v;} static inline void do_put_mem_word(uae_u16 *a, uae_u32 v) {*a = v;} #undef X86_ASSEMBLY +#define UNALIGNED_PROFITABLE +#undef OPTIMIZED_FLAGS #define ASM_SYM_FOR_FUNC(a) #define REGPARAM #endif diff --git a/BasiliskII/src/uae_cpu/fpu_x86.cpp b/BasiliskII/src/uae_cpu/fpu_x86.cpp index b24d2ccc..d530dbb5 100644 --- a/BasiliskII/src/uae_cpu/fpu_x86.cpp +++ b/BasiliskII/src/uae_cpu/fpu_x86.cpp @@ -129,6 +129,7 @@ #include #include +#include #include "sysdeps.h" #include "memory.h"