Module Name:    src
Committed By:   christos
Date:           Mon Nov 21 04:36:06 UTC 2011

Modified Files:
        src/sys/sys: aio.h buf.h kernhist.h kmem.h kthread.h lockdebug.h lwp.h
            malloc.h mbuf.h module.h mqueue.h namei.h pool.h sched.h sleepq.h
            syslog.h systm.h tprintf.h vmem.h vnode.h wapbl.h

Log Message:
change printf gcc attribute to __printflike(), requested by joerg.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/aio.h
cvs rdiff -u -r1.117 -r1.118 src/sys/sys/buf.h
cvs rdiff -u -r1.3 -r1.4 src/sys/sys/kernhist.h
cvs rdiff -u -r1.5 -r1.6 src/sys/sys/kmem.h
cvs rdiff -u -r1.11 -r1.12 src/sys/sys/kthread.h
cvs rdiff -u -r1.12 -r1.13 src/sys/sys/lockdebug.h src/sys/sys/wapbl.h
cvs rdiff -u -r1.157 -r1.158 src/sys/sys/lwp.h
cvs rdiff -u -r1.108 -r1.109 src/sys/sys/malloc.h
cvs rdiff -u -r1.147 -r1.148 src/sys/sys/mbuf.h
cvs rdiff -u -r1.29 -r1.30 src/sys/sys/module.h
cvs rdiff -u -r1.15 -r1.16 src/sys/sys/mqueue.h src/sys/sys/vmem.h
cvs rdiff -u -r1.78 -r1.79 src/sys/sys/namei.h
cvs rdiff -u -r1.71 -r1.72 src/sys/sys/pool.h
cvs rdiff -u -r1.74 -r1.75 src/sys/sys/sched.h
cvs rdiff -u -r1.20 -r1.21 src/sys/sys/sleepq.h
cvs rdiff -u -r1.33 -r1.34 src/sys/sys/syslog.h
cvs rdiff -u -r1.251 -r1.252 src/sys/sys/systm.h
cvs rdiff -u -r1.17 -r1.18 src/sys/sys/tprintf.h
cvs rdiff -u -r1.234 -r1.235 src/sys/sys/vnode.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/aio.h
diff -u src/sys/sys/aio.h:1.10 src/sys/sys/aio.h:1.11
--- src/sys/sys/aio.h:1.10	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/aio.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: aio.h,v 1.10 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: aio.h,v 1.11 2011/11/21 04:36:05 christos Exp $	*/
 
 /*
  * Copyright (c) 2007, Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -115,8 +115,7 @@ struct aioproc {
 
 extern u_int aio_listio_max;
 /* Prototypes */
