From f3ff0cddb86ae96e3c4e6db5d060e87e06c30c99 Mon Sep 17 00:00:00 2001 From: miwi Date: Mon, 5 Nov 2007 10:04:15 +0000 Subject: - Unbreak - Fix build with gcc 4.2 PR: 117776 Submitted by: pietro cerutti Approved by: portmgr (pav) --- editors/zoinks/Makefile | 10 +++--- editors/zoinks/files/patch-fw-TApplication.cpp | 22 ++++++++++++ editors/zoinks/files/patch-fw-TInputContext.cpp | 9 +++++ editors/zoinks/files/patch-fw-TTextView.cpp | 11 ++++++ editors/zoinks/files/patch-fw-TTopLevelWindow.cpp | 13 +++++++ editors/zoinks/files/patch-fw-TWindow.cpp | 41 ++++++++++++++++++++++ editors/zoinks/files/patch-ide-TLogDocument.cpp | 11 ++++++ .../zoinks/files/patch-ide-TProjectDocument.cpp | 11 ++++++ 8 files changed, 122 insertions(+), 6 deletions(-) create mode 100644 editors/zoinks/files/patch-fw-TApplication.cpp create mode 100644 editors/zoinks/files/patch-fw-TInputContext.cpp create mode 100644 editors/zoinks/files/patch-fw-TTextView.cpp create mode 100644 editors/zoinks/files/patch-fw-TTopLevelWindow.cpp create mode 100644 editors/zoinks/files/patch-fw-TWindow.cpp create mode 100644 editors/zoinks/files/patch-ide-TLogDocument.cpp create mode 100644 editors/zoinks/files/patch-ide-TProjectDocument.cpp (limited to 'editors') diff --git a/editors/zoinks/Makefile b/editors/zoinks/Makefile index 007afa77381b..dc0985dfeb35 100644 --- a/editors/zoinks/Makefile +++ b/editors/zoinks/Makefile @@ -41,10 +41,8 @@ pre-everything:: @${ECHO_MSG} "Use WITH_IMLIB=yes to enable these features." @${ECHO_MSG} "" -.include +post-patch: + @${FIND} ${WRKSRC} -name *.xpm | ${XARGS} ${REINPLACE_CMD} -e \ + 's|^"|(char *)"|g' -.if ${OSVERSION} >= 700042 -BROKEN= Does not compile with GCC 4.2 -.endif - -.include +.include diff --git a/editors/zoinks/files/patch-fw-TApplication.cpp b/editors/zoinks/files/patch-fw-TApplication.cpp new file mode 100644 index 000000000000..454bbf72c288 --- /dev/null +++ b/editors/zoinks/files/patch-fw-TApplication.cpp @@ -0,0 +1,22 @@ +--- fw/TApplication.cpp.orig 2003-05-15 23:33:23.000000000 +0200 ++++ fw/TApplication.cpp 2007-11-04 22:30:57.000000000 +0100 +@@ -163,8 +163,8 @@ + fLeaderWindow = XCreateSimpleWindow(fDisplay, GetRootWindow(), 10, 10, 10, 10, 0, 0, 0); + + XClassHint* classHint = XAllocClassHint(); +- classHint->res_name = "Zoinks"; +- classHint->res_class = "ZOINKS"; ++ classHint->res_name = (char *)"Zoinks"; ++ classHint->res_class = (char *)"ZOINKS"; + + XWMHints* wmHints = NULL; + TPixmap* icon = GetIcon(); +@@ -1154,7 +1154,7 @@ + } + + // exec the shell +- err = execl("/bin/sh", "sh", "-c", commandLine, NULL); ++ err = execl("/bin/sh", "sh", "-c", commandLine, (char *)NULL); + + ASSERT(0); // should never get here + } diff --git a/editors/zoinks/files/patch-fw-TInputContext.cpp b/editors/zoinks/files/patch-fw-TInputContext.cpp new file mode 100644 index 000000000000..76b17abdc714 --- /dev/null +++ b/editors/zoinks/files/patch-fw-TInputContext.cpp @@ -0,0 +1,9 @@ +--- fw/TInputContext.cpp.orig 2007-11-04 22:32:48.000000000 +0100 ++++ fw/TInputContext.cpp 2007-11-04 22:33:03.000000000 +0100 +@@ -75,5 +75,5 @@ + xpoint.y = point.v; + + ICArg args[2] = { {XNSpotLocation, &xpoint}, {NULL, NULL} }; +- XSetICValues(fXIC, XNPreeditAttributes, args, NULL); ++ XSetICValues(fXIC, XNPreeditAttributes, args, (char *)NULL); + } diff --git a/editors/zoinks/files/patch-fw-TTextView.cpp b/editors/zoinks/files/patch-fw-TTextView.cpp new file mode 100644 index 000000000000..e690577b32ed --- /dev/null +++ b/editors/zoinks/files/patch-fw-TTextView.cpp @@ -0,0 +1,11 @@ +--- fw/TTextView.cpp.orig 2007-11-03 00:01:15.000000000 +0100 ++++ fw/TTextView.cpp 2007-11-03 00:01:40.000000000 +0100 +@@ -451,7 +451,7 @@ + { + if (offset < fSelectionAnchor) + { +- selectionStart = selectionStart = fLayout->GetLineOffset(fLayout->OffsetToLine(offset)); ++ selectionStart = fLayout->GetLineOffset(fLayout->OffsetToLine(offset)); + selectionEnd = fSelectionAnchorEnd; + } + else if (offset > fSelectionAnchorEnd) diff --git a/editors/zoinks/files/patch-fw-TTopLevelWindow.cpp b/editors/zoinks/files/patch-fw-TTopLevelWindow.cpp new file mode 100644 index 000000000000..adc4f3600d75 --- /dev/null +++ b/editors/zoinks/files/patch-fw-TTopLevelWindow.cpp @@ -0,0 +1,13 @@ +--- ./fw/TTopLevelWindow.cpp.orig 2007-11-03 00:02:58.000000000 +0100 ++++ ./fw/TTopLevelWindow.cpp 2007-11-03 00:03:17.000000000 +0100 +@@ -91,8 +91,8 @@ + } + + XClassHint* classHints = XAllocClassHint(); +- classHints->res_name = "Zoinks"; +- classHints->res_class = "ZOINKS"; ++ classHints->res_name = (char *)"Zoinks"; ++ classHints->res_class = (char *)"ZOINKS"; + + int argc = 0; + char** argv = NULL; diff --git a/editors/zoinks/files/patch-fw-TWindow.cpp b/editors/zoinks/files/patch-fw-TWindow.cpp new file mode 100644 index 000000000000..a4c07b37d533 --- /dev/null +++ b/editors/zoinks/files/patch-fw-TWindow.cpp @@ -0,0 +1,41 @@ +--- fw/TWindow.cpp.orig 2003-04-16 21:38:57.000000000 +0200 ++++ fw/TWindow.cpp 2007-11-04 22:35:45.000000000 +0100 +@@ -502,7 +502,7 @@ + return false; + + XIMStyles* supportedStyles; +- XGetIMValues(xim, XNQueryInputStyle, &supportedStyles, NULL, NULL); ++ XGetIMValues(xim, XNQueryInputStyle, &supportedStyles, (char *)NULL); + if (!supportedStyles || supportedStyles->count_styles == 0) + return false; + +@@ -542,12 +542,12 @@ + + TFont* font = GetFont(); + ASSERT(font && font->GetFontSet()); +- XVaNestedList preeditAttributes = XVaCreateNestedList(0, XNFontSet, font->GetFontSet(), XNSpotLocation, &point, XNArea, &rect, NULL); ++ XVaNestedList preeditAttributes = XVaCreateNestedList(0, XNFontSet, font->GetFontSet(), XNSpotLocation, &point, XNArea, &rect, (char *)NULL); + ASSERT(preeditAttributes); + // XVaNestedList statusAttributes = XVaCreateNestedList(0, XNFontSet, font->GetFontSet(), NULL); + // ASSERT(statusAttributes); + +- XIC xic = XCreateIC(xim, XNInputStyle, style, XNClientWindow, fWindow, XNFocusWindow, fWindow, XNPreeditAttributes, preeditAttributes, /*XNStatusAttributes, statusAttributes, */ NULL); ++ XIC xic = XCreateIC(xim, XNInputStyle, style, XNClientWindow, fWindow, XNFocusWindow, fWindow, XNPreeditAttributes, preeditAttributes, /*XNStatusAttributes, statusAttributes, */ (char *)NULL); + if (xic) + fInputContext = new TInputContext(xic); + +@@ -657,7 +657,14 @@ + { + time = CurrentTime; // ignore time for now + ++#if 0 ++ Pietro Cerutti ++ We may not be the active window ++ anymore by this time ++ + ASSERT(sPointerGrabWindow == this); ++#endif ++ if(sPointerGrabWindow != this) return; + + XUngrabPointer(sDisplay, time); + diff --git a/editors/zoinks/files/patch-ide-TLogDocument.cpp b/editors/zoinks/files/patch-ide-TLogDocument.cpp new file mode 100644 index 000000000000..524b2dfa851e --- /dev/null +++ b/editors/zoinks/files/patch-ide-TLogDocument.cpp @@ -0,0 +1,11 @@ +--- ide/TLogDocument.cpp.orig 2007-11-03 00:04:36.000000000 +0100 ++++ ide/TLogDocument.cpp 2007-11-03 00:09:52.000000000 +0100 +@@ -262,7 +262,7 @@ + + void TLogDocument::ClearText() + { +- fTextView->SetText(""); ++ fTextView->SetText((char *)""); + } + + diff --git a/editors/zoinks/files/patch-ide-TProjectDocument.cpp b/editors/zoinks/files/patch-ide-TProjectDocument.cpp new file mode 100644 index 000000000000..35ebfc4aa48c --- /dev/null +++ b/editors/zoinks/files/patch-ide-TProjectDocument.cpp @@ -0,0 +1,11 @@ +--- ide/TProjectDocument.cpp.orig 2007-11-04 22:37:49.000000000 +0100 ++++ ide/TProjectDocument.cpp 2007-11-04 22:38:02.000000000 +0100 +@@ -539,7 +539,7 @@ + chdir(workingDirectory); + + const char* command = fExternalDebuggerCommand; +- execl("/bin/sh", "sh", "-c", command, NULL); ++ execl("/bin/sh", "sh", "-c", command, (char *)NULL); + } + else if (pid < 0) + ThrowSystemError(pid); -- cgit