On Thu, Jun 28, 2007 at 02:27:08PM +0000, brian m. carlson wrote: > Attached is a patch to fix the FTFBS. It builds completely with the > patch.
The debdiff for my NMU is attached. Kind regards, Philipp Kern Debian Developer
diff -u libibtk-0.0.14/debian/changelog libibtk-0.0.14/debian/changelog --- libibtk-0.0.14/debian/changelog +++ libibtk-0.0.14/debian/changelog @@ -1,3 +1,11 @@ +libibtk (0.0.14-11.1) unstable; urgency=low + + * Non-maintainer upload. + * Applied a fix by brian m. carlson to fix compilation with GCC 4.2. + (Closes: #385525) + + -- Philipp Kern <[EMAIL PROTECTED]> Sun, 21 Oct 2007 11:42:06 +0200 + libibtk (0.0.14-11) unstable; urgency=low * Ran libtoolize -c -f / aclocal -I m4 / autoconf as recommanded only in patch2: unchanged: --- libibtk-0.0.14.orig/src/ibox.cpp +++ libibtk-0.0.14/src/ibox.cpp @@ -17,6 +17,8 @@ \**************************************************************************/ +#include <algorithm> + #include <string.h> #include <stdio.h> #include <X11/Xlib.h> @@ -184,7 +186,7 @@ XFillRectangle(Win->GetDisplay(), Img[1], Win->GetGC(), 2, 3,xsize-4,ysize-4); if(Wrk[disabled] != None) { XCopyArea(Win->GetDisplay(), Wrk[disabled], Img[disabled], Win->GetGC(), - xscroll, 0, Wlen<?(xsize-4), ysize-4, 2, 2); + xscroll, 0, std::min(Wlen, (xsize-4)), ysize-4, 2, 2); } Redraw(); if(!hidden) Win->Redraw(xpos, ypos, xsize, ysize); only in patch2: unchanged: --- libibtk-0.0.14.orig/src/ibutton.cpp +++ libibtk-0.0.14/src/ibutton.cpp @@ -17,6 +17,8 @@ \**************************************************************************/ +#include <algorithm> + #include <stdio.h> #include <string.h> @@ -120,7 +122,7 @@ void IButton::Redraw() { if(!hidden) { - XCopyArea(Win->GetDisplay(), Img[state<?2], Win->GetWindowBuffer(), Win->GetGC(), + XCopyArea(Win->GetDisplay(), Img[std::min(state,2)], Win->GetWindowBuffer(), Win->GetGC(), 0, 0, xsize, ysize, xpos, ypos); Win->Redraw(xpos, ypos, xsize, ysize); } only in patch2: unchanged: --- libibtk-0.0.14.orig/src/ilistbox.cpp +++ libibtk-0.0.14/src/ilistbox.cpp @@ -17,6 +17,8 @@ \**************************************************************************/ +#include <algorithm> + #include <stdio.h> #include <string.h> @@ -95,7 +97,7 @@ XSetBackground(disp, gc, p); XSetForeground(disp, gc, b); XDrawImageString(disp, Wrk[ctr], gc, 0, as, txt[ctr], strlen(txt[ctr])); - dy = dy>?ht; + dy = std::max(dy, ht); } } if(dy>0) lines = (ysize-6)/dy; @@ -121,9 +123,9 @@ XSetForeground(disp, gc, Win->GetPaperColor()); XFillRectangle(disp, Img, gc, 2, 2, xsize-4, ysize-4); XSetForeground(disp, gc, Win->GetSelectColor()); - for(ctr=0; ctr<(lines<?nent); ctr++) { + for(ctr=0; ctr<std::min(lines, nent); ctr++) { XCopyArea(disp, Wrk[ctr], Img, gc, 0, 0, - wx[ctr], (wy[ctr])<?(xsize-6), 3, 3+(dy*ctr)); + wx[ctr], std::min((wy[ctr]), (xsize-6)), 3, 3+(dy*ctr)); for(ctr2=0; ctr2<selmax; ctr2++) { if(sel[ctr2] == ctr) { ctr2 = selmax; only in patch2: unchanged: --- libibtk-0.0.14.orig/src/isbutton.cpp +++ libibtk-0.0.14/src/isbutton.cpp @@ -17,6 +17,8 @@ \**************************************************************************/ +#include <algorithm> + #include <string.h> #include "isbutton.h" @@ -35,7 +37,7 @@ void ISButton::Redraw() { if(!hidden) { - XCopyArea(Win->GetDisplay(), Img[state<?2], Win->GetWindowBuffer(), Win->GetGC(), + XCopyArea(Win->GetDisplay(), Img[std::min(state, 2)], Win->GetWindowBuffer(), Win->GetGC(), 0, 0, xsize, ysize, xpos, ypos); Win->Redraw(xpos, ypos, xsize, ysize); } only in patch2: unchanged: --- libibtk-0.0.14.orig/src/islider.cpp +++ libibtk-0.0.14/src/islider.cpp @@ -17,6 +17,8 @@ \**************************************************************************/ +#include <algorithm> + #include <stdio.h> #include <string.h> @@ -128,7 +130,7 @@ if(max > min && (((value-min)*(xsize-4))/(max-min)) > 0) { - int xbar = (xsize-4) <? (((value-min)*(xsize-4))/(max-min)); + int xbar = std::min((xsize-4), (((value-min)*(xsize-4))/(max-min))); Wrk[0] = XCreatePixmap(disp, w, xbar, ysize-4, DefaultDepth(disp, 0)); Wrk[1] = XCreatePixmap(disp, w, xbar, ysize-4, DefaultDepth(disp, 0)); only in patch2: unchanged: --- libibtk-0.0.14.orig/src/istatbar.cpp +++ libibtk-0.0.14/src/istatbar.cpp @@ -17,6 +17,8 @@ \**************************************************************************/ +#include <algorithm> + #include <stdio.h> #include <string.h> @@ -93,7 +95,7 @@ (ysize+ysize-(as+des-2))>>1, txt, strlen(txt)); if(total > 0 && ((progress*(xsize-4))/total) > 0) { - int xbar = (xsize-4) <? ((progress*(xsize-4))/total); + int xbar = std::min((xsize-4), ((progress*(xsize-4))/total)); Pixmap Wrk = XCreatePixmap(disp, w, xbar, ysize-4, DefaultDepth(disp, 0)); XSetForeground(disp, gc, Win->GetSelectColor()); XFillRectangle(disp, Wrk, gc, 0, 0, xbar, ysize-4); only in patch2: unchanged: --- libibtk-0.0.14.orig/src/iwindow.cpp +++ libibtk-0.0.14/src/iwindow.cpp @@ -19,6 +19,8 @@ #include "iwindow.h" +#include <algorithm> + #define DEFAULT_NAME "IBTK v0.0" #include <X11/X.h> @@ -555,12 +557,12 @@ void IWindow::Redraw(int x, int y, int xs, int ys) { // XClearArea(Disp, Win, x, y, xs<?(bufxs-x), ys<?(bufys-y), False); - XCopyArea(Disp, WinBuf, Win, gc, x, y, xs<?(bufxs-x), ys<?(bufys-y), x, y); + XCopyArea(Disp, WinBuf, Win, gc, x, y, std::min(xs,(bufxs-x)), std::min(ys,(bufys-y)), x, y); } void IWindow::Redraw() { XClearWindow(Disp, Win); - XCopyArea(Disp, WinBuf, Win, gc, 0, 0, xsize<?bufxs, ysize<?bufys, 0, 0); + XCopyArea(Disp, WinBuf, Win, gc, 0, 0, std::min(xsize, bufxs), std::min(ysize, bufys), 0, 0); } void IWindow::Rebuild(int x, int y, int xs, int ys) {
signature.asc
Description: Digital signature