aboutsummaryrefslogtreecommitdiffstats
path: root/games
diff options
context:
space:
mode:
authorglewis <glewis@FreeBSD.org>2004-06-22 02:36:33 +0800
committerglewis <glewis@FreeBSD.org>2004-06-22 02:36:33 +0800
commit10e64e395e611671d47f73781fbf235eb8f951b3 (patch)
tree6913ee6f92271e5bac3226f1dcb56451e82469e5 /games
parent82490f2eaa761c04c431492f7644dbdb96fc447f (diff)
downloadfreebsd-ports-gnome-10e64e395e611671d47f73781fbf235eb8f951b3.tar.gz
freebsd-ports-gnome-10e64e395e611671d47f73781fbf235eb8f951b3.tar.zst
freebsd-ports-gnome-10e64e395e611671d47f73781fbf235eb8f951b3.zip
. Fix the build for gcc 3.4:
"'lrint' is a gcc3.4 builtin and gcc3.4 is unhappy if we use that for anything else." Obtained from: DragonFly (dillon)
Diffstat (limited to 'games')
-rw-r--r--games/bsdgames/files/patch-larn::diag.c31
-rw-r--r--games/bsdgames/files/patch-larn::header.h13
-rw-r--r--games/bsdgames/files/patch-larn::io.c31
-rw-r--r--games/freebsd-games/files/patch-larn::diag.c31
-rw-r--r--games/freebsd-games/files/patch-larn::header.h13
-rw-r--r--games/freebsd-games/files/patch-larn::io.c31
6 files changed, 150 insertions, 0 deletions
diff --git a/games/bsdgames/files/patch-larn::diag.c b/games/bsdgames/files/patch-larn::diag.c
new file mode 100644
index 000000000000..f3cf3d0a5c8b
--- /dev/null
+++ b/games/bsdgames/files/patch-larn::diag.c
@@ -0,0 +1,31 @@
+$FreeBSD$
+
+--- larn/diag.c 17 Jun 2003 04:25:24 -0000 1.2
++++ larn/diag.c 21 Jun 2004 02:28:34 -0000 1.3
+@@ -210,7 +210,7 @@
+ if (beenhere[k])
+ lrfill((char*)&cell[k*MAXX*MAXY],sizeof(struct cel)*MAXY*MAXX);
+
+- lrfill((char*)&c[0],100*sizeof(long)); gtime = lrint();
++ lrfill((char*)&c[0],100*sizeof(long)); gtime = lrint_x();
+ level = c[CAVELEVEL] = lgetc();
+ playerx = lgetc(); playery = lgetc();
+ lrfill((char*)iven,26); lrfill((char*)ivenarg,26*sizeof(short));
+@@ -241,7 +241,7 @@
+ }
+
+ time(&zzz);
+- initialtime = zzz-lrint();
++ initialtime = zzz-lrint_x();
+ fstat(fd,&filetimes); /* get the creation and modification time of file */
+ lrfill((char*)&zzz,sizeof(long)); zzz += 6;
+ if (filetimes.st_ctime > zzz) fsorry(); /* file create time */
+@@ -249,7 +249,7 @@
+ if (c[HP]<0) { died(284); return; } /* died a post mortem death */
+
+ oldx = oldy = 0;
+- i = lrint(); /* inode # */
++ i = lrint_x(); /* inode # */
+ if (i && (filetimes.st_ino!=i)) fsorry();
+ lrclose();
+ if (strcmp(fname,ckpfile) == 0)
diff --git a/games/bsdgames/files/patch-larn::header.h b/games/bsdgames/files/patch-larn::header.h
new file mode 100644
index 000000000000..ea58c01c7952
--- /dev/null
+++ b/games/bsdgames/files/patch-larn::header.h
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- larn/header.h 17 Jun 2003 02:49:28 -0000 1.1
++++ larn/header.h 21 Jun 2004 02:28:34 -0000 1.2
+@@ -359,7 +359,7 @@
+
+ char *fortune(),*lgetw(),*lgetl();
+ char *tmcapcnv();
+-long paytaxes(),lgetc(),lrint();
++long paytaxes(),lgetc(),lrint_x();
+ unsigned long readnum();
+
+ /* macro to create scroll #'s with probability of occurrence */
diff --git a/games/bsdgames/files/patch-larn::io.c b/games/bsdgames/files/patch-larn::io.c
new file mode 100644
index 000000000000..ec579ab00de7
--- /dev/null
+++ b/games/bsdgames/files/patch-larn::io.c
@@ -0,0 +1,31 @@
+$FreeBSD$
+
+--- larn/io.c 24 Jan 2004 21:00:14 -0000 1.3
++++ larn/io.c 21 Jun 2004 02:28:34 -0000 1.4
+@@ -25,7 +25,7 @@
+ * FILE INPUT ROUTINES
+ *
+ * long lgetc() read one character from input buffer
+- * long lrint() read one integer from input buffer
++ * long lrint_x() read one integer from input buffer
+ * lrfill(address,number) put input bytes into a buffer
+ * char *lgetw() get a whitespace ended word from input
+ * char *lgetl() get a \n or EOF ended line from input
+@@ -343,7 +343,7 @@
+ }
+
+ /*
+- * long lrint() Read one integer from input buffer
++ * long lrint_x() Read one integer from input buffer
+ *
+ * +---------+---------+---------+---------+
+ * | high | | | low |
+@@ -355,7 +355,7 @@
+ * The save order is low order first, to high order (4 bytes total)
+ * Returns the int read
+ */
+-long lrint()
++long lrint_x()
+ {
+ unsigned long i;
+ i = 255 & lgetc(); i |= (255 & lgetc()) << 8;
diff --git a/games/freebsd-games/files/patch-larn::diag.c b/games/freebsd-games/files/patch-larn::diag.c
new file mode 100644
index 000000000000..f3cf3d0a5c8b
--- /dev/null
+++ b/games/freebsd-games/files/patch-larn::diag.c
@@ -0,0 +1,31 @@
+$FreeBSD$
+
+--- larn/diag.c 17 Jun 2003 04:25:24 -0000 1.2
++++ larn/diag.c 21 Jun 2004 02:28:34 -0000 1.3
+@@ -210,7 +210,7 @@
+ if (beenhere[k])
+ lrfill((char*)&cell[k*MAXX*MAXY],sizeof(struct cel)*MAXY*MAXX);
+
+- lrfill((char*)&c[0],100*sizeof(long)); gtime = lrint();
++ lrfill((char*)&c[0],100*sizeof(long)); gtime = lrint_x();
+ level = c[CAVELEVEL] = lgetc();
+ playerx = lgetc(); playery = lgetc();
+ lrfill((char*)iven,26); lrfill((char*)ivenarg,26*sizeof(short));
+@@ -241,7 +241,7 @@
+ }
+
+ time(&zzz);
+- initialtime = zzz-lrint();
++ initialtime = zzz-lrint_x();
+ fstat(fd,&filetimes); /* get the creation and modification time of file */
+ lrfill((char*)&zzz,sizeof(long)); zzz += 6;
+ if (filetimes.st_ctime > zzz) fsorry(); /* file create time */
+@@ -249,7 +249,7 @@
+ if (c[HP]<0) { died(284); return; } /* died a post mortem death */
+
+ oldx = oldy = 0;
+- i = lrint(); /* inode # */
++ i = lrint_x(); /* inode # */
+ if (i && (filetimes.st_ino!=i)) fsorry();
+ lrclose();
+ if (strcmp(fname,ckpfile) == 0)
diff --git a/games/freebsd-games/files/patch-larn::header.h b/games/freebsd-games/files/patch-larn::header.h
new file mode 100644
index 000000000000..ea58c01c7952
--- /dev/null
+++ b/games/freebsd-games/files/patch-larn::header.h
@@ -0,0 +1,13 @@
+$FreeBSD$
+
+--- larn/header.h 17 Jun 2003 02:49:28 -0000 1.1
++++ larn/header.h 21 Jun 2004 02:28:34 -0000 1.2
+@@ -359,7 +359,7 @@
+
+ char *fortune(),*lgetw(),*lgetl();
+ char *tmcapcnv();
+-long paytaxes(),lgetc(),lrint();
++long paytaxes(),lgetc(),lrint_x();
+ unsigned long readnum();
+
+ /* macro to create scroll #'s with probability of occurrence */
diff --git a/games/freebsd-games/files/patch-larn::io.c b/games/freebsd-games/files/patch-larn::io.c
new file mode 100644
index 000000000000..ec579ab00de7
--- /dev/null
+++ b/games/freebsd-games/files/patch-larn::io.c
@@ -0,0 +1,31 @@
+$FreeBSD$
+
+--- larn/io.c 24 Jan 2004 21:00:14 -0000 1.3
++++ larn/io.c 21 Jun 2004 02:28:34 -0000 1.4
+@@ -25,7 +25,7 @@
+ * FILE INPUT ROUTINES
+ *
+ * long lgetc() read one character from input buffer
+- * long lrint() read one integer from input buffer
++ * long lrint_x() read one integer from input buffer
+ * lrfill(address,number) put input bytes into a buffer
+ * char *lgetw() get a whitespace ended word from input
+ * char *lgetl() get a \n or EOF ended line from input
+@@ -343,7 +343,7 @@
+ }
+
+ /*
+- * long lrint() Read one integer from input buffer
++ * long lrint_x() Read one integer from input buffer
+ *
+ * +---------+---------+---------+---------+
+ * | high | | | low |
+@@ -355,7 +355,7 @@
+ * The save order is low order first, to high order (4 bytes total)
+ * Returns the int read
+ */
+-long lrint()
++long lrint_x()
+ {
+ unsigned long i;
+ i = 255 & lgetc(); i |= (255 & lgetc()) << 8;