Module Name:    src
Committed By:   joerg
Date:           Mon Nov 28 12:44:19 UTC 2011

Modified Files:
        src/lib/libbluetooth: bluetooth.h
        src/lib/libform: form.h
        src/lib/libisns: isns_pdu.h
        src/lib/libterminfo: compile.c

Log Message:
Kill a bunch of manual __attribute__ usages and replace them with the
equivalent sys/cdefs.h invocation.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/lib/libbluetooth/bluetooth.h
cvs rdiff -u -r1.20 -r1.21 src/lib/libform/form.h
cvs rdiff -u -r1.2 -r1.3 src/lib/libisns/isns_pdu.h
cvs rdiff -u -r1.5 -r1.6 src/lib/libterminfo/compile.c

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

Modified files:

Index: src/lib/libbluetooth/bluetooth.h
diff -u src/lib/libbluetooth/bluetooth.h:1.4 src/lib/libbluetooth/bluetooth.h:1.5
--- src/lib/libbluetooth/bluetooth.h:1.4	Mon Aug  3 15:59:42 2009
+++ src/lib/libbluetooth/bluetooth.h	Mon Nov 28 12:44:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bluetooth.h,v 1.4 2009/08/03 15:59:42 plunky Exp $	*/
+/*	$NetBSD: bluetooth.h,v 1.5 2011/11/28 12:44:18 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2001-2009 Maksim Yevmenkin <[email protected]>
@@ -160,14 +160,14 @@ typedef struct {
 	bdaddr_t	laddr;			/* local address */
 	bdaddr_t	raddr;			/* remote address */
 	uint8_t		time;			/* validity (seconds) */
-} __attribute__ ((packed)) bthcid_pin_request_t;
+} __packed bthcid_pin_request_t;
 
 /* Client PIN Response packet */
 typedef struct {
 	bdaddr_t	laddr;			/* local address */
 	bdaddr_t	raddr;			/* remote address */
 	uint8_t		pin[HCI_PIN_SIZE];	/* PIN */
-} __attribute__ ((packed)) bthcid_pin_response_t;
+} __packed bthcid_pin_response_t;
 
 /* Default socket name */
 #define BTHCID_SOCKET_NAME	"/var/run/bthcid"

Index: src/lib/libform/form.h
diff -u src/lib/libform/form.h:1.20 src/lib/libform/form.h:1.21
--- src/lib/libform/form.h:1.20	Wed Feb  3 15:34:43 2010
+++ src/lib/libform/form.h	Mon Nov 28 12:44:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: form.h,v 1.20 2010/02/03 15:34:43 roy Exp $	*/
+/*	$NetBSD: form.h,v 1.21 2011/11/28 12:44:18 joerg Exp $	*/
 
 /*-
  * Copyright (c) 1998-1999 Brett Lymn
@@ -355,8 +355,7 @@ int          set_field_init(FORM *, Form
 int          set_field_just(FIELD *, int);
 int          set_field_opts(FIELD *, Form_Options);
 int          set_field_pad(FIELD *, int);
-int          set_field_printf(FIELD *, int, char *, ...)
-				__attribute__((__format__(__printf__, 3, 4)));
+int          set_field_printf(FIELD *, int, char *, ...) __printflike(3, 4);
 int          set_field_status(FIELD *, int);
 int          set_field_term(FORM *, Form_Hook);
 int          set_field_type(FIELD *, FIELDTYPE *, ...);

Index: src/lib/libisns/isns_pdu.h
diff -u src/lib/libisns/isns_pdu.h:1.2 src/lib/libisns/isns_pdu.h:1.3
--- src/lib/libisns/isns_pdu.h:1.2	Wed Aug 17 10:08:43 2011
+++ src/lib/libisns/isns_pdu.h	Mon Nov 28 12:44:18 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: isns_pdu.h,v 1.2 2011/08/17 10:08:43 christos Exp $	*/
+/*	$NetBSD: isns_pdu.h,v 1.3 2011/11/28 12:44:18 joerg Exp $	*/
 
 /*-
  * Copyright (c) 2004,2009 The NetBSD Foundation, Inc.
@@ -171,12 +171,12 @@ struct isns_trans_s {
 };
 
 struct isns_pdu_hdr_s {
-	uint16_t isnsp_version	__attribute__ ((packed));
-	uint16_t func_id	__attribute__ ((packed));
-	uint16_t payload_len	__attribute__ ((packed));
-	uint16_t flags		__attribute__ ((packed));
-	uint16_t trans_id	__attribute__ ((packed));
-	uint16_t seq_id		__attribute__ ((packed));
+	uint16_t isnsp_version	__packed;
+	uint16_t func_id	__packed;
+	uint16_t payload_len	__packed;
+	uint16_t flags		__packed;
+	uint16_t trans_id	__packed;
+	uint16_t seq_id		__packed;
 };
 
 struct isns_pdu_s {

Index: src/lib/libterminfo/compile.c
diff -u src/lib/libterminfo/compile.c:1.5 src/lib/libterminfo/compile.c:1.6
--- src/lib/libterminfo/compile.c:1.5	Mon Apr 11 21:37:19 2011
+++ src/lib/libterminfo/compile.c	Mon Nov 28 12:44:19 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: compile.c,v 1.5 2011/04/11 21:37:19 roy Exp $ */
+/* $NetBSD: compile.c,v 1.6 2011/11/28 12:44:19 joerg Exp $ */
 
 /*
  * Copyright (c) 2009, 2010, 2011 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: compile.c,v 1.5 2011/04/11 21:37:19 roy Exp $");
+__RCSID("$NetBSD: compile.c,v 1.6 2011/11/28 12:44:19 joerg Exp $");
 
 #if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H
 #include <sys/endian.h>
@@ -51,7 +51,7 @@ __RCSID("$NetBSD: compile.c,v 1.5 2011/0
 #include <term_private.h>
 #include <term.h>
 
-static void __attribute__((__format__(__printf__, 2, 3)))
+static void __printflike(2, 3)
 dowarn(int flags, const char *fmt, ...)
 {
 	va_list va;

Reply via email to