summaryrefslogtreecommitdiff
path: root/games/xpipeman
diff options
context:
space:
mode:
authorjmmv <jmmv@pkgsrc.org>2005-06-14 18:32:48 +0000
committerjmmv <jmmv@pkgsrc.org>2005-06-14 18:32:48 +0000
commitfad1e9ffcbdb4839ec67892486b9991879942797 (patch)
tree493f72f6c2509aee8243fe9d16611b25ded2b45c /games/xpipeman
parent325c3e4463d3a5a3f33d5d148e21ca966d1f92ef (diff)
downloadpkgsrc-fad1e9ffcbdb4839ec67892486b9991879942797.tar.gz
Do not assume a _file member in FILE structures as it may not exist on some
systems (e.g., Linux). Instead, use fileno(3). Closes PR pkg/29498.
Diffstat (limited to 'games/xpipeman')
-rw-r--r--games/xpipeman/distinfo4
-rw-r--r--games/xpipeman/patches/patch-af41
2 files changed, 38 insertions, 7 deletions
diff --git a/games/xpipeman/distinfo b/games/xpipeman/distinfo
index 5e61361afe5..59a4d07fe44 100644
--- a/games/xpipeman/distinfo
+++ b/games/xpipeman/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2005/02/23 23:12:05 agc Exp $
+$NetBSD: distinfo,v 1.4 2005/06/14 18:32:48 jmmv Exp $
SHA1 (xpipeman-1.5.tar.gz) = 065ec572f7be019737e2bb9ed131bc907c713cc5
RMD160 (xpipeman-1.5.tar.gz) = 9668409dadf70bf5bf4a546a3340846191937c74
@@ -8,4 +8,4 @@ SHA1 (patch-ab) = 43bea8141e49a300402d435d4858ec61284efa52
SHA1 (patch-ac) = d0c388585988208e47b69dcaa1131870f74676a1
SHA1 (patch-ad) = a97f685ab79b18d7717ccaf8771b34f645492434
SHA1 (patch-ae) = 850a1d6d46df30303021d09b62879e0d7b3d960b
-SHA1 (patch-af) = ccae962e4a2f4ea4351660174b56ec276fe1ed30
+SHA1 (patch-af) = 7b1f5bcbe9518668bd1ca84fd7e58309dedfb232
diff --git a/games/xpipeman/patches/patch-af b/games/xpipeman/patches/patch-af
index e164c714e38..61d80e09ca5 100644
--- a/games/xpipeman/patches/patch-af
+++ b/games/xpipeman/patches/patch-af
@@ -1,16 +1,47 @@
-$NetBSD: patch-af,v 1.2 1998/11/12 23:34:32 frueauf Exp $
+$NetBSD: patch-af,v 1.3 2005/06/14 18:32:48 jmmv Exp $
---- score.c.orig Sun Aug 9 03:56:41 1998
-+++ score.c Sun Aug 9 03:57:23 1998
-@@ -72,3 +72,3 @@
+--- score.c.orig 1991-09-13 22:32:12.000000000 +0200
++++ score.c
+@@ -70,7 +70,7 @@ void show_scores(),
+ write_out_scores();
+
static FILE *scorefile = 0;
-char *score_filename;
+extern AppData app_data;
-@@ -102,4 +102,4 @@
+ /*----------------------------------------------------------------------*/
+
+@@ -87,7 +87,7 @@ check_score(current_score,level)
+ }
+ if(scorefile) {
+ #ifndef SYSV
+- flock(scorefile->_file, LOCK_UN);
++ flock(fileno(scorefile), LOCK_UN);
+ #endif
+ fclose(scorefile);
+ show_scores();
+@@ -100,12 +100,12 @@ load_scores()
+ {
+ int i = 0;
- if( !(scorefile = fopen(score_filename,"r+")) ) {
- scorefile = fopen(score_filename, "w");
+ if( !(scorefile = fopen(app_data.score_filename,"r+")) ) {
+ scorefile = fopen(app_data.score_filename, "w");
return;
+ }
+ #ifndef SYSV
+- flock(scorefile->_file, LOCK_EX);
++ flock(fileno(scorefile), LOCK_EX);
+ #endif
+ while( fgets(scores[i].score,6,scorefile) /* get score */
+ && fgets(scores[i].name,26,scorefile) /* get name */
+@@ -281,7 +281,7 @@ show_scores_callback()
+
+ if(scorefile) {
+ #ifndef SYSV
+- flock(scorefile->_file, LOCK_UN);
++ flock(fileno(scorefile), LOCK_UN);
+ #endif
+ fclose(scorefile);
+ show_scores();