aboutsummaryrefslogtreecommitdiffstats
path: root/games/csmash
diff options
context:
space:
mode:
authoranholt <anholt@FreeBSD.org>2005-05-07 02:17:10 +0800
committeranholt <anholt@FreeBSD.org>2005-05-07 02:17:10 +0800
commit87a992274cbd6da9f645ddc608b7d4ddcd1c1be3 (patch)
tree61af60423f14033940efdd4b39d5e67853d62607 /games/csmash
parent44f7333768cad1af77c518677a268ae9d010a2ac (diff)
downloadfreebsd-ports-gnome-87a992274cbd6da9f645ddc608b7d4ddcd1c1be3.tar.gz
freebsd-ports-gnome-87a992274cbd6da9f645ddc608b7d4ddcd1c1be3.tar.zst
freebsd-ports-gnome-87a992274cbd6da9f645ddc608b7d4ddcd1c1be3.zip
Attempt to fix the build failure on i386 (now instead of amd64) in a more brute-
force fashion. Instead of trying to get types right for this templated function, just make the function (used exactly once) take and return longs. Reported by: krismail
Diffstat (limited to 'games/csmash')
-rw-r--r--games/csmash/files/patch-loadparts.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/games/csmash/files/patch-loadparts.cpp b/games/csmash/files/patch-loadparts.cpp
index cab4e05cc796..c9d438a737a9 100644
--- a/games/csmash/files/patch-loadparts.cpp
+++ b/games/csmash/files/patch-loadparts.cpp
@@ -1,11 +1,12 @@
--- loadparts.cpp.orig Wed May 4 19:19:33 2005
-+++ loadparts.cpp Wed May 4 19:19:48 2005
-@@ -245,7 +245,7 @@
++++ loadparts.cpp Fri May 6 11:11:49 2005
+@@ -69,8 +69,7 @@
+ return a <= x && x <= b;
+ }
- while ('\\' == line[l-1]) {
- // concat next line(s)
-- int bufsize = clamp(0U, sizeof(line)-l, sizeof(line)-1);
-+ int bufsize = clamp(0UL, sizeof(line)-l, sizeof(line)-1);
- fgets(&line[l-2], bufsize, fp);
- if (feof((FILE*)fp)) break;
- l = strlen(line);
+-template <typename T>
+-inline const T& clamp(const T& a, const T& x, const T& b) {
++inline const long clamp(long a, long x, long b) {
+ if (a > x) return a;
+ elif (b < x) return b;
+ else return x;