pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/audio/nosefart Fixed gcc 4 error message.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/100a79cfe786
branches:  trunk
changeset: 533751:100a79cfe786
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sat Sep 29 11:31:09 2007 +0000

description:
Fixed gcc 4 error message.

diffstat:

 audio/nosefart/distinfo         |   5 ++-
 audio/nosefart/patches/patch-ab |  44 ++++++++++++++++++++++++++++++++++++----
 audio/nosefart/patches/patch-ac |  19 +++++++++++++++++
 3 files changed, 61 insertions(+), 7 deletions(-)

diffs (107 lines):

diff -r da8a5378b1ec -r 100a79cfe786 audio/nosefart/distinfo
--- a/audio/nosefart/distinfo   Sat Sep 29 11:11:27 2007 +0000
+++ b/audio/nosefart/distinfo   Sat Sep 29 11:31:09 2007 +0000
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.3 2005/02/23 20:39:50 agc Exp $
+$NetBSD: distinfo,v 1.4 2007/09/29 11:31:09 rillig Exp $
 
 SHA1 (nosefart-2.3-mls.tar.bz2) = ab5755674adefa3f6f63e0772245831e7c0be2f7
 RMD160 (nosefart-2.3-mls.tar.bz2) = 54365aaf542d76f726a9b9ebb0d93a7a219c2e5e
 Size (nosefart-2.3-mls.tar.bz2) = 531605 bytes
 SHA1 (patch-aa) = 0ccefb7d1e9cfa7ca147624ac117c9570f012609
-SHA1 (patch-ab) = 325c4038a865ec686a33d440540be16a46445564
+SHA1 (patch-ab) = d70cf260fe4c92b5dbdf286e412f97093a631a1b
+SHA1 (patch-ac) = fc606d92877bc5f83c149b42570249d5f5778219
diff -r da8a5378b1ec -r 100a79cfe786 audio/nosefart/patches/patch-ab
--- a/audio/nosefart/patches/patch-ab   Sat Sep 29 11:11:27 2007 +0000
+++ b/audio/nosefart/patches/patch-ab   Sat Sep 29 11:31:09 2007 +0000
@@ -1,7 +1,7 @@
-$NetBSD: patch-ab,v 1.2 2004/12/03 13:02:18 wiz Exp $
+$NetBSD: patch-ab,v 1.3 2007/09/29 11:31:09 rillig Exp $
 
---- src/linux/main_linux.c.orig        Sat May  1 16:53:54 2004
-+++ src/linux/main_linux.c     Thu Dec  2 01:58:01 2004
+--- src/linux/main_linux.c.orig        2004-05-02 01:53:54.000000000 +0200
++++ src/linux/main_linux.c     2007-09-29 13:23:40.000000000 +0200
 @@ -3,6 +3,7 @@
  UNIX systems */
  
@@ -10,7 +10,32 @@
  #include <stdio.h>
  #include <stdlib.h>
  #include <string.h>
-@@ -342,12 +343,59 @@
+@@ -218,12 +219,12 @@ static void open_hardware(const char *de
+          exit(1);
+       }
+    }
+-   /* if it's not a char device and it's not /dev/dsp */
+-   /* The second check is because when run with esddsp, /dev/dsp
++   /* if it's not a char device and it's not /dev/sound */
++   /* The second check is because when run with esddsp, /dev/sound
+    doesn't show up as a char device. The original author (Matthew Conte) seems
+    to have thought that esddsp should work without this hack.  Is doing this 
+    bad? --Matthew Strait */
+-   if( !S_ISCHR(status.st_mode) && strcmp("/dev/dsp", device))
++   if( !S_ISCHR(status.st_mode) && strcmp("/dev/sound", device))
+    {
+       printf("%s is not a character device.\n", device);
+       exit(1);
+@@ -305,7 +306,7 @@ static void show_help(void)
+    printf("\t-h  \tHelp\n");
+    printf("\t-v  \tVersion information\n");
+    printf("\n\t-t x\tStart playing track x (default: 1)\n");
+-   printf("\n\t-d x\tUse device x (default: /dev/dsp)\n");
++   printf("\n\t-d x\tUse device x (default: /dev/sound)\n");
+    printf("\t-s x\tPlay at x times the normal speed.\n");
+    printf("\t-f x\tUse x sampling rate (default: 44100)\n");
+    printf("\t-l x\tLimit total playing time to x seconds (0 = unlimited)\n");
+@@ -342,12 +343,59 @@ static void show_info(void)
  static void printsonginfo(int current_frame, int total_frames, int limited)
  {
     /*Why not printf directly?  Our termios hijinks for input kills the output*/
@@ -70,7 +95,7 @@
     snprintf(hi, 254, 
     total_frames != 0 ? 
     "Playing track %d/%d, channels %c%c%c%c%c%c, %d/%d sec, %d/%d frames\r":
-@@ -363,9 +411,16 @@
+@@ -363,9 +411,16 @@ static void printsonginfo(int current_fr
     current_frame,
     total_frames
     );
@@ -87,3 +112,12 @@
  
     write(STDOUT_FILENO, (void *)hi, strlen(hi));
     free(hi);
+@@ -565,7 +620,7 @@ static void close_nsf_file(void)
+ /* HAS ROOT PERMISSIONS -- BE CAREFUL */
+ int main(int argc, char **argv)
+ {
+-   char *device = "/dev/dsp";
++   char *device = "/dev/sound";
+    char *filename;
+    int track = 1;
+    int done = 0;
diff -r da8a5378b1ec -r 100a79cfe786 audio/nosefart/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/audio/nosefart/patches/patch-ac   Sat Sep 29 11:31:09 2007 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-ac,v 1.1 2007/09/29 11:31:09 rillig Exp $
+
+Doing weird things in C requires weird code. Since gcc 4, casts return
+an rvalue instead of an lvalue.
+
+--- src/sndhrdw/nes_apu.c.orig 2003-05-04 20:39:04.000000000 +0200
++++ src/sndhrdw/nes_apu.c      2007-09-29 13:27:16.000000000 +0200
+@@ -1035,9 +1035,9 @@ void apu_process(void *buffer, int num_s
+ 
+       /* signed 16-bit output, unsigned 8-bit */
+       if (16 == apu->sample_bits)
+-         *((int16 *) buffer)++ = (int16) accum;
++         *(*((int16 **) &buffer))++ = (int16) accum;
+       else
+-         *((uint8 *) buffer)++ = (accum >> 8) ^ 0x80;
++         *(*((uint8 **) &buffer))++ = (accum >> 8) ^ 0x80;
+    }
+ 
+    /* resync cycle counter */



Home | Main Index | Thread Index | Old Index