Fix build errors with Clang. Patch from scintilla 3.7.4.

OK espie@, naddy@
This commit is contained in:
fcambus 2017-05-02 20:48:21 +00:00
parent 09e277be26
commit 92139bf869
2 changed files with 19 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.21 2017/04/10 11:45:27 sthen Exp $
# $OpenBSD: Makefile,v 1.22 2017/05/02 20:48:21 fcambus Exp $
COMMENT= source code editing component for GTK+
@ -6,7 +6,7 @@ VERSION= 3.5.2
DISTNAME= scintilla${VERSION:S/.//g}
PKGNAME= scintilla-${VERSION}
CATEGORIES= editors x11
REVISION= 0
REVISION= 1
SHARED_LIBS= scintilla 9.0 \
scintilla_lexers 9.0
@ -20,6 +20,8 @@ PERMIT_PACKAGE_FTP= Yes
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=scintilla/}
EXTRACT_SUFX= .tgz
PATCHORIG= .orig.port
USE_GMAKE= Yes
NO_TEST= Yes

View File

@ -0,0 +1,15 @@
$OpenBSD: patch-gtk_ScintillaGTK_cxx,v 1.4 2017/05/02 20:48:21 fcambus Exp $
Fix build with Clang. Patch from Scintilla 3.7.4.
--- gtk/ScintillaGTK.cxx.orig
+++ gtk/ScintillaGTK.cxx
@@ -1637,7 +1637,7 @@ void ScintillaGTK::ReceivedDrop(GtkSelectionData *sele
drop.push_back('\0');
NotifyURIDropped(&drop[0]);
} else if ((TypeOfGSD(selection_data) == GDK_TARGET_STRING) || (TypeOfGSD(selection_data) == atomUTF8)) {
- if (TypeOfGSD(selection_data) > 0) {
+ if (LengthOfGSD(selection_data) > 0) {
SelectionText selText;
GetGtkSelectionText(selection_data, selText);
DropAt(posDrop, selText.Data(), selText.Length(), false, selText.rectangular);