@ -0,0 +1,162 @@ |
|||
--- ./rfb/Rect.h.old 2003-06-30 21:50:25.000000000 +0100
|
|||
+++ ./rfb/Rect.h 2004-05-20 14:43:56.299371046 +0100
|
|||
@@ -21,13 +21,7 @@
|
|||
#ifndef __RFB_RECT_INCLUDED__ |
|||
#define __RFB_RECT_INCLUDED__ |
|||
|
|||
-#ifndef max
|
|||
-#define max(a,b) (((a) > (b)) ? (a) : (b))
|
|||
-#endif
|
|||
-
|
|||
-#ifndef min
|
|||
-#define min(a,b) (((a) < (b)) ? (a) : (b))
|
|||
-#endif
|
|||
+#include <algorithm>
|
|||
|
|||
namespace rfb { |
|||
|
|||
@@ -70,20 +64,20 @@
|
|||
} |
|||
inline Rect intersect(const Rect &r) const { |
|||
Rect result; |
|||
- result.tl.x = max(tl.x, r.tl.x);
|
|||
- result.tl.y = max(tl.y, r.tl.y);
|
|||
- result.br.x = max(min(br.x, r.br.x), result.tl.x);
|
|||
- result.br.y = max(min(br.y, r.br.y), result.tl.y);
|
|||
+ result.tl.x = std::max(tl.x, r.tl.x);
|
|||
+ result.tl.y = std::max(tl.y, r.tl.y);
|
|||
+ result.br.x = std::max(std::min(br.x, r.br.x), result.tl.x);
|
|||
+ result.br.y = std::max(std::min(br.y, r.br.y), result.tl.y);
|
|||
return result; |
|||
} |
|||
inline Rect union_boundary(const Rect &r) const { |
|||
if (r.is_empty()) return *this; |
|||
if (is_empty()) return r; |
|||
Rect result; |
|||
- result.tl.x = min(tl.x, r.tl.x);
|
|||
- result.tl.y = min(tl.y, r.tl.y);
|
|||
- result.br.x = max(br.x, r.br.x);
|
|||
- result.br.y = max(br.y, r.br.y);
|
|||
+ result.tl.x = std::min(tl.x, r.tl.x);
|
|||
+ result.tl.y = std::min(tl.y, r.tl.y);
|
|||
+ result.br.x = std::max(br.x, r.br.x);
|
|||
+ result.br.y = std::max(br.y, r.br.y);
|
|||
return result; |
|||
} |
|||
inline Rect translate(const Point &p) const { |
|||
--- ./rfb/ComparingUpdateTracker.cxx.orig 2004-05-18 17:16:51.000000000 +0100
|
|||
+++ ./rfb/ComparingUpdateTracker.cxx 2004-05-20 14:44:48.225445585 +0100
|
|||
@@ -60,7 +60,7 @@
|
|||
// since in effect the entire framebuffer has changed. |
|||
oldFb.setSize(fb->width(), fb->height()); |
|||
for (int y=0; y<fb->height(); y+=BLOCK_SIZE) { |
|||
- Rect pos(0, y, fb->width(), min(fb->height(), y+BLOCK_SIZE));
|
|||
+ Rect pos(0, y, fb->width(), std::min(fb->height(), y+BLOCK_SIZE));
|
|||
int srcStride; |
|||
const rdr::U8* srcData = fb->getPixelsR(pos, &srcStride); |
|||
oldFb.imageRect(pos, srcData, srcStride); |
|||
@@ -100,20 +100,20 @@
|
|||
for (int blockTop = r.tl.y; blockTop < r.br.y; blockTop += BLOCK_SIZE) |
|||
{ |
|||
// Get a strip of the source buffer |
|||
- Rect pos(r.tl.x, blockTop, r.br.x, min(r.br.y, blockTop+BLOCK_SIZE));
|
|||
+ Rect pos(r.tl.x, blockTop, r.br.x, std::min(r.br.y, blockTop+BLOCK_SIZE));
|
|||
int fbStride; |
|||
const rdr::U8* newBlockPtr = fb->getPixelsR(pos, &fbStride); |
|||
int newStrideBytes = fbStride * bytesPerPixel; |
|||
|
|||
rdr::U8* oldBlockPtr = oldData; |
|||
- int blockBottom = min(blockTop+BLOCK_SIZE, r.br.y);
|
|||
+ int blockBottom = std::min(blockTop+BLOCK_SIZE, r.br.y);
|
|||
|
|||
for (int blockLeft = r.tl.x; blockLeft < r.br.x; blockLeft += BLOCK_SIZE) |
|||
{ |
|||
const rdr::U8* newPtr = newBlockPtr; |
|||
rdr::U8* oldPtr = oldBlockPtr; |
|||
|
|||
- int blockRight = min(blockLeft+BLOCK_SIZE, r.br.x);
|
|||
+ int blockRight = std::min(blockLeft+BLOCK_SIZE, r.br.x);
|
|||
int blockWidthInBytes = (blockRight-blockLeft) * bytesPerPixel; |
|||
|
|||
for (int y = blockTop; y < blockBottom; y++) |
|||
--- ./rfb/hextileDecode.h.old 2003-07-31 19:03:38.000000000 +0100
|
|||
+++ ./rfb/hextileDecode.h 2004-05-20 14:43:56.337363784 +0100
|
|||
@@ -52,11 +52,11 @@
|
|||
|
|||
for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 16) { |
|||
|
|||
- t.br.y = min(r.br.y, t.tl.y + 16);
|
|||
+ t.br.y = std::min(r.br.y, t.tl.y + 16);
|
|||
|
|||
for (t.tl.x = r.tl.x; t.tl.x < r.br.x; t.tl.x += 16) { |
|||
|
|||
- t.br.x = min(r.br.x, t.tl.x + 16);
|
|||
+ t.br.x = std::min(r.br.x, t.tl.x + 16);
|
|||
|
|||
int tileType = is->readU8(); |
|||
|
|||
--- ./rfb/hextileEncode.h.old 2003-07-31 19:03:38.000000000 +0100
|
|||
+++ ./rfb/hextileEncode.h 2004-05-20 14:43:56.340363210 +0100
|
|||
@@ -60,11 +60,11 @@
|
|||
|
|||
for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 16) { |
|||
|
|||
- t.br.y = min(r.br.y, t.tl.y + 16);
|
|||
+ t.br.y = std::min(r.br.y, t.tl.y + 16);
|
|||
|
|||
for (t.tl.x = r.tl.x; t.tl.x < r.br.x; t.tl.x += 16) { |
|||
|
|||
- t.br.x = min(r.br.x, t.tl.x + 16);
|
|||
+ t.br.x = std::min(r.br.x, t.tl.x + 16);
|
|||
|
|||
GET_IMAGE_INTO_BUF(t,buf); |
|||
|
|||
--- ./rfb/zrleEncode.h.orig 2004-05-18 17:16:52.000000000 +0100
|
|||
+++ ./rfb/zrleEncode.h 2004-05-20 14:46:54.105384909 +0100
|
|||
@@ -130,7 +130,7 @@
|
|||
|
|||
for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 64) { |
|||
|
|||
- t.br.y = min(r.br.y, t.tl.y + 64);
|
|||
+ t.br.y = std::min(r.br.y, t.tl.y + 64);
|
|||
|
|||
if (os->length() + worstCaseLine > maxLen) { |
|||
if (t.tl.y == r.tl.y) |
|||
@@ -143,7 +143,7 @@
|
|||
|
|||
for (t.tl.x = r.tl.x; t.tl.x < r.br.x; t.tl.x += 64) { |
|||
|
|||
- t.br.x = min(r.br.x, t.tl.x + 64);
|
|||
+ t.br.x = std::min(r.br.x, t.tl.x + 64);
|
|||
|
|||
GET_IMAGE_INTO_BUF(t,buf); |
|||
|
|||
--- ./rfb/zrleDecode.h.orig 2003-07-31 19:03:38.000000000 +0100
|
|||
+++ ./rfb/zrleDecode.h 2004-05-20 14:43:56.352360917 +0100
|
|||
@@ -61,11 +61,11 @@
|
|||
|
|||
for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 64) { |
|||
|
|||
- t.br.y = min(r.br.y, t.tl.y + 64);
|
|||
+ t.br.y = std::min(r.br.y, t.tl.y + 64);
|
|||
|
|||
for (t.tl.x = r.tl.x; t.tl.x < r.br.x; t.tl.x += 64) { |
|||
|
|||
- t.br.x = min(r.br.x, t.tl.x + 64);
|
|||
+ t.br.x = std::min(r.br.x, t.tl.x + 64);
|
|||
|
|||
int mode = zis->readU8(); |
|||
bool rle = mode & 128; |
|||
--- ./tx/TXImage.cxx.orig 2004-03-18 17:37:37.000000000 +0000
|
|||
+++ ./tx/TXImage.cxx 2004-05-20 14:43:56.355360344 +0100
|
|||
@@ -71,8 +71,8 @@
|
|||
if (w == width() && h == height()) return; |
|||
|
|||
int oldStrideBytes = getStride() * (format.bpp/8); |
|||
- int rowsToCopy = min(h, height());
|
|||
- int bytesPerRow = min(w, width()) * (format.bpp/8);
|
|||
+ int rowsToCopy = std::min(h, height());
|
|||
+ int bytesPerRow = std::min(w, width()) * (format.bpp/8);
|
|||
rdr::U8* oldData = 0; |
|||
bool allocData = false; |
|||
|
@ -1,71 +0,0 @@ |
|||
# --- ROCK-COPYRIGHT-NOTE-BEGIN --- |
|||
# |
|||
# This copyright note is auto-generated by ./scripts/Create-CopyPatch. |
|||
# Please add additional copyright information _after_ the line containing |
|||
# the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by |
|||
# the ./scripts/Create-CopyPatch script. Do not edit this copyright text! |
|||
# |
|||
# ROCK Linux: rock-src/package/rene/vnc/missing-powerpc-templates.patch |
|||
# ROCK Linux is Copyright (C) 1998 - 2003 Clifford Wolf |
|||
# |
|||
# This program is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; either version 2 of the License, or |
|||
# (at your option) any later version. A copy of the GNU General Public |
|||
# License can be found at Documentation/COPYING. |
|||
# |
|||
# Many people helped and are helping developing ROCK Linux. Please |
|||
# have a look at http://www.rocklinux.org/ and the Documentation/TEAM |
|||
# file for details. |
|||
# |
|||
# --- ROCK-COPYRIGHT-NOTE-END --- |
|||
|
|||
|
|||
This patch adds the missing PowerPC definitions (am I / are we the only |
|||
person / people on earth that build for PowerPC ?!?!?!?!?!?!?!?) |
|||
|
|||
- Rene Rebe <rene@rocklinux.org> |
|||
|
|||
--- vnc_unixsrc/Xvnc/config/cf/Imake.cf.orig 2003-09-06 03:01:25.000000000 +0200
|
|||
+++ vnc_unixsrc/Xvnc/config/cf/Imake.cf 2003-09-06 03:01:13.000000000 +0200
|
|||
@@ -552,6 +552,10 @@
|
|||
# define AlphaArchitecture |
|||
# undef __alpha |
|||
# endif /* __alpha */ |
|||
+# ifdef __powerpc
|
|||
+# define ppcArchitecture
|
|||
+# undef __powerpc
|
|||
+# endif /* __powerpc */
|
|||
# ifdef mc68000 |
|||
# define Mc68020Architecture |
|||
# undef mc68000 |
|||
--- vnc_unixsrc/Xvnc/config/cf/linux.cf.orig 1998-05-11 18:38:06.000000000 +0200
|
|||
+++ vnc_unixsrc/Xvnc/config/cf/linux.cf 2003-09-06 02:51:52.000000000 +0200
|
|||
@@ -197,6 +197,13 @@
|
|||
#define AsmDefines -D__ELF__ |
|||
#define CplusplusCmd c++ -b alpha-linux |
|||
#endif /* AlphaArchitecture */ |
|||
+#ifdef ppcArchitecture
|
|||
+#define CcCmd gcc
|
|||
+#define AsCmd /usr/powerpc-linux/bin/as
|
|||
+#define LdCmd ld -m elf32powerpc
|
|||
+#define AsmDefines -D__ELF__
|
|||
+#define CplusplusCmd c++ -b powerpc-linux
|
|||
+#endif /* ppcArchitecture */
|
|||
#ifdef i386Architecture |
|||
#define CcCmd gcc -b i486-linux |
|||
#define AsCmd /usr/i486-linux/bin/as |
|||
@@ -252,6 +259,13 @@
|
|||
#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines -D_XSERVER64 |
|||
#endif /* AlphaArchitecture */ |
|||
|
|||
+#ifdef ppcArchitecture
|
|||
+#define OptimizedCDebugFlags -O2
|
|||
+#define LinuxMachineDefines -D__powerpc__
|
|||
+#define ServerOSDefines XFree86ServerOSDefines -DDDXTIME -DPART_NET
|
|||
+#define ServerExtraDefines -DGCCUSESGAS XFree86ServerDefines
|
|||
+#endif /* ppcArchitecture */
|
|||
+
|
|||
#ifdef Mc68020Architecture |
|||
#define OptimizedCDebugFlags -O2 |
|||
#define LinuxMachineDefines -D__mc68000__ |
@ -0,0 +1,39 @@ |
|||
--- ./xc/programs/Xserver/vnc/XserverDesktop.cc.orig 2004-09-13 06:57:27.998812712 +0200
|
|||
+++ ./xc/programs/Xserver/vnc/XserverDesktop.cc 2004-09-13 06:57:46.886941280 +0200
|
|||
@@ -382,25 +382,6 @@
|
|||
} |
|||
} |
|||
|
|||
-static void printRegion(RegionPtr reg)
|
|||
-{
|
|||
- int nrects = REGION_NUM_RECTS(reg);
|
|||
-
|
|||
- fprintf(stderr,"Region num rects %2d extents %3d,%3d %3dx%3d\n",nrects,
|
|||
- (REGION_EXTENTS(pScreen,reg))->x1,
|
|||
- (REGION_EXTENTS(pScreen,reg))->y1,
|
|||
- (REGION_EXTENTS(pScreen,reg))->x2-(REGION_EXTENTS(pScreen,reg))->x1,
|
|||
- (REGION_EXTENTS(pScreen,reg))->y2-(REGION_EXTENTS(pScreen,reg))->y1);
|
|||
-
|
|||
- for (int i = 0; i < nrects; i++) {
|
|||
- fprintf(stderr," rect %3d,%3d %3dx%3d\n",
|
|||
- REGION_RECTS(reg)[i].x1,
|
|||
- REGION_RECTS(reg)[i].y1,
|
|||
- REGION_RECTS(reg)[i].x2-REGION_RECTS(reg)[i].x1,
|
|||
- REGION_RECTS(reg)[i].y2-REGION_RECTS(reg)[i].y1);
|
|||
- }
|
|||
-}
|
|||
-
|
|||
CARD32 XserverDesktop::deferredUpdateTimerCallback(OsTimerPtr timer, |
|||
CARD32 now, pointer arg) |
|||
{ |
|||
--- ./xc/programs/Xserver/Imakefile.orig 2004-09-13 07:22:05.729163552 +0200
|
|||
+++ ./xc/programs/Xserver/Imakefile 2004-09-13 07:22:25.665132824 +0200
|
|||
@@ -118,7 +118,7 @@
|
|||
LIBREGEX = RegexLibrary |
|||
|
|||
#if DoLoadableServer |
|||
- LIBCWRAPPER = os/libcwrapper.o
|
|||
+ LIBCWRAPPER = os/libcwrapper.o os/libos.a
|
|||
#endif |
|||
|
|||
#if BuildXprint |
@ -0,0 +1,93 @@ |
|||
--- ./xc.patch.orig 2004-09-13 06:45:46.143510936 +0200
|
|||
+++ ./xc.patch 2004-09-13 06:46:03.017945632 +0200
|
|||
@@ -8,11 +8,11 @@
|
|||
+ XCOMM |
|||
+ XCOMM X VNC server |
|||
+ XCOMM |
|||
-+ MFBDIR = mfb
|
|||
-+ CFB8DIR = cfb
|
|||
-+ CFB16DIR = cfb16
|
|||
-+ CFB24DIR = cfb24
|
|||
-+ CFB32DIR = cfb32
|
|||
++ MFBSUBDIR = mfb
|
|||
++ CFB8SUBDIR = cfb
|
|||
++ CFB16SUBDIR = cfb16
|
|||
++ CFB24SUBDIR = cfb24
|
|||
++ CFB32SUBDIR = cfb32
|
|||
+ XVNCDDXDIR = vnc/Xvnc |
|||
+ XVNCDIRS = $(STDDIRS) $(MFBDIR) \ |
|||
+ $(CFB8DIR) $(CFB16DIR) $(CFB24DIR) $(CFB32DIR) \ |
|||
@@ -116,60 +116,6 @@
|
|||
! nlwMiddle >>= 3; \ |
|||
while (h--) { \ |
|||
srcpix = psrc[srcy]; \ |
|||
-*** xc/programs/Xserver/cfb/cfbglblt8.c.orig Fri Dec 14 19:59:23 2001
|
|||
---- xc/programs/Xserver/cfb/cfbglblt8.c Tue Aug 12 10:05:57 2003
|
|||
-***************
|
|||
-*** 284,288 ****
|
|||
- register glyphPointer glyphBits;
|
|||
- register int xoff;
|
|||
-! #if defined(USE_LEFT_BITS) || (!defined(STIPPLE) && !defined(USE_STIPPLE_CODE))
|
|||
- register CfbBits *dst;
|
|||
- #endif
|
|||
---- 284,288 ----
|
|||
- register glyphPointer glyphBits;
|
|||
- register int xoff;
|
|||
-! #if defined(USE_LEFTBITS) || (!defined(STIPPLE) && !defined(USE_STIPPLE_CODE))
|
|||
- register CfbBits *dst;
|
|||
- #endif
|
|||
-***************
|
|||
-*** 292,296 ****
|
|||
- CfbBits *dstLine;
|
|||
- CfbBits *pdstBase;
|
|||
-! #ifdef USE_LEFT_BITS
|
|||
- CARD32 *cTmp;
|
|||
- #endif
|
|||
---- 292,296 ----
|
|||
- CfbBits *dstLine;
|
|||
- CfbBits *pdstBase;
|
|||
-! #ifdef USE_LEFTBITS
|
|||
- CARD32 *cTmp;
|
|||
- #endif
|
|||
-***************
|
|||
-*** 399,403 ****
|
|||
- } while (--hTmp);
|
|||
- break;
|
|||
-! #else /* !USE_LEFT_BITS */
|
|||
- {
|
|||
- int h;
|
|||
---- 399,403 ----
|
|||
- } while (--hTmp);
|
|||
- break;
|
|||
-! #else /* !USE_LEFTBITS */
|
|||
- {
|
|||
- int h;
|
|||
-***************
|
|||
-*** 412,416 ****
|
|||
- glyphBits = clips;
|
|||
- /* fall through */
|
|||
-! #endif /* USE_LEFT_BITS */
|
|||
- case rgnIN:
|
|||
- #ifdef STIPPLE
|
|||
---- 412,416 ----
|
|||
- glyphBits = clips;
|
|||
- /* fall through */
|
|||
-! #endif /* USE_LEFTBITS */
|
|||
- case rgnIN:
|
|||
- #ifdef STIPPLE
|
|||
*** xc/programs/Xserver/cfb/cfbcppl.c.orig Fri Dec 14 19:59:22 2001 |
|||
--- xc/programs/Xserver/cfb/cfbcppl.c Sun Apr 18 12:53:36 2004 |
|||
*************** |
|||
--- ./xc/config/cf/vnc.def.orig 2004-09-13 06:50:23.325849986 +0200
|
|||
+++ ./xc/config/cf/vnc.def 2004-09-13 06:51:52.378509287 +0200
|
|||
@@ -6,7 +6,8 @@
|
|||
#define BuildNls NO |
|||
#define BuildXIE NO |
|||
#define BuildGlxExt NO |
|||
-#define XnestServer NO
|
|||
+#define XnestServer YES
|
|||
+#define XF86Server NO
|
|||
#define XprtServer NO |
|||
|
|||
#ifdef SunArchitecture |
|||
|