summaryrefslogtreecommitdiff
path: root/net/amule/patches
diff options
context:
space:
mode:
Diffstat (limited to 'net/amule/patches')
-rw-r--r--net/amule/patches/patch-aa28
-rw-r--r--net/amule/patches/patch-ab28
2 files changed, 56 insertions, 0 deletions
diff --git a/net/amule/patches/patch-aa b/net/amule/patches/patch-aa
new file mode 100644
index 00000000000..1fb99accb31
--- /dev/null
+++ b/net/amule/patches/patch-aa
@@ -0,0 +1,28 @@
+$NetBSD: patch-aa,v 1.1 2004/02/13 11:18:29 jmmv Exp $
+
+--- src/OScopeCtrl.cpp.orig 2004-02-10 02:36:27.000000000 +0100
++++ src/OScopeCtrl.cpp
+@@ -17,6 +17,8 @@
+ // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ //
+
++#include <config.h>
++
+ #include "sys.h"
+ #include <cmath>
+ #include <algorithm> // Needed for std::max
+@@ -265,11 +267,10 @@ void COScopeCtrl::RecreateGrid()
+ dcGrid->DrawText(strTemp,rectPlot.left-4-sizX, rectPlot.bottom);
+
+ // x units
+-#if defined(__GNUC__) && __GNUC__ >= 3
+- strTemp = CastSecondsToHM((nPlotWidth/nShiftPixels) * (int)round(sLastPeriod));
+-#endif
+-#if !defined(__GNUC__) || __GNUC__ < 3
++#if defined(HAVE_FLOOR)
+ strTemp = CastSecondsToHM((nPlotWidth/nShiftPixels) * (int)floor(sLastPeriod));
++#else
++ strTemp = CastSecondsToHM((nPlotWidth/nShiftPixels) * (int)round(sLastPeriod));
+ #endif
+ strXUnits.Format((bStopped ? "Disabled [%s]" : "%s"), strTemp.GetBuffer());
+
diff --git a/net/amule/patches/patch-ab b/net/amule/patches/patch-ab
new file mode 100644
index 00000000000..dffd1214d4e
--- /dev/null
+++ b/net/amule/patches/patch-ab
@@ -0,0 +1,28 @@
+$NetBSD: patch-ab,v 1.1 2004/02/13 11:18:29 jmmv Exp $
+
+--- src/UploadQueue.cpp.orig 2004-02-10 02:36:28.000000000 +0100
++++ src/UploadQueue.cpp
+@@ -15,6 +15,8 @@
+ //along with this program; if not, write to the Free Software
+ //Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
++#include <config.h>
++
+ #include "sys.h"
+ #include <cstring>
+ #include <cmath> // Needed for std::exp
+@@ -335,11 +337,10 @@ bool CUploadQueue::AcceptNewClient()
+ } else {
+ uint16 nMaxSlots = 0;
+ if (theApp.glob_prefs->GetMaxUpload() >= 10) {
+-#if defined(__GNUC__) && __GNUC__ >= 3
+- nMaxSlots = (uint16)round((float)theApp.glob_prefs->GetMaxUpload() / kBpsUpPerClient);
+-#endif
+-#if !defined(__GNUC__) || __GNUC__ < 3
++#if defined(HAVE_FLOOR)
+ nMaxSlots = (uint16)floor((float)theApp.glob_prefs->GetMaxUpload() / kBpsUpPerClient);
++#else
++ nMaxSlots = (uint16)round((float)theApp.glob_prefs->GetMaxUpload() / kBpsUpPerClient);
+ #endif
+ if (nMaxSlots < MIN_UP_CLIENTS_ALLOWED) {
+ nMaxSlots=MIN_UP_CLIENTS_ALLOWED;