mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

181 lines
6.4 KiB

  1. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  2. #
  3. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  4. # Please add additional copyright information _after_ the line containing
  5. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  6. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  7. #
  8. # ROCK Linux: rock-src/package/rene/vnc/gcc34.patch
  9. # ROCK Linux is Copyright (C) 1998 - 2004 Clifford Wolf
  10. #
  11. # This patch file is dual-licensed. It is available under the license the
  12. # patched project is licensed under, as long as it is an OpenSource license
  13. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  14. # of the GNU General Public License as published by the Free Software
  15. # Foundation; either version 2 of the License, or (at your option) any later
  16. # version.
  17. #
  18. # --- ROCK-COPYRIGHT-NOTE-END ---
  19. --- ./rfb/Rect.h.old 2003-06-30 21:50:25.000000000 +0100
  20. +++ ./rfb/Rect.h 2004-05-20 14:43:56.299371046 +0100
  21. @@ -21,13 +21,7 @@
  22. #ifndef __RFB_RECT_INCLUDED__
  23. #define __RFB_RECT_INCLUDED__
  24. -#ifndef max
  25. -#define max(a,b) (((a) > (b)) ? (a) : (b))
  26. -#endif
  27. -
  28. -#ifndef min
  29. -#define min(a,b) (((a) < (b)) ? (a) : (b))
  30. -#endif
  31. +#include <algorithm>
  32. namespace rfb {
  33. @@ -70,20 +64,20 @@
  34. }
  35. inline Rect intersect(const Rect &r) const {
  36. Rect result;
  37. - result.tl.x = max(tl.x, r.tl.x);
  38. - result.tl.y = max(tl.y, r.tl.y);
  39. - result.br.x = max(min(br.x, r.br.x), result.tl.x);
  40. - result.br.y = max(min(br.y, r.br.y), result.tl.y);
  41. + result.tl.x = std::max(tl.x, r.tl.x);
  42. + result.tl.y = std::max(tl.y, r.tl.y);
  43. + result.br.x = std::max(std::min(br.x, r.br.x), result.tl.x);
  44. + result.br.y = std::max(std::min(br.y, r.br.y), result.tl.y);
  45. return result;
  46. }
  47. inline Rect union_boundary(const Rect &r) const {
  48. if (r.is_empty()) return *this;
  49. if (is_empty()) return r;
  50. Rect result;
  51. - result.tl.x = min(tl.x, r.tl.x);
  52. - result.tl.y = min(tl.y, r.tl.y);
  53. - result.br.x = max(br.x, r.br.x);
  54. - result.br.y = max(br.y, r.br.y);
  55. + result.tl.x = std::min(tl.x, r.tl.x);
  56. + result.tl.y = std::min(tl.y, r.tl.y);
  57. + result.br.x = std::max(br.x, r.br.x);
  58. + result.br.y = std::max(br.y, r.br.y);
  59. return result;
  60. }
  61. inline Rect translate(const Point &p) const {
  62. --- ./rfb/ComparingUpdateTracker.cxx.orig 2004-05-18 17:16:51.000000000 +0100
  63. +++ ./rfb/ComparingUpdateTracker.cxx 2004-05-20 14:44:48.225445585 +0100
  64. @@ -60,7 +60,7 @@
  65. // since in effect the entire framebuffer has changed.
  66. oldFb.setSize(fb->width(), fb->height());
  67. for (int y=0; y<fb->height(); y+=BLOCK_SIZE) {
  68. - Rect pos(0, y, fb->width(), min(fb->height(), y+BLOCK_SIZE));
  69. + Rect pos(0, y, fb->width(), std::min(fb->height(), y+BLOCK_SIZE));
  70. int srcStride;
  71. const rdr::U8* srcData = fb->getPixelsR(pos, &srcStride);
  72. oldFb.imageRect(pos, srcData, srcStride);
  73. @@ -100,20 +100,20 @@
  74. for (int blockTop = r.tl.y; blockTop < r.br.y; blockTop += BLOCK_SIZE)
  75. {
  76. // Get a strip of the source buffer
  77. - Rect pos(r.tl.x, blockTop, r.br.x, min(r.br.y, blockTop+BLOCK_SIZE));
  78. + Rect pos(r.tl.x, blockTop, r.br.x, std::min(r.br.y, blockTop+BLOCK_SIZE));
  79. int fbStride;
  80. const rdr::U8* newBlockPtr = fb->getPixelsR(pos, &fbStride);
  81. int newStrideBytes = fbStride * bytesPerPixel;
  82. rdr::U8* oldBlockPtr = oldData;
  83. - int blockBottom = min(blockTop+BLOCK_SIZE, r.br.y);
  84. + int blockBottom = std::min(blockTop+BLOCK_SIZE, r.br.y);
  85. for (int blockLeft = r.tl.x; blockLeft < r.br.x; blockLeft += BLOCK_SIZE)
  86. {
  87. const rdr::U8* newPtr = newBlockPtr;
  88. rdr::U8* oldPtr = oldBlockPtr;
  89. - int blockRight = min(blockLeft+BLOCK_SIZE, r.br.x);
  90. + int blockRight = std::min(blockLeft+BLOCK_SIZE, r.br.x);
  91. int blockWidthInBytes = (blockRight-blockLeft) * bytesPerPixel;
  92. for (int y = blockTop; y < blockBottom; y++)
  93. --- ./rfb/hextileDecode.h.old 2003-07-31 19:03:38.000000000 +0100
  94. +++ ./rfb/hextileDecode.h 2004-05-20 14:43:56.337363784 +0100
  95. @@ -52,11 +52,11 @@
  96. for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 16) {
  97. - t.br.y = min(r.br.y, t.tl.y + 16);
  98. + t.br.y = std::min(r.br.y, t.tl.y + 16);
  99. for (t.tl.x = r.tl.x; t.tl.x < r.br.x; t.tl.x += 16) {
  100. - t.br.x = min(r.br.x, t.tl.x + 16);
  101. + t.br.x = std::min(r.br.x, t.tl.x + 16);
  102. int tileType = is->readU8();
  103. --- ./rfb/hextileEncode.h.old 2003-07-31 19:03:38.000000000 +0100
  104. +++ ./rfb/hextileEncode.h 2004-05-20 14:43:56.340363210 +0100
  105. @@ -60,11 +60,11 @@
  106. for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 16) {
  107. - t.br.y = min(r.br.y, t.tl.y + 16);
  108. + t.br.y = std::min(r.br.y, t.tl.y + 16);
  109. for (t.tl.x = r.tl.x; t.tl.x < r.br.x; t.tl.x += 16) {
  110. - t.br.x = min(r.br.x, t.tl.x + 16);
  111. + t.br.x = std::min(r.br.x, t.tl.x + 16);
  112. GET_IMAGE_INTO_BUF(t,buf);
  113. --- ./rfb/zrleEncode.h.orig 2004-05-18 17:16:52.000000000 +0100
  114. +++ ./rfb/zrleEncode.h 2004-05-20 14:46:54.105384909 +0100
  115. @@ -130,7 +130,7 @@
  116. for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 64) {
  117. - t.br.y = min(r.br.y, t.tl.y + 64);
  118. + t.br.y = std::min(r.br.y, t.tl.y + 64);
  119. if (os->length() + worstCaseLine > maxLen) {
  120. if (t.tl.y == r.tl.y)
  121. @@ -143,7 +143,7 @@
  122. for (t.tl.x = r.tl.x; t.tl.x < r.br.x; t.tl.x += 64) {
  123. - t.br.x = min(r.br.x, t.tl.x + 64);
  124. + t.br.x = std::min(r.br.x, t.tl.x + 64);
  125. GET_IMAGE_INTO_BUF(t,buf);
  126. --- ./rfb/zrleDecode.h.orig 2003-07-31 19:03:38.000000000 +0100
  127. +++ ./rfb/zrleDecode.h 2004-05-20 14:43:56.352360917 +0100
  128. @@ -61,11 +61,11 @@
  129. for (t.tl.y = r.tl.y; t.tl.y < r.br.y; t.tl.y += 64) {
  130. - t.br.y = min(r.br.y, t.tl.y + 64);
  131. + t.br.y = std::min(r.br.y, t.tl.y + 64);
  132. for (t.tl.x = r.tl.x; t.tl.x < r.br.x; t.tl.x += 64) {
  133. - t.br.x = min(r.br.x, t.tl.x + 64);
  134. + t.br.x = std::min(r.br.x, t.tl.x + 64);
  135. int mode = zis->readU8();
  136. bool rle = mode & 128;
  137. --- ./tx/TXImage.cxx.orig 2004-03-18 17:37:37.000000000 +0000
  138. +++ ./tx/TXImage.cxx 2004-05-20 14:43:56.355360344 +0100
  139. @@ -71,8 +71,8 @@
  140. if (w == width() && h == height()) return;
  141. int oldStrideBytes = getStride() * (format.bpp/8);
  142. - int rowsToCopy = min(h, height());
  143. - int bytesPerRow = min(w, width()) * (format.bpp/8);
  144. + int rowsToCopy = std::min(h, height());
  145. + int bytesPerRow = std::min(w, width()) * (format.bpp/8);
  146. rdr::U8* oldData = 0;
  147. bool allocData = false;