diff options
Diffstat (limited to 'audio/xcdplayer/patches')
-rw-r--r-- | audio/xcdplayer/patches/patch-aj | 13 | ||||
-rw-r--r-- | audio/xcdplayer/patches/patch-ak | 50 | ||||
-rw-r--r-- | audio/xcdplayer/patches/patch-al | 37 | ||||
-rw-r--r-- | audio/xcdplayer/patches/patch-cdrom__sgi_c | 39 | ||||
-rw-r--r-- | audio/xcdplayer/patches/patch-cdrom__sun_c | 39 |
5 files changed, 158 insertions, 20 deletions
diff --git a/audio/xcdplayer/patches/patch-aj b/audio/xcdplayer/patches/patch-aj index 88268226210..97e6c7621d6 100644 --- a/audio/xcdplayer/patches/patch-aj +++ b/audio/xcdplayer/patches/patch-aj @@ -1,6 +1,11 @@ -$NetBSD: patch-aj,v 1.4 2006/08/12 14:51:39 darcy Exp $ +$NetBSD: patch-aj,v 1.5 2011/09/04 22:05:39 dholland Exp $ ---- main.c.orig Tue Jan 12 19:59:36 1993 +- Rearrange position of some static functions to allow them to +self-define and compile under GCC-4. + +- fix void main. + +--- main.c.orig 1993-01-12 18:59:36.000000000 +0000 +++ main.c @@ -23,13 +23,36 @@ @@ -24,14 +29,14 @@ $NetBSD: patch-aj,v 1.4 2006/08/12 14:51:39 darcy Exp $ + } +} + -+void + void +usage() { + (void) fprintf(stderr, "usage: xcdplayer [-debug]\n"); + + exit(1); +} + - void ++int main(argc, argv) int argc; char **argv; diff --git a/audio/xcdplayer/patches/patch-ak b/audio/xcdplayer/patches/patch-ak index d53d6603d75..6b86b5732f2 100644 --- a/audio/xcdplayer/patches/patch-ak +++ b/audio/xcdplayer/patches/patch-ak @@ -1,13 +1,18 @@ -$NetBSD: patch-ak,v 1.4 2005/12/11 20:48:46 joerg Exp $ +$NetBSD: patch-ak,v 1.5 2011/09/04 22:05:39 dholland Exp $ ---- program.c.orig Tue Jan 12 19:59:49 1993 -+++ program.c Mon Sep 6 18:37:05 1999 +- needs stdlib.h, not malloc.h +- support BSD cdroms +- move function "prototypes" outside of functions +- use malloc properly + +--- program.c.orig 1993-01-12 18:59:49.000000000 +0000 ++++ program.c @@ -27,10 +27,13 @@ # include <stdio.h> # include <string.h> -# include <malloc.h> -+# include <sys/malloc.h> ++# include <stdlib.h> # include "debug.h" # include "cdrom_globs.h" @@ -17,7 +22,7 @@ $NetBSD: patch-ak,v 1.4 2005/12/11 20:48:46 joerg Exp $ #ifdef sun # include "cdrom_sun.h" #endif -@@ -52,6 +55,15 @@ +@@ -52,6 +55,15 @@ static Widget new_track_button; static Boolean adding_to_new_track = False; static struct prognode *current_node = NULL; @@ -33,11 +38,10 @@ $NetBSD: patch-ak,v 1.4 2005/12/11 20:48:46 joerg Exp $ void program_form_setup (parent_widget) Widget parent_widget; -@@ -66,15 +78,6 @@ - Widget cancel_button; +@@ -67,15 +79,6 @@ program_form_setup (parent_widget) Widget save_button; Widget all_button; -- + - extern void cb_move_program_ptr(); - extern void cb_clear_program(); - extern void cb_cancel_program(); @@ -46,6 +50,34 @@ $NetBSD: patch-ak,v 1.4 2005/12/11 20:48:46 joerg Exp $ - extern void cb_add_10(); - extern void cb_new_track(); - extern void cb_program_all(); - +- /* * create program form as a non-managed widget, because this + * form "pops up" when requested, as part of the main form, and +@@ -291,7 +294,7 @@ unsigned char track; + + if (cdi.program == NULL) + { +- new = (struct prognode *) malloc(sizeof(struct prognode)); ++ new = malloc(sizeof(struct prognode)); + new->track = track; + new->next = NULL; + new->prev = NULL; +@@ -304,7 +307,7 @@ unsigned char track; + + else if (current_node == NULL) /* pre-insert */ + { +- new = (struct prognode *) malloc(sizeof(struct prognode)); ++ new = malloc(sizeof(struct prognode)); + new->track = track; + new->next = cdi.program; + new->prev = NULL; +@@ -327,7 +330,7 @@ unsigned char track; + (insert_point != current_node)) + insert_point = insert_point->next; + +- new = (struct prognode *) malloc(sizeof(struct prognode)); ++ new = malloc(sizeof(struct prognode)); + new->track = track; + new->next = insert_point->next; + new->prev = insert_point; diff --git a/audio/xcdplayer/patches/patch-al b/audio/xcdplayer/patches/patch-al index 2247a9d4df7..fe6cbb2797c 100644 --- a/audio/xcdplayer/patches/patch-al +++ b/audio/xcdplayer/patches/patch-al @@ -1,8 +1,19 @@ -$NetBSD: patch-al,v 1.4 2005/12/11 20:48:46 joerg Exp $ +$NetBSD: patch-al,v 1.5 2011/09/04 22:05:39 dholland Exp $ ---- shuffle.c.orig Tue Jan 12 19:59:38 1993 -+++ shuffle.c Mon Sep 6 18:37:05 1999 -@@ -18,6 +18,9 @@ +- needs stdlib.h +- needs time.h +- use malloc properly +- support BSD cdrom interface +- use the right debug on/off flag + +--- shuffle.c.orig 1993-01-12 18:59:38.000000000 +0000 ++++ shuffle.c +@@ -15,9 +15,14 @@ + + # include <X11/Intrinsic.h> + # include <stdio.h> ++# include <stdlib.h> ++# include <time.h> # include "debug.h" # include "cdrom_globs.h" @@ -12,7 +23,7 @@ $NetBSD: patch-al,v 1.4 2005/12/11 20:48:46 joerg Exp $ #ifdef sun # include "cdrom_sun.h" #endif -@@ -29,6 +32,8 @@ +@@ -29,9 +34,10 @@ static unsigned char *random_tracks; @@ -20,8 +31,20 @@ $NetBSD: patch-al,v 1.4 2005/12/11 20:48:46 joerg Exp $ + void shuffle_setup() { - extern char *malloc(); -@@ -97,7 +102,7 @@ +- extern char *malloc(); + #ifdef sgi + extern time_t time(time_t *); + #else +@@ -63,7 +69,7 @@ shuffle_setup() { + random_tracks = NULL; + } + +- if ((random_tracks = (unsigned char *) malloc(cdi.ntracks)) == NULL) { ++ if ((random_tracks = malloc(cdi.ntracks)) == NULL) { + perror("malloc"); + exit(1); + } +@@ -97,7 +103,7 @@ shuffle_setup() { random_tracks[i] = try; } diff --git a/audio/xcdplayer/patches/patch-cdrom__sgi_c b/audio/xcdplayer/patches/patch-cdrom__sgi_c new file mode 100644 index 00000000000..1a874c38193 --- /dev/null +++ b/audio/xcdplayer/patches/patch-cdrom__sgi_c @@ -0,0 +1,39 @@ +$NetBSD: patch-cdrom__sgi_c,v 1.1 2011/09/04 22:05:39 dholland Exp $ + +- needs stdlib.h +- use calloc properly + +--- cdrom_sgi.c~ 1993-01-12 18:59:51.000000000 +0000 ++++ cdrom_sgi.c +@@ -26,6 +26,7 @@ static int c; + # include <mntent.h> + # include <string.h> + # include <signal.h> ++# include <stdlib.h> + + # include <sys/buf.h> + +@@ -1075,10 +1076,9 @@ unsigned short * + ushort_malloc(n) + int n; + { +- extern char *calloc(); + unsigned short *ptr; + +- ptr = (unsigned short *) calloc(n, sizeof(unsigned short)); ++ ptr = calloc(n, sizeof(unsigned short)); + if (ptr == NULL) { + perror("calloc"); + exit(1); +@@ -1091,10 +1091,9 @@ struct msf * + msf_malloc(n) + int n; + { +- extern char *calloc(); + struct msf *ptr; + +- ptr = (struct msf *) calloc(n, sizeof(struct msf)); ++ ptr = calloc(n, sizeof(struct msf)); + if (ptr == NULL) { + perror("calloc"); + exit(1); diff --git a/audio/xcdplayer/patches/patch-cdrom__sun_c b/audio/xcdplayer/patches/patch-cdrom__sun_c new file mode 100644 index 00000000000..8df84238adb --- /dev/null +++ b/audio/xcdplayer/patches/patch-cdrom__sun_c @@ -0,0 +1,39 @@ +$NetBSD: patch-cdrom__sun_c,v 1.1 2011/09/04 22:05:39 dholland Exp $ + +- needs stdlib.h +- use calloc properly + +--- cdrom_sun.c~ 1993-01-12 18:59:44.000000000 +0000 ++++ cdrom_sun.c +@@ -27,6 +27,7 @@ static int c; + + # include <mntent.h> + # include <string.h> ++# include <stdlib.h> + + # include <sys/buf.h> + # ifdef sun4c +@@ -635,10 +636,9 @@ unsigned short * + ushort_malloc(n) + int n; + { +- extern char *calloc(); + unsigned short *ptr; + +- ptr = (unsigned short *) calloc(n, sizeof(unsigned short)); ++ ptr = calloc(n, sizeof(unsigned short)); + if (ptr == NULL) { + perror("calloc"); + exit(1); +@@ -651,10 +651,9 @@ struct msf * + msf_malloc(n) + int n; + { +- extern char *calloc(); + struct msf *ptr; + +- ptr = (struct msf *) calloc(n, sizeof(struct msf)); ++ ptr = calloc(n, sizeof(struct msf)); + if (ptr == NULL) { + perror("calloc"); + exit(1); |