re-adding Linux on PowerPC support to Xvnc server code

Peter A. Castro yellowdog-general@lists.terrasoftsolutions.com
Wed Jul 17 22:33:01 2002


Hi All,
  (I'm not quite sure just who should get this patch, so I'm sending it to
several, hopefully, relevent lists).
  I've been wrestling with getting the vnc/tight-vnc server to run under
YDL on PowerPC and not have not had any luck with any of the pre-build
rpms after 3.3.3-4.  It appears this problem has existed every since
vnc-3.3.3r2 or so.  The real problem is that support for Linux on PowerPC
was dropped from the server machine dependent header file, I presume
unintentionally.  Without it, the byte order defaults to LSBFirst which
doesn't quite work on a big-endian machine :) I've re-added the code and
am including a patch.  Note that with the patch, the compiler complains
about IMAGE_BYTE_ORDER and BITMAP_BIT_ORDER being redefined, but that's
OK :). 

The patch is against tightvnc-1.2.4 (tightvnc-1.2.4_unixsrc.tar.bz2), but
probably patches against the generic vnc source as well.  Hopefully
someone will figure out just who owns this file. 
----------------8<-----------------------------8<---------------------------
diff -ur vnc_unixsrc-1.2.4/Xvnc/programs/Xserver/include/servermd.h vnc_unixsrc/Xvnc/programs/Xserver/include/servermd.h
--- vnc_unixsrc-1.2.4/Xvnc/programs/Xserver/include/servermd.h   Tue Mar 19 21:36:47 2002
+++ vnc_unixsrc/Xvnc/programs/Xserver/include/servermd.h         Wed Jul 17 20:19:25 2002
@@ -386,6 +386,22 @@
 
 #endif /* linux/m68k */
 
+#if defined (linux) && defined(__powerpc__)
+
+#define IMAGE_BYTE_ORDER       MSBFirst
+#define BITMAP_BIT_ORDER       MSBFirst
+#define GLYPHPADBYTES          4
+#define GETLEFTBITS_ALIGNMENT  1
+
+#define LARGE_INSTRUCTION_CACHE
+#define FAST_CONSTANT_OFFSET_MODE
+#define PLENTIFUL_REGISTERS
+#define AVOID_MEMORY_READ
+
+#define FAST_MEMCPY
+
+#endif /* Linux/PPC */
+
 #ifdef sgi
 
 #define IMAGE_BYTE_ORDER       MSBFirst
----------------8<-----------------------------8<---------------------------

-- 
Peter A. Castro <doctor@fruitbat.org> or <Peter.Castro@oracle.com>
	"Cats are just autistic Dogs" -- Dr. Tony Attwood