view src/wxwidgets-1-c++11-related-fixes.patch @ 4364:39e5f8d6cb85

of-image: update to 2.4.6 * build_packages.m: update io version * src/of-io.mk: update version, checksum, and subdir * src/of-io-1-fixes.patch: removed * dist-files.mk: remove ref to of-image-1-fixes.patch
author John D
date Tue, 14 Mar 2017 12:27:39 -0400
parents ae1280afbc8c
children
line wrap: on
line source

From: Boris Pek <tehnick-8@mail.ru>
Date: Thu, 05 May 2016 19:11:19 +0300
Subject: [PATCH] fix build with GCC >= 6.x

diff --git a/src/stc/scintilla/src/Editor.cxx b/src/stc/scintilla/src/Editor.cxx
--- a/src/stc/scintilla/src/Editor.cxx
+++ b/src/stc/scintilla/src/Editor.cxx
@@ -10,6 +10,7 @@
 #include <stdio.h>
 #include <ctype.h>
 #include <assert.h>
+#include <math.h>
 
 #include <string>
 #include <vector>
@@ -5841,9 +5842,9 @@
 }
 
 static bool Close(Point pt1, Point pt2) {
-	if (abs(pt1.x - pt2.x) > 3)
+	if (fabs(pt1.x - pt2.x) > 3)
 		return false;
-	if (abs(pt1.y - pt2.y) > 3)
+	if (fabs(pt1.y - pt2.y) > 3)
 		return false;
 	return true;
 }