summaryrefslogtreecommitdiff
path: root/audio/cddbd/patches/patch-ac
blob: c1145e7b49bd87d64f93515eca796d3fec13a149 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
$NetBSD: patch-ac,v 1.4 2011/08/28 22:30:17 dholland Exp $

- LP64 fixes
- fix printf follies
- don't use included custom snprintf

--- cddbd.h.orig	1996-12-22 03:49:54.000000000 +0000
+++ cddbd.h
@@ -26,4 +26,7 @@ static char *_cddbd_h_ident_ = "@(#)$Id:
 #endif
 
+#include <stddef.h>
+#include <stdint.h>
+
 
 /* Preprocessor definitions. */
@@ -260,5 +263,5 @@ typedef struct access {
 	int	at_type;		/* Field type. */
 	int	at_flags;		/* Access flags. */
-	int	at_def;			/* Default value. */
+	uintptr_t at_def;		/* Default value. */
 } access_t;
 
@@ -364,4 +367,11 @@ typedef struct encode {
 } encode_t;
 
+#ifdef __GNUC__
+#define PRINTFLIKE(a, b) __attribute__((__format__(__printf__, a, b)))
+#else
+#define PRINTFLIKE(a, b)
+#endif
+
+#define cddbd_snprintf snprintf
 
 /* External prototypes. */
@@ -371,10 +381,9 @@ void cddbd_build_fuzzy(void);
 void cddbd_check_db(int, int);
 void cddbd_lock_free(clck_t *);
-void cddbd_log();
+void cddbd_log(unsigned, const char *fmt, ...) PRINTFLIKE(2, 3);
 void cddbd_mail(void);
 void cddbd_parse_args(arg_t *, int);
 void cddbd_rmt_op(int, char *, char *);
 void cddbd_serve(void);
-void cddbd_snprintf();
 void cddbd_stand(int);
 void cddbd_unlock(clck_t *);