# An upstream patch for abs()
#
# - https://github.com/wxWidgets/wxWidgets/commit/73e9e18ea09ffffcaac50237def0d9728a213c02
# - https://trac.macports.org/ticket/53516
# - https://github.com/wxWidgets/wxWidgets/pull/222
--- src/stc/scintilla/src/Editor.cxx.orig
+++ src/stc/scintilla/src/Editor.cxx
@@ -11,6 +11,7 @@
 #include <ctype.h>
 #include <assert.h>
 
+#include <cmath>
 #include <string>
 #include <vector>
 #include <map>
@@ -5841,9 +5842,9 @@ void Editor::GoToLine(int lineNo) {
 }
 
 static bool Close(Point pt1, Point pt2) {
-	if (abs(pt1.x - pt2.x) > 3)
+	if (std::abs(pt1.x - pt2.x) > 3)
 		return false;
-	if (abs(pt1.y - pt2.y) > 3)
+	if (std::abs(pt1.y - pt2.y) > 3)
 		return false;
 	return true;
 }