-void	aio_print_jobs(void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+void	aio_print_jobs(void (*)(const char *, ...) __printflike(1, 2));
 int	aio_suspend1(struct lwp *, struct aiocb **, int, struct timespec *);
 
 #endif /* _KERNEL */

Index: src/sys/sys/buf.h
diff -u src/sys/sys/buf.h:1.117 src/sys/sys/buf.h:1.118
--- src/sys/sys/buf.h:1.117	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/buf.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*     $NetBSD: buf.h,v 1.117 2011/11/20 23:37:00 christos Exp $ */
+/*     $NetBSD: buf.h,v 1.118 2011/11/21 04:36:05 christos Exp $ */
 
 /*-
  * Copyright (c) 1999, 2000, 2007, 2008 The NetBSD Foundation, Inc.
@@ -291,7 +291,7 @@ int	buf_drain(int);
 int	buf_setvalimit(vsize_t);
 #if defined(DDB) || defined(DEBUGPRINT)
 void	vfs_buf_print(buf_t *, int, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 #endif
 buf_t	*getiobuf(struct vnode *, bool);
 void	putiobuf(buf_t *);

Index: src/sys/sys/kernhist.h
diff -u src/sys/sys/kernhist.h:1.3 src/sys/sys/kernhist.h:1.4
--- src/sys/sys/kernhist.h:1.3	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/kernhist.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kernhist.h,v 1.3 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: kernhist.h,v 1.4 2011/11/21 04:36:05 christos Exp $	*/
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -189,8 +189,7 @@ kernhist_entry_print(const struct kern_h
 }
 
 #if defined(DDB)
-void	kernhist_print(void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+void	kernhist_print(void (*)(const char *, ...) __printflike(1, 2));
 #endif /* DDB */
 
 #endif /* KERNHIST */

Index: src/sys/sys/kmem.h
diff -u src/sys/sys/kmem.h:1.5 src/sys/sys/kmem.h:1.6
--- src/sys/sys/kmem.h:1.5	Sun Nov 20 17:50:12 2011
+++ src/sys/sys/kmem.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kmem.h,v 1.5 2011/11/20 22:50:12 christos Exp $	*/
+/*	$NetBSD: kmem.h,v 1.6 2011/11/21 04:36:05 christos Exp $	*/
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -39,8 +39,7 @@ void kmem_free(void *, size_t);
 void kmem_init(void);
 size_t kmem_roundup_size(size_t);
 
-char *kmem_asprintf(const char *, ...)
-     __attribute__((__format__(__printf__, 1, 2)));
+char *kmem_asprintf(const char *, ...) __printflike(1, 2);
 /*
  * km_flag_t
  *

Index: src/sys/sys/kthread.h
diff -u src/sys/sys/kthread.h:1.11 src/sys/sys/kthread.h:1.12
--- src/sys/sys/kthread.h:1.11	Sun Aug  7 10:03:16 2011
+++ src/sys/sys/kthread.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kthread.h,v 1.11 2011/08/07 14:03:16 rmind Exp $	*/
+/*	$NetBSD: kthread.h,v 1.12 2011/11/21 04:36:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2007, 2009 The NetBSD Foundation, Inc.
@@ -52,9 +52,7 @@
 void	kthread_sysinit(void);
 
 int	kthread_create(pri_t, int, struct cpu_info *,
-		       void (*)(void *), void *,
-		       lwp_t **, const char *, ...)
-	    __attribute__((__format__(__printf__,7,8)));
+    void (*)(void *), void *, lwp_t **, const char *, ...) __printflike(7, 8);
 void	kthread_exit(int) __dead;
 void	kthread_destroy(lwp_t *);
 int	kthread_join(lwp_t *);

Index: src/sys/sys/lockdebug.h
diff -u src/sys/sys/lockdebug.h:1.12 src/sys/sys/lockdebug.h:1.13
--- src/sys/sys/lockdebug.h:1.12	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/lockdebug.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lockdebug.h,v 1.12 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: lockdebug.h,v 1.13 2011/11/21 04:36:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@ void	lockdebug_abort(volatile void *, lo
 			const char *, const char *);
 
 void	lockdebug_lock_print(void *, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 
 #ifdef LOCKDEBUG
 
Index: src/sys/sys/wapbl.h
diff -u src/sys/sys/wapbl.h:1.12 src/sys/sys/wapbl.h:1.13
--- src/sys/sys/wapbl.h:1.12	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/wapbl.h	Sun Nov 20 23:36:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: wapbl.h,v 1.12 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: wapbl.h,v 1.13 2011/11/21 04:36:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 2003,2008 The NetBSD Foundation, Inc.
@@ -171,7 +171,7 @@ void	wapbl_jlock_assert(struct wapbl *wl
 void	wapbl_junlock_assert(struct wapbl *wl);
 
 void	wapbl_print(struct wapbl *wl, int full, void (*pr)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 
 #if defined(WAPBL_DEBUG) || defined(DDB)
 void	wapbl_dump(struct wapbl *);

Index: src/sys/sys/lwp.h
diff -u src/sys/sys/lwp.h:1.157 src/sys/sys/lwp.h:1.158
--- src/sys/sys/lwp.h:1.157	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/lwp.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: lwp.h,v 1.157 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: lwp.h,v 1.158 2011/11/21 04:36:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2006, 2007, 2008, 2009, 2010
@@ -356,8 +356,7 @@ int	lwp_park(struct timespec *, const vo
 int	lwp_unpark(lwpid_t, const void *);
 
 /* DDB. */
-void	lwp_whatis(uintptr_t, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+void	lwp_whatis(uintptr_t, void (*)(const char *, ...) __printflike(1, 2));
 
 /*
  * Lock an LWP. XXX _MODULE

Index: src/sys/sys/malloc.h
diff -u src/sys/sys/malloc.h:1.108 src/sys/sys/malloc.h:1.109
--- src/sys/sys/malloc.h:1.108	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/malloc.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: malloc.h,v 1.108 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: malloc.h,v 1.109 2011/11/21 04:36:05 christos Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993
@@ -109,7 +109,7 @@ int	debug_free(void *, struct malloc_typ
 
 void	debug_malloc_print(void);
 void	debug_malloc_printit(void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2)), vaddr_t));
+    __printflike(1, 2), vaddr_t));
 #endif /* MALLOC_DEBUG */
 
 void	*kern_realloc(void *, unsigned long, struct malloc_type *, int);

Index: src/sys/sys/mbuf.h
diff -u src/sys/sys/mbuf.h:1.147 src/sys/sys/mbuf.h:1.148
--- src/sys/sys/mbuf.h:1.147	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/mbuf.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mbuf.h,v 1.147 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: mbuf.h,v 1.148 2011/11/21 04:36:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1999, 2001, 2007 The NetBSD Foundation, Inc.
@@ -926,7 +926,7 @@ m_length(const struct mbuf *m)
 }
 
 void m_print(const struct mbuf *, const char *, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 
 #endif /* _KERNEL */
 #endif /* !_SYS_MBUF_H_ */

Index: src/sys/sys/module.h
diff -u src/sys/sys/module.h:1.29 src/sys/sys/module.h:1.30
--- src/sys/sys/module.h:1.29	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/module.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: module.h,v 1.29 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: module.h,v 1.30 2011/11/21 04:36:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -142,9 +142,8 @@ void	module_thread_kick(void);
 void	module_load_vfs_init(void);
 
 void	module_whatis(uintptr_t, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
-void	module_print_list(void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
+void	module_print_list(void (*)(const char *, ...) __printflike(1, 2));
 
 #ifdef _MODULE_INTERNAL
 extern
@@ -152,10 +151,8 @@ int	(*module_load_vfs_vec)(const char *,
 			       prop_dictionary_t *);
 int	module_load_vfs(const char *, int, bool, module_t *,
 			prop_dictionary_t *);
-void	module_error(const char *, ...)
-			     __attribute__((__format__(__printf__,1,2)));
-void	module_print(const char *, ...)
-			     __attribute__((__format__(__printf__,1,2)));
+void	module_error(const char *, ...) __printflike(1, 2);
+void	module_print(const char *, ...) __printflike(1, 2);
 #endif /* _MODULE_INTERNAL */
 
 #define MODULE_BASE_SIZE 64

Index: src/sys/sys/mqueue.h
diff -u src/sys/sys/mqueue.h:1.15 src/sys/sys/mqueue.h:1.16
--- src/sys/sys/mqueue.h:1.15	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/mqueue.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mqueue.h,v 1.15 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: mqueue.h,v 1.16 2011/11/21 04:36:05 christos Exp $	*/
 
 /*
  * Copyright (c) 2007-2009 Mindaugas Rasiukevicius <rmind at NetBSD org>
@@ -109,8 +109,7 @@ typedef struct mq_msg {
 } mq_msg_t;
 
 /* Prototypes */
-void	mqueue_print_list(void (*pr)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+void	mqueue_print_list(void (*pr)(const char *, ...) __printflike(1, 2));
 int	mq_send1(mqd_t, const char *, size_t, u_int, struct timespec *);
 int	mq_recv1(mqd_t, void *, size_t, u_int *, struct timespec *, ssize_t *);
 
Index: src/sys/sys/vmem.h
diff -u src/sys/sys/vmem.h:1.15 src/sys/sys/vmem.h:1.16
--- src/sys/sys/vmem.h:1.15	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/vmem.h	Sun Nov 20 23:36:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmem.h,v 1.15 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: vmem.h,v 1.16 2011/11/21 04:36:06 christos Exp $	*/
 
 /*-
  * Copyright (c)2006 YAMAMOTO Takashi,
@@ -58,12 +58,11 @@ int vmem_add(vmem_t *, vmem_addr_t, vmem
 vmem_size_t vmem_roundup_size(vmem_t *, vmem_size_t);
 bool vmem_reap(vmem_t *);
 void vmem_rehash_start(void);
-void vmem_whatis(uintptr_t, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+void vmem_whatis(uintptr_t, void (*)(const char *, ...) __printflike(1, 2));
 void vmem_print(uintptr_t, const char *, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 void vmem_printall(const char *, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 
 /* vm_flag_t */
 #define	VM_SLEEP	0x00000001

Index: src/sys/sys/namei.h
diff -u src/sys/sys/namei.h:1.78 src/sys/sys/namei.h:1.79
--- src/sys/sys/namei.h:1.78	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/namei.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: namei.h,v 1.78 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: namei.h,v 1.79 2011/11/21 04:36:05 christos Exp $	*/
 
 
 /*
@@ -272,7 +272,7 @@ void	nchreinit(void);
 void	cache_cpu_init(struct cpu_info *);
 void	cache_purgevfs(struct mount *);
 void	namecache_print(struct vnode *, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 
 #endif
 

Index: src/sys/sys/pool.h
diff -u src/sys/sys/pool.h:1.71 src/sys/sys/pool.h:1.72
--- src/sys/sys/pool.h:1.71	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/pool.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pool.h,v 1.71 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: pool.h,v 1.72 2011/11/21 04:36:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 1997, 1998, 1999, 2000, 2007 The NetBSD Foundation, Inc.
@@ -302,9 +302,9 @@ bool		pool_drain_end(struct pool *, uint
  */
 void		pool_print(struct pool *, const char *);
 void		pool_printit(struct pool *, const char *,
-    void (*)(const char *, ...) __attribute__((__format__(__printf__, 1, 2))));
+    void (*)(const char *, ...) __printflike(1, 2));
 void		pool_printall(const char *, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 int		pool_chk(struct pool *, const char *);
 
 /*
@@ -335,7 +335,7 @@ void		pool_cache_cpu_init(struct cpu_inf
 				          POOL_PADDR_INVALID)
 
 void 		pool_whatis(uintptr_t, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 #endif /* _KERNEL */
 
 #endif /* _SYS_POOL_H_ */

Index: src/sys/sys/sched.h
diff -u src/sys/sys/sched.h:1.74 src/sys/sys/sched.h:1.75
--- src/sys/sys/sched.h:1.74	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/sched.h	Sun Nov 20 23:36:05 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sched.h,v 1.74 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: sched.h,v 1.75 2011/11/21 04:36:05 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2002, 2007, 2008 The NetBSD Foundation, Inc.
@@ -249,7 +249,7 @@ void		sched_setrunnable(struct lwp *);
 
 struct cpu_info *sched_takecpu(struct lwp *);
 void		sched_print_runqueue(void (*pr)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 
 /* Dispatching */
 bool		kpreempt(uintptr_t);

Index: src/sys/sys/sleepq.h
diff -u src/sys/sys/sleepq.h:1.20 src/sys/sys/sleepq.h:1.21
--- src/sys/sys/sleepq.h:1.20	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/sleepq.h	Sun Nov 20 23:36:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: sleepq.h,v 1.20 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: sleepq.h,v 1.21 2011/11/21 04:36:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2006, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -172,7 +172,7 @@ void	turnstile_exit(wchan_t);
 void	turnstile_block(turnstile_t *, int, wchan_t, syncobj_t *);
 void	turnstile_wakeup(turnstile_t *, int, int, lwp_t *);
 void	turnstile_print(volatile void *, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 void	turnstile_unsleep(lwp_t *, bool);
 void	turnstile_changepri(lwp_t *, pri_t);
 

Index: src/sys/sys/syslog.h
diff -u src/sys/sys/syslog.h:1.33 src/sys/sys/syslog.h:1.34
--- src/sys/sys/syslog.h:1.33	Sun Jul 17 16:54:54 2011
+++ src/sys/sys/syslog.h	Sun Nov 20 23:36:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: syslog.h,v 1.33 2011/07/17 20:54:54 joerg Exp $	*/
+/*	$NetBSD: syslog.h,v 1.34 2011/11/21 04:36:06 christos Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1988, 1993
@@ -193,40 +193,33 @@ __BEGIN_DECLS
 void	closelog(void);
 void	openlog(const char *, int, int);
 int	setlogmask(int);
-void	syslog(int, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
+void	syslog(int, const char *, ...) __printflike(2, 3);
 #if defined(_NETBSD_SOURCE)
-void	vsyslog(int, const char *, __va_list)
-    __attribute__((__format__(__printf__,2,0)));
+void	vsyslog(int, const char *, __va_list) __printflike(2, 0);
 void	closelog_r(struct syslog_data *);
 void	openlog_r(const char *, int, int, struct syslog_data *);
 int	setlogmask_r(int, struct syslog_data *);
 void	syslog_r(int, struct syslog_data *, const char *, ...)
-    __attribute__((__format__(__printf__,3,4)));
+    __printflike(3, 4);
 void	vsyslog_r(int, struct syslog_data *, const char *, __va_list)
-    __attribute__((__format__(__printf__,3,0)));
+    __printflike(3, 0);
 void syslogp(int, const char *, const char *, const char *, ...)
-    __attribute__((__format__(__printf__,4,5)));
+    __printflike(4, 5);
 void vsyslogp(int, const char *, const char *, const char *, __va_list)
-    __attribute__((__format__(__printf__,4,0)));
+    __printflike(4, 0);
 void syslogp_r(int, struct syslog_data *, const char *, const char *,
-    const char *, ...)
-    __attribute__((__format__(__printf__,5,6)));
+    const char *, ...) __printflike(5, 6);
 void vsyslogp_r(int, struct syslog_data *, const char *, const char *,
-    const char *, __va_list)
-    __attribute__((__format__(__printf__,5,0)));
+    const char *, __va_list) __printflike(5, 0);
 #endif
 __END_DECLS
 
 #else /* !_KERNEL */
 
 void	logpri(int);
-void	log(int, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
-void	vlog(int, const char *, __va_list)
-    __attribute__((__format__(__printf__,2,0)));
-void	addlog(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
+void	log(int, const char *, ...) __printflike(2, 3);
+void	vlog(int, const char *, __va_list) __printflike(2, 0);
+void	addlog(const char *, ...) __printflike(1, 2);
 void	logwakeup(void);
 
 #endif /* !_KERNEL */

Index: src/sys/sys/systm.h
diff -u src/sys/sys/systm.h:1.251 src/sys/sys/systm.h:1.252
--- src/sys/sys/systm.h:1.251	Sat Nov  5 05:27:06 2011
+++ src/sys/sys/systm.h	Sun Nov 20 23:36:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: systm.h,v 1.251 2011/11/05 09:27:06 joerg Exp $	*/
+/*	$NetBSD: systm.h,v 1.252 2011/11/21 04:36:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1988, 1991, 1993
@@ -176,69 +176,50 @@ int	seltrue(dev_t, int, struct lwp *);
 int	sys_nosys(struct lwp *, const void *, register_t *);
 int	sys_nomodule(struct lwp *, const void *, register_t *);
 
-void	aprint_normal(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
-void	aprint_error(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
-void	aprint_naive(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
-void	aprint_verbose(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
-void	aprint_debug(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
-
-void device_printf(device_t, const char *fmt, ...)
-    __attribute__((__format__(__printf__,2,3)));
-
-void	aprint_normal_dev(device_t, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
-void	aprint_error_dev(device_t, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
-void	aprint_naive_dev(device_t, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
-void	aprint_verbose_dev(device_t, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
-void	aprint_debug_dev(device_t, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
+void	aprint_normal(const char *, ...) __printflike(1, 2);
+void	aprint_error(const char *, ...) __printflike(1, 2);
+void	aprint_naive(const char *, ...) __printflike(1, 2);
+void	aprint_verbose(const char *, ...) __printflike(1, 2);
+void	aprint_debug(const char *, ...) __printflike(1, 2);
+
+void device_printf(device_t, const char *fmt, ...) __printflike(2, 3);
+
+void	aprint_normal_dev(device_t, const char *, ...) __printflike(2, 3);
+void	aprint_error_dev(device_t, const char *, ...) __printflike(2, 3);
+void	aprint_naive_dev(device_t, const char *, ...) __printflike(2, 3);
+void	aprint_verbose_dev(device_t, const char *, ...) __printflike(2, 3);
+void	aprint_debug_dev(device_t, const char *, ...) __printflike(2, 3);
 
 struct ifnet;
 
 void	aprint_normal_ifnet(struct ifnet *, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
+    __printflike(2, 3);
 void	aprint_error_ifnet(struct ifnet *, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
+    __printflike(2, 3);
 void	aprint_naive_ifnet(struct ifnet *, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
+    __printflike(2, 3);
 void	aprint_verbose_ifnet(struct ifnet *, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
+    __printflike(2, 3);
 void	aprint_debug_ifnet(struct ifnet *, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
+    __printflike(2, 3);
 
 int	aprint_get_error_count(void);
 
-void	printf_tolog(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
+void	printf_tolog(const char *, ...) __printflike(1, 2);
 
-void	printf_nolog(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
+void	printf_nolog(const char *, ...) __printflike(1, 2);
 
-void	printf(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
+void	printf(const char *, ...) __printflike(1, 2);
 
-int	sprintf(char *, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
+int	sprintf(char *, const char *, ...) __printflike(2, 3);
 
-int	snprintf(char *, size_t, const char *, ...)
-    __attribute__((__format__(__printf__,3,4)));
+int	snprintf(char *, size_t, const char *, ...) __printflike(3, 4);
 
-void	vprintf(const char *, va_list)
-    __attribute__((__format__(__printf__,1,0)));
+void	vprintf(const char *, va_list) __printflike(1, 0);
 
-int	vsprintf(char *, const char *, va_list)
-    __attribute__((__format__(__printf__,2,0)));
+int	vsprintf(char *, const char *, va_list) __printflike(2, 0);
 
-int	vsnprintf(char *, size_t, const char *, va_list)
-    __attribute__((__format__(__printf__,3,0)));
+int	vsnprintf(char *, size_t, const char *, va_list) __printflike(3, 0);
 
 int	humanize_number(char *, size_t, uint64_t, const char *, int);
 
@@ -246,16 +227,11 @@ void	twiddle(void);
 void	banner(void);
 #endif /* _KERNEL */
 
-void	panic(const char *, ...)
-    __dead __attribute__((__format__(__printf__,1,2)));
-void	vpanic(const char *, va_list)
-    __dead __attribute__((__format__(__printf__,1,0)));
-void	uprintf(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
-void	uprintf_locked(const char *, ...)
-    __attribute__((__format__(__printf__,1,2)));
-void	ttyprintf(struct tty *, const char *, ...)
-    __attribute__((__format__(__printf__,2,3)));
+void	panic(const char *, ...) __dead __printflike(1, 2);
+void	vpanic(const char *, va_list) __dead __printflike(1, 0);
+void	uprintf(const char *, ...) __printflike(1, 2);
+void	uprintf_locked(const char *, ...) __printflike(1, 2);
+void	ttyprintf(struct tty *, const char *, ...) __printflike(2, 3);
 
 int	format_bytes(char *, size_t, uint64_t);
 

Index: src/sys/sys/tprintf.h
diff -u src/sys/sys/tprintf.h:1.17 src/sys/sys/tprintf.h:1.18
--- src/sys/sys/tprintf.h:1.17	Sat Dec  3 12:10:46 2005
+++ src/sys/sys/tprintf.h	Sun Nov 20 23:36:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprintf.h,v 1.17 2005/12/03 17:10:46 christos Exp $	*/
+/*	$NetBSD: tprintf.h,v 1.18 2011/11/21 04:36:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 1990, 1993
@@ -39,7 +39,6 @@ typedef struct session *tpr_t;
 tpr_t	tprintf_open(struct proc *);
 void	tprintf_close(tpr_t);
 
-void	tprintf(tpr_t, const char *fmt, ...)
-    __attribute__((__format__(__printf__,2,3)));
+void	tprintf(tpr_t, const char *fmt, ...) __printflike(2, 3);
 
 #endif /* _SYS_TPRINTF_H_ */

Index: src/sys/sys/vnode.h
diff -u src/sys/sys/vnode.h:1.234 src/sys/sys/vnode.h:1.235
--- src/sys/sys/vnode.h:1.234	Sun Nov 20 18:37:00 2011
+++ src/sys/sys/vnode.h	Sun Nov 20 23:36:06 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: vnode.h,v 1.234 2011/11/20 23:37:00 christos Exp $	*/
+/*	$NetBSD: vnode.h,v 1.235 2011/11/21 04:36:06 christos Exp $	*/
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -619,9 +619,9 @@ int	vfs_drainvnodes(long);
 void	vfs_timestamp(struct timespec *);
 #if defined(DDB) || defined(DEBUGPRINT)
 void	vfs_vnode_print(struct vnode *, int, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 void	vfs_mount_print(struct mount *, int, void (*)(const char *, ...)
-    __attribute__((__format__(__printf__, 1, 2))));
+    __printflike(1, 2));
 #endif /* DDB */
 
 #endif /* _KERNEL */

Reply via email to