pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/games/xpipeman Do not assume a _file member in FILE st...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/3c6ea58f7a5d
branches:  trunk
changeset: 495594:3c6ea58f7a5d
user:      jmmv <jmmv%pkgsrc.org@localhost>
date:      Tue Jun 14 18:32:48 2005 +0000

description:
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:

 games/xpipeman/distinfo         |   4 ++--
 games/xpipeman/patches/patch-af |  41 ++++++++++++++++++++++++++++++++++++-----
 2 files changed, 38 insertions(+), 7 deletions(-)

diffs (71 lines):

diff -r efec17625685 -r 3c6ea58f7a5d games/xpipeman/distinfo
--- a/games/xpipeman/distinfo   Tue Jun 14 18:28:21 2005 +0000
+++ b/games/xpipeman/distinfo   Tue Jun 14 18:32:48 2005 +0000
@@ -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-ac) = d0c388585988208e47b69dcaa1131870f74676a1
 SHA1 (patch-ad) = a97f685ab79b18d7717ccaf8771b34f645492434
 SHA1 (patch-ae) = 850a1d6d46df30303021d09b62879e0d7b3d960b
-SHA1 (patch-af) = ccae962e4a2f4ea4351660174b56ec276fe1ed30
+SHA1 (patch-af) = 7b1f5bcbe9518668bd1ca84fd7e58309dedfb232
diff -r efec17625685 -r 3c6ea58f7a5d games/xpipeman/patches/patch-af
--- a/games/xpipeman/patches/patch-af   Tue Jun 14 18:28:21 2005 +0000
+++ b/games/xpipeman/patches/patch-af   Tue Jun 14 18:32:48 2005 +0000
@@ -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();



Home | Main Index | Thread Index | Old Index