From d798b8b3d832f8c69769e08cfd64a4d8355faf0e Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Wed, 30 Jul 2003 21:52:41 +0000 Subject: [PATCH] Prevent definitions from messing up attributes. --- lib/avl_tree.c | 4 ++-- lib/getopt.c | 2 +- lib/xalloc.h | 8 ++++---- src/conf.h | 4 ++-- src/connection.h | 4 ++-- src/edge.h | 6 +++--- src/event.h | 4 ++-- src/logger.h | 2 +- src/node.h | 4 ++-- src/process.c | 4 ++-- src/process.h | 4 ++-- src/protocol.h | 4 ++-- src/subnet.h | 6 +++--- 13 files changed, 28 insertions(+), 28 deletions(-) diff --git a/lib/avl_tree.c b/lib/avl_tree.c index be35b969..95e95e72 100644 --- a/lib/avl_tree.c +++ b/lib/avl_tree.c @@ -29,7 +29,7 @@ library for inclusion into tinc (http://tinc.nl.linux.org/) by Guus Sliepen . - $Id: avl_tree.c,v 1.1.2.17 2003/07/24 12:08:14 guus Exp $ + $Id: avl_tree.c,v 1.1.2.18 2003/07/30 21:52:41 guus Exp $ */ #include "system.h" @@ -52,7 +52,7 @@ #endif #ifndef AVL_DEPTH -static int lg(unsigned int u) __attribute__ ((const)); +static int lg(unsigned int u) __attribute__ ((__const__)); static int lg(unsigned int u) { diff --git a/lib/getopt.c b/lib/getopt.c index 264a11be..5e397baa 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -259,7 +259,7 @@ extern pid_t __libc_pid; is valid for the getopt call we must make sure that the ARGV passed to getopt is that one passed to the process. */ static void -__attribute__ ((unused)) +__attribute__ ((__unused__)) store_args_and_env (int argc, char *const *argv) { /* XXX This is no good solution. We should rather copy the args so diff --git a/lib/xalloc.h b/lib/xalloc.h index dbba254a..7cb486a2 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -18,9 +18,9 @@ extern char *const xalloc_msg_memory_exhausted; /* FIXME: describe */ extern void (*xalloc_fail_func) (); -void *xmalloc PARAMS ((size_t n)) __attribute__ ((malloc)); -void *xmalloc_and_zero PARAMS ((size_t n)) __attribute__ ((malloc)); +void *xmalloc PARAMS ((size_t n)) __attribute__ ((__malloc__)); +void *xmalloc_and_zero PARAMS ((size_t n)) __attribute__ ((__malloc__)); void *xcalloc PARAMS ((size_t n, size_t s)); -void *xrealloc PARAMS ((void *p, size_t n)) __attribute__ ((malloc)); +void *xrealloc PARAMS ((void *p, size_t n)) __attribute__ ((__malloc__)); -char *xstrdup PARAMS ((const char *s)) __attribute__ ((malloc)); +char *xstrdup PARAMS ((const char *s)) __attribute__ ((__malloc__)); diff --git a/src/conf.h b/src/conf.h index 8ceb111e..8960f087 100644 --- a/src/conf.h +++ b/src/conf.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: conf.h,v 1.6.4.41 2003/07/24 12:08:15 guus Exp $ + $Id: conf.h,v 1.6.4.42 2003/07/30 21:52:41 guus Exp $ */ #ifndef __TINC_CONF_H__ @@ -44,7 +44,7 @@ extern char *netname; extern void init_configuration(avl_tree_t **); extern void exit_configuration(avl_tree_t **); -extern config_t *new_config(void) __attribute__ ((malloc)); +extern config_t *new_config(void) __attribute__ ((__malloc__)); extern void free_config(config_t *); extern void config_add(avl_tree_t *, config_t *); extern config_t *lookup_config(const avl_tree_t *, char *); diff --git a/src/connection.h b/src/connection.h index 0092f04e..29bace11 100644 --- a/src/connection.h +++ b/src/connection.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: connection.h,v 1.1.2.35 2003/07/22 20:55:19 guus Exp $ + $Id: connection.h,v 1.1.2.36 2003/07/30 21:52:41 guus Exp $ */ #ifndef __TINC_CONNECTION_H__ @@ -100,7 +100,7 @@ extern connection_t *broadcast; extern void init_connections(void); extern void exit_connections(void); -extern connection_t *new_connection(void) __attribute__ ((malloc)); +extern connection_t *new_connection(void) __attribute__ ((__malloc__)); extern void free_connection(connection_t *); extern void connection_add(connection_t *); extern void connection_del(connection_t *); diff --git a/src/edge.h b/src/edge.h index 0e951fa6..ebb83378 100644 --- a/src/edge.h +++ b/src/edge.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: edge.h,v 1.1.2.16 2003/07/29 10:50:15 guus Exp $ + $Id: edge.h,v 1.1.2.17 2003/07/30 21:52:41 guus Exp $ */ #ifndef __TINC_EDGE_H__ @@ -44,9 +44,9 @@ extern avl_tree_t *edge_weight_tree; /* Tree with all known edges sorted on weig extern void init_edges(void); extern void exit_edges(void); -extern edge_t *new_edge(void) __attribute__ ((malloc)); +extern edge_t *new_edge(void) __attribute__ ((__malloc__)); extern void free_edge(edge_t *); -extern avl_tree_t *new_edge_tree(void) __attribute__ ((malloc)); +extern avl_tree_t *new_edge_tree(void) __attribute__ ((__malloc__)); extern void free_edge_tree(avl_tree_t *); extern void edge_add(edge_t *); extern void edge_del(edge_t *); diff --git a/src/event.h b/src/event.h index 71aae18d..6ec986df 100644 --- a/src/event.h +++ b/src/event.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: event.h,v 1.1.4.7 2003/07/17 15:06:26 guus Exp $ + $Id: event.h,v 1.1.4.8 2003/07/30 21:52:41 guus Exp $ */ #ifndef __TINC_EVENT_H__ @@ -38,7 +38,7 @@ typedef struct { extern void init_events(void); extern void exit_events(void); -extern event_t *new_event(void) __attribute__ ((malloc)); +extern event_t *new_event(void) __attribute__ ((__malloc__)); extern void free_event(event_t *); extern void event_add(event_t *); extern void event_del(event_t *); diff --git a/src/logger.h b/src/logger.h index da849c40..35cc8af3 100644 --- a/src/logger.h +++ b/src/logger.h @@ -35,7 +35,7 @@ enum { extern debug_t debug_level; extern void openlogger(const char *, logmode_t); -extern void logger(int, const char *, ...) __attribute__ ((format(printf, 2, 3))); +extern void logger(int, const char *, ...) __attribute__ ((__format__(printf, 2, 3))); extern void closelogger(void); #define ifdebug(l) if(debug_level >= DEBUG_##l) diff --git a/src/node.h b/src/node.h index 4f1406ca..4407f993 100644 --- a/src/node.h +++ b/src/node.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: node.h,v 1.1.2.28 2003/07/29 10:50:15 guus Exp $ + $Id: node.h,v 1.1.2.29 2003/07/30 21:52:41 guus Exp $ */ #ifndef __TINC_NODE_H__ @@ -79,7 +79,7 @@ extern avl_tree_t *node_udp_tree; extern void init_nodes(void); extern void exit_nodes(void); -extern node_t *new_node(void) __attribute__ ((malloc)); +extern node_t *new_node(void) __attribute__ ((__malloc__)); extern void free_node(node_t *); extern void node_add(node_t *); extern void node_del(node_t *); diff --git a/src/process.c b/src/process.c index 36b21461..3071b02a 100644 --- a/src/process.c +++ b/src/process.c @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: process.c,v 1.1.2.58 2003/07/28 22:06:09 guus Exp $ + $Id: process.c,v 1.1.2.59 2003/07/30 21:52:41 guus Exp $ */ #include "system.h" @@ -206,7 +206,7 @@ bool detach(void) Execute the program name, with sane environment. */ static void _execute_script(const char *scriptname, char **envp) - __attribute__ ((noreturn)); + __attribute__ ((__noreturn__)); static void _execute_script(const char *scriptname, char **envp) { int save_errno; diff --git a/src/process.h b/src/process.h index 9b0b123f..182ed72a 100644 --- a/src/process.h +++ b/src/process.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: process.h,v 1.1.2.17 2003/07/22 20:55:20 guus Exp $ + $Id: process.h,v 1.1.2.18 2003/07/30 21:52:41 guus Exp $ */ #ifndef __TINC_PROCESS_H__ @@ -31,6 +31,6 @@ extern void setup_signals(void); extern bool execute_script(const char *, char **); extern bool detach(void); extern bool kill_other(int); -extern void cleanup_and_exit(int) __attribute__ ((noreturn)); +extern void cleanup_and_exit(int) __attribute__ ((__noreturn__)); #endif /* __TINC_PROCESS_H__ */ diff --git a/src/protocol.h b/src/protocol.h index 7a32a17a..e85db5d1 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: protocol.h,v 1.5.4.43 2003/07/29 22:59:00 guus Exp $ + $Id: protocol.h,v 1.5.4.44 2003/07/30 21:52:41 guus Exp $ */ #ifndef __TINC_PROTOCOL_H__ @@ -66,7 +66,7 @@ typedef struct past_request_t { /* Basic functions */ -extern bool send_request(struct connection_t *, const char *, ...) __attribute__ ((format(printf, 2, 3))); +extern bool send_request(struct connection_t *, const char *, ...) __attribute__ ((__format__(printf, 2, 3))); extern void forward_request(struct connection_t *); extern bool receive_request(struct connection_t *); extern bool check_id(const char *); diff --git a/src/subnet.h b/src/subnet.h index edca1c74..b0bc9113 100644 --- a/src/subnet.h +++ b/src/subnet.h @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - $Id: subnet.h,v 1.1.2.23 2003/07/24 12:08:16 guus Exp $ + $Id: subnet.h,v 1.1.2.24 2003/07/30 21:52:41 guus Exp $ */ #ifndef __TINC_SUBNET_H__ @@ -64,11 +64,11 @@ typedef struct subnet_t { } net; } subnet_t; -extern subnet_t *new_subnet(void) __attribute__ ((malloc)); +extern subnet_t *new_subnet(void) __attribute__ ((__malloc__)); extern void free_subnet(subnet_t *); extern void init_subnets(void); extern void exit_subnets(void); -extern avl_tree_t *new_subnet_tree(void) __attribute__ ((malloc)); +extern avl_tree_t *new_subnet_tree(void) __attribute__ ((__malloc__)); extern void free_subnet_tree(avl_tree_t *); extern void subnet_add(struct node_t *, subnet_t *); extern void subnet_del(struct node_t *, subnet_t *); -- 2.20.1