- Unbreak

- Fix build with gcc 4.2

PR:		117776
Submitted by:	pietro cerutti <gahr@gahr.ch>
Approved by:	portmgr (pav)
This commit is contained in:
Martin Wilke 2007-11-05 10:04:15 +00:00
parent a27af5b889
commit 9fe1834c7a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=202506
8 changed files with 122 additions and 6 deletions

View file

@ -41,10 +41,8 @@ pre-everything::
@${ECHO_MSG} "Use WITH_IMLIB=yes to enable these features."
@${ECHO_MSG} ""
.include <bsd.port.pre.mk>
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 <bsd.port.post.mk>
.include <bsd.port.mk>

View file

@ -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
}

View file

@ -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);
}

View file

@ -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)

View file

@ -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;

View file

@ -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 <gahr@gahr.ch>
+ We may not be the active window
+ anymore by this time
+
ASSERT(sPointerGrabWindow == this);
+#endif
+ if(sPointerGrabWindow != this) return;
XUngrabPointer(sDisplay, time);

View file

@ -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 *)"");
}

View file

@ -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);