Source: tightvnc Version: 1.3.9 Severity: important Tags: patch This patch adds support for the ppc64el architecture on tightVNC. The patch basically defines the endianess and bit width for this new architecture. I tested the patch on version 1.3.10 as 1.3.9 and it works fine.
The upstream bug and patch submission could be seen at: https://sourceforge.net/p/vnc-tight/bugs/1353/ -- System Information: Debian Release: stretch/sid APT prefers unstable APT policy: (500, 'unstable') Architecture: ppc64el (ppc64le) Kernel: Linux 3.16.0-4-powerpc64le (SMP w/8 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system)
>From 25adb1614419b72a986c229cb01870c1b3e38c0b Mon Sep 17 00:00:00 2001 From: Lauri Kasanen <c...@gmx.com> Date: Fri, 5 Jun 2015 07:45:09 -0300 Subject: [PATCH 2/2] Add ppc64el support Signed-off-by: Lauri Kasanen <c...@gmx.com> --- Xvnc/config/cf/Imake.cf | 4 ++++ Xvnc/config/cf/linux.cf | 8 +++++++- Xvnc/include/Xmd.h | 2 +- Xvnc/programs/Xserver/include/servermd.h | 23 +++++++++++++++++++++++ 4 files changed, 35 insertions(+), 2 deletions(-) Index: tightvnc-1.3.9/Xvnc/config/cf/Imake.cf =================================================================== --- tightvnc-1.3.9.orig/Xvnc/config/cf/Imake.cf +++ tightvnc-1.3.9/Xvnc/config/cf/Imake.cf @@ -724,6 +724,10 @@ XCOMM Keep cpp from replacing path eleme # define Mc68020Architecture # undef mc68000 # endif /* mc68000 */ +# ifdef __powerpc64__ +# define Ppc64Architecture +# undef __powerpc64__ +# endif # ifdef powerpc # define PpcArchitecture # undef powerpc Index: tightvnc-1.3.9/Xvnc/config/cf/linux.cf =================================================================== --- tightvnc-1.3.9.orig/Xvnc/config/cf/linux.cf +++ tightvnc-1.3.9/Xvnc/config/cf/linux.cf @@ -297,7 +297,13 @@ XCOMM binutils: (LinuxBinUtilsMajorVersi #define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines #endif /* s390xArchitecture */ -#ifdef PowerPCArchitecture +#ifdef Ppc64Architecture +#define DefaultCCOptions -fsigned-char +#define OptimizedCDebugFlags -O2 +#define LinuxMachineDefines -D__powerpc64__ +#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET +#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 +#elif defined(PowerPCArchitecture) #define DefaultCCOptions -fsigned-char #define OptimizedCDebugFlags -O2 #define LinuxMachineDefines -D__powerpc__ Index: tightvnc-1.3.9/Xvnc/include/Xmd.h =================================================================== --- tightvnc-1.3.9.orig/Xvnc/include/Xmd.h +++ tightvnc-1.3.9/Xvnc/include/Xmd.h @@ -59,7 +59,7 @@ SOFTWARE. #ifdef CRAY #define WORD64 /* 64-bit architecture */ #endif -#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) +#if defined(__alpha) || defined(__alpha__) || defined(__x86_64__) || defined(__powerpc64__) #define LONG64 /* 32/64-bit architecture */ #endif #ifdef __sgi Index: tightvnc-1.3.9/Xvnc/programs/Xserver/include/servermd.h =================================================================== --- tightvnc-1.3.9.orig/Xvnc/programs/Xserver/include/servermd.h +++ tightvnc-1.3.9/Xvnc/programs/Xserver/include/servermd.h @@ -407,8 +407,31 @@ SOFTWARE. #if defined (linux) && defined(__powerpc__) +#ifdef __powerpc64__ +# define BITMAP_SCANLINE_UNIT 64 +# define BITMAP_SCANLINE_PAD 64 +# define LOG2_BITMAP_PAD 6 +# define LOG2_BYTES_PER_SCANLINE_PAD 3 + +/* Add for handling protocol XPutImage and XGetImage; see comment in + * Alpha section. + */ +#define INTERNAL_VS_EXTERNAL_PADDING +#define BITMAP_SCANLINE_UNIT_PROTO 32 + +#define BITMAP_SCANLINE_PAD_PROTO 32 +#define LOG2_BITMAP_PAD_PROTO 5 +#define LOG2_BYTES_PER_SCANLINE_PAD_PROTO 2 +#endif /* linux/ppc64 */ + +#if defined(__LITTLE_ENDIAN__) +#define IMAGE_BYTE_ORDER LSBFirst +#define BITMAP_BIT_ORDER LSBFirst +#else #define IMAGE_BYTE_ORDER MSBFirst #define BITMAP_BIT_ORDER MSBFirst +#endif + #define GLYPHPADBYTES 4 #define GETLEFTBITS_ALIGNMENT 1