From 761efbcc762149b56014e6ff77aa16d0cd787aff Mon Sep 17 00:00:00 2001 From: Themaister Date: Mon, 7 Feb 2011 13:41:30 -0600 Subject: [PATCH] Fix build errors on GCC 4.0.x --- libco/libco.c | 3 +-- snes/ppu/background/background.hpp | 3 +-- snes/ppu/sprite/sprite.hpp | 3 +-- snes/ppu/window/window.hpp | 3 +-- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/libco/libco.c b/libco/libco.c index d98687a..a7aa532 100644 --- a/libco/libco.c +++ b/libco/libco.c @@ -8,8 +8,7 @@ #include "x86.c" #elif defined(__GNUC__) && defined(__amd64__) #include "amd64.c" -//#elif defined(__GNUC__) && defined(__powerpc__) && defined(__ELF__) -#elif defined(__GNUC__) && defined(__powerpc__) // Seems to run fine on PPC G5 OSX even when no __ELF__ is defined. +#elif defined(__GNUC__) && (defined(__powerpc__) || defined(__POWERPC__)) // Seems to run fine on PPC G5 OSX even when no __ELF__ is defined. #include "ppc.c" #elif defined(__GNUC__) #include "sjlj.c" diff --git a/snes/ppu/background/background.hpp b/snes/ppu/background/background.hpp index 8e0c4a7..36e3fc0 100644 --- a/snes/ppu/background/background.hpp +++ b/snes/ppu/background/background.hpp @@ -1,4 +1,4 @@ -class Background { +struct Background { struct ID { enum { BG1, BG2, BG3, BG4 }; }; unsigned id; @@ -69,5 +69,4 @@ class Background { Background(PPU &self, unsigned id); PPU &self; - friend class PPU; }; diff --git a/snes/ppu/sprite/sprite.hpp b/snes/ppu/sprite/sprite.hpp index b045b31..fb70a3c 100644 --- a/snes/ppu/sprite/sprite.hpp +++ b/snes/ppu/sprite/sprite.hpp @@ -1,4 +1,4 @@ -class Sprite { +struct Sprite { struct SpriteItem { uint16 x; uint16 y; @@ -77,5 +77,4 @@ class Sprite { Sprite(PPU &self); PPU &self; - friend class PPU; }; diff --git a/snes/ppu/window/window.hpp b/snes/ppu/window/window.hpp index 498a2a2..dabe402 100644 --- a/snes/ppu/window/window.hpp +++ b/snes/ppu/window/window.hpp @@ -1,4 +1,4 @@ -class Window { +struct Window { struct { bool bg1_one_enable; bool bg1_one_invert; @@ -84,5 +84,4 @@ class Window { Window(PPU &self); PPU &self; - friend class PPU; };