pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/audio/xcdplayer Call time() correctly; fixes netbsd-5 ...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/934b3c8bbdbe
branches:  trunk
changeset: 604716:934b3c8bbdbe
user:      dholland <dholland%pkgsrc.org@localhost>
date:      Sat Jun 02 20:00:49 2012 +0000

description:
Call time() correctly; fixes netbsd-5 build.

diffstat:

 audio/xcdplayer/distinfo         |   4 ++--
 audio/xcdplayer/patches/patch-al |  30 ++++++++++++++++++++++--------
 2 files changed, 24 insertions(+), 10 deletions(-)

diffs (81 lines):

diff -r 14eab7e506ed -r 934b3c8bbdbe audio/xcdplayer/distinfo
--- a/audio/xcdplayer/distinfo  Sat Jun 02 19:38:56 2012 +0000
+++ b/audio/xcdplayer/distinfo  Sat Jun 02 20:00:49 2012 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.8 2011/09/12 06:50:00 dholland Exp $
+$NetBSD: distinfo,v 1.9 2012/06/02 20:00:49 dholland Exp $
 
 SHA1 (xcdplayer-2.2.tar.Z) = e518f2df9fcc5e21e1123fe6f5b1193f232b76ef
 RMD160 (xcdplayer-2.2.tar.Z) = ba34fe8092aa96d6370320b20fa46b0b0d043176
@@ -14,7 +14,7 @@
 SHA1 (patch-ai) = 1bf094380473d4a88c61378ff6172a90df510541
 SHA1 (patch-aj) = da8f0dccc7f0678bf9d2e820008813156ea25182
 SHA1 (patch-ak) = 60f93385ab2eb0347a40e5516ec925117ce94b9d
-SHA1 (patch-al) = 822369ea9ca9b0ff9a92ebd303dc976570395bde
+SHA1 (patch-al) = 1a05b5669ef64f4363ccfa877b0c350d374144e9
 SHA1 (patch-am) = 16347fa0157de6ecca0c8c6c946cbb3a1c406ecb
 SHA1 (patch-cdrom__sgi_c) = bb958cc315bc3ad822da54ffdd00975037f46ef0
 SHA1 (patch-cdrom__sun_c) = 23149cbe48011a53219f90098de1eb4d487a3ab0
diff -r 14eab7e506ed -r 934b3c8bbdbe audio/xcdplayer/patches/patch-al
--- a/audio/xcdplayer/patches/patch-al  Sat Jun 02 19:38:56 2012 +0000
+++ b/audio/xcdplayer/patches/patch-al  Sat Jun 02 20:00:49 2012 +0000
@@ -1,10 +1,12 @@
-$NetBSD: patch-al,v 1.5 2011/09/04 22:05:39 dholland Exp $
+$NetBSD: patch-al,v 1.6 2012/06/02 20:00:50 dholland Exp $
 
 - needs stdlib.h
 - needs time.h
-- use malloc properly
 - support BSD cdrom interface
 - use the right debug on/off flag
+- don't use own declarations of standard functions
+- use malloc() properly
+- call time() correctly
 
 --- shuffle.c.orig     1993-01-12 18:59:38.000000000 +0000
 +++ shuffle.c
@@ -23,7 +25,7 @@
  #ifdef sun
  # include "cdrom_sun.h"
  #endif
-@@ -29,9 +34,10 @@
+@@ -29,15 +34,10 @@
  
  static unsigned char  *random_tracks;
  
@@ -32,10 +34,16 @@
  void
  shuffle_setup() {
 -      extern char     *malloc();
- #ifdef sgi
-       extern time_t   time(time_t *);
- #else
-@@ -63,7 +69,7 @@ shuffle_setup() {
+-#ifdef sgi
+-      extern time_t   time(time_t *);
+-#else
+-      extern long     time();
+-#endif
+-      extern long     random();
+       unsigned long   seed, now;
+       char            state[128];
+       int             try;
+@@ -63,12 +63,12 @@ shuffle_setup() {
                random_tracks = NULL;
        }
  
@@ -44,7 +52,13 @@
                perror("malloc");
                exit(1);
        }
-@@ -97,7 +103,7 @@ shuffle_setup() {
+ 
+-      now = time((long *) 0);
++      now = time(NULL);
+       seed = now & 0xfff;
+ 
+       initstate(seed, state, sizeof(state));
+@@ -97,7 +97,7 @@ shuffle_setup() {
                random_tracks[i] = try;
        }
  



Home | Main Index | Thread Index | Old Index