Bug 61531 - fbzx-1.4 won't work on PPC
Bug#: 61531 Product:  Gentoo Linux Version: unspecified Platform: PPC
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: games@gentoo.org Reported By: mat@esi.com.pl
Component: Games
URL: 
Summary: fbzx-1.4 won't work on PPC
Keywords:  
Status Whiteboard: 
Opened: 2004-08-24 09:52 0000
Description:   Opened: 2004-08-24 09:52 0000
While the program compiles fine it lacks the necessary changes described in
PORTS file to work properly on PPC (and other big-endian system).

Reproducible: Always
Steps to Reproduce:
1.
2.
3.




So I did a little patch that solved the problem for me. 
 
--------------------------------------------------- fbzx-1.4-endian_patch 
--- fbzx/Z80.h  2003-12-19 21:37:22.000000000 +0100 
+++ fbzx.new/Z80.h      2004-08-24 18:26:50.696481080 +0200 
@@ -12,7 +12,10 @@ 
 /*************************************************************/ 
 #ifndef Z80_H 
 #define Z80_H 
+#include <endian.h> 
+#if __BYTE_ORDER == __LITTLE_ENDIAN 
 #define LSB_FIRST 
+#endif 
                                /* Compilation options:       */ 
 /* #define DEBUG */            /* Compile debugging version  */ 
 /* #define LSB_FIRST */        /* Compile for low-endian CPU */ 
-------------------------------------------------------------------------

------- Comment #1 From Maciej J. Woloszyk 2004-08-24 09:58:25 0000 -------
Created an attachment (id=38104) [details]
fbzx-1.4-endian_patch

------- Comment #2 From Chris Gianelloni (RETIRED) 2004-08-24 10:14:00 0000 -------
Have you checked if this has been fixed upstream?

I only ask so that we know if we should submit the patch to them or not... =]

------- Comment #3 From Maciej J. Woloszyk 2004-08-24 10:20:09 0000 -------
No. I didn't checked as I don't think author of fbzx considers it a bug. There
is a note in PORTS readme stating that when you compile it on big-endian
machine you should remove one #define. What I did is the extension of this
note to automate the build.

------- Comment #4 From SpanKY 2004-08-26 19:58:18 0000 -------
awesome, thanks again

gonna try to contact upstream author ...