- add various LP64 fixes; - use stdlib.h as needed instead of casting the return value of malloc; - fix fake-varargs printf code and use stdarg.h; - use system snprintf instead of included custom one; - tidy up symbol name conflict with log(); - add patch comments; - remove some pkglint; - add LICENSE. PKGREVISION -> 2.
47 lines
1.2 KiB
Text
47 lines
1.2 KiB
Text
$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 *);
|