pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/53777: www/webkit24-gtk syntax errors -- fails to compile
>Number: 53777
>Category: pkg
>Synopsis: www/webkit24-gtk syntax errors -- fails to compile
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 11 15:05:01 +0000 2018
>Originator: Alexander Garvin
>Release: pkgsrc-current 2018-12-11
>Organization:
>Environment:
Linux -- 4.19.5-300.fc29.x86_64 #1 SMP Tue Nov 27 19:29:23 UTC 2018 x86_64 GNU/Linux
>Description:
abs() is called three times on a "gdouble". in files:
Source/WebCore/platform/gtk/GtkClickCounter.cpp
Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp
This causes errors and the package fails to compile.
>How-To-Repeat:
cd /usr/pkgsrc/www/webkit24-gtk && bmake
>Fix:
diff -ruN Source/WebCore/platform/gtk/GtkClickCounter.cpp Source.patched/WebCore/platform/gtk/GtkClickCounter.cpp
--- Source/WebCore/platform/gtk/GtkClickCounter.cpp 2018-12-11 14:44:31.858499388 +0000
+++ Source.patched/WebCore/platform/gtk/GtkClickCounter.cpp 2018-12-11 14:48:18.482912538 +0000
@@ -83,9 +83,14 @@
// GDK logic for counting clicks.
GdkEvent* event(reinterpret_cast<GdkEvent*>(buttonEvent));
guint32 eventTime = getEventTime(event);
+
+ int abs_bE_sub_prevCP = (buttonEvent->x - m_previousClickPoint.x()) > 0?
+ (buttonEvent->x - m_previousClickPoint.x()) :
+ -(buttonEvent->x - m_previousClickPoint.x());
+
if ((event->type == GDK_2BUTTON_PRESS || event->type == GDK_3BUTTON_PRESS)
- || ((abs(buttonEvent->x - m_previousClickPoint.x()) < doubleClickDistance)
- && (abs(buttonEvent->y - m_previousClickPoint.y()) < doubleClickDistance)
+ || ((abs_bE_sub_prevCP < doubleClickDistance)
+ && (abs_bE_sub_prevCP < doubleClickDistance)
&& (eventTime - m_previousClickTime < static_cast<guint>(doubleClickTime))
&& (buttonEvent->button == m_previousClickButton)))
m_currentClickCount++;
diff -ruN Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp Source.patched/WebCore/platform/gtk/LocalizedStringsGtk.cpp
--- Source/WebCore/platform/gtk/LocalizedStringsGtk.cpp 2018-12-11 14:41:19.074446577 +0000
+++ Source.patched/WebCore/platform/gtk/LocalizedStringsGtk.cpp 2018-12-11 14:48:00.441720433 +0000
@@ -659,7 +659,8 @@
if (!std::isfinite(time))
return String::fromUTF8(_("indefinite time"));
- int seconds = static_cast<int>(abs(time));
+ float abs_time = time > 0? time : -(time);
+ int seconds = static_cast<int>(abs_time);
int days = seconds / (60 * 60 * 24);
int hours = seconds / (60 * 60);
int minutes = (seconds / 60) % 60;
Home |
Main Index |
Thread Index |
Old Index