Prevent definitions from messing up attributes.
authorGuus Sliepen <guus@tinc-vpn.org>
Wed, 30 Jul 2003 21:52:41 +0000 (21:52 +0000)
committerGuus Sliepen <guus@tinc-vpn.org>
Wed, 30 Jul 2003 21:52:41 +0000 (21:52 +0000)
13 files changed:
lib/avl_tree.c
lib/getopt.c
lib/xalloc.h
src/conf.h
src/connection.h
src/edge.h
src/event.h
src/logger.h
src/node.h
src/process.c
src/process.h
src/protocol.h
src/subnet.h

index be35b969f586d0fa3c88c0d2dea0e50abc5f84e0..95e95e722528ddbf5e0caccc10f91db4d1a9f657 100644 (file)
@@ -29,7 +29,7 @@
     library for inclusion into tinc (http://tinc.nl.linux.org/) by
     Guus Sliepen <guus@sliepen.eu.org>.
 
     library for inclusion into tinc (http://tinc.nl.linux.org/) by
     Guus Sliepen <guus@sliepen.eu.org>.
 
-    $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"
 */
 
 #include "system.h"
@@ -52,7 +52,7 @@
 #endif
 
 #ifndef AVL_DEPTH
 #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)
 {
 
 static int lg(unsigned int u)
 {
index 264a11be17227b1926536a8821e39fa42ed94e07..5e397baa3164a0ac1608bf1cdb0075f3e83ce785 100644 (file)
@@ -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
    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
 store_args_and_env (int argc, char *const *argv)
 {
   /* XXX This is no good solution.  We should rather copy the args so
index dbba254ad6b1e2637d711c977d0853dfa0dbb6ab..7cb486a202c89893f5af46a2f623b0d9ad1dea80 100644 (file)
@@ -18,9 +18,9 @@ extern char *const xalloc_msg_memory_exhausted;
 /* FIXME: describe */
 extern void (*xalloc_fail_func) ();
 
 /* 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 *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__));
index 8ceb111e92bb571547b34ee70bdea3637136fa9c..8960f08797e9d12c4ff682a746ec9282bf3151e3 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     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__
 */
 
 #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 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 *);
 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 *);
index 0092f04e77c5bf469e5b09d8671070dba79fd60c..29bace11b31accaefa17667545ffe70e175170cc 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     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__
 */
 
 #ifndef __TINC_CONNECTION_H__
@@ -100,7 +100,7 @@ extern connection_t *broadcast;
 
 extern void init_connections(void);
 extern void exit_connections(void);
 
 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 *);
 extern void free_connection(connection_t *);
 extern void connection_add(connection_t *);
 extern void connection_del(connection_t *);
index 0e951fa644a742ca8d5afbefaa958d07c00bb14c..ebb83378e5bb2ced11c741c29e1a7f6a4ca36ce7 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     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__
 */
 
 #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 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 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 *);
 extern void free_edge_tree(avl_tree_t *);
 extern void edge_add(edge_t *);
 extern void edge_del(edge_t *);
index 71aae18dff4b2470b0be1edc765e97fd248c8be3..6ec986df2d692885b78e0c841b17c0ebeb957a30 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     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__
 */
 
 #ifndef __TINC_EVENT_H__
@@ -38,7 +38,7 @@ typedef struct {
 
 extern void init_events(void);
 extern void exit_events(void);
 
 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 *);
 extern void free_event(event_t *);
 extern void event_add(event_t *);
 extern void event_del(event_t *);
index da849c40ab3a3f75e6410cae0c20eb2753cfbfd5..35cc8af38d3d080c9029c6f48dc789888e0e70a6 100644 (file)
@@ -35,7 +35,7 @@ enum {
 
 extern debug_t debug_level;
 extern void openlogger(const char *, logmode_t);
 
 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)
 extern void closelogger(void);
 
 #define ifdebug(l) if(debug_level >= DEBUG_##l)
index 4f1406cadc5318bf1f42ae30468fec5f86a410a1..4407f993c6ee4d5df49767fe55fe57c92f255fb0 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     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__
 */
 
 #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 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 *);
 extern void free_node(node_t *);
 extern void node_add(node_t *);
 extern void node_del(node_t *);
index 36b214615490e6f3f1299a6fa3e5ec10f28a4066..3071b02a5750d8ba54daf52695677d14fff57d0c 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     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"
 */
 
 #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)
   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;
 static void _execute_script(const char *scriptname, char **envp)
 {
        int save_errno;
index 9b0b123fa497f6aafaffa312f550ddb4b91c6018..182ed72a2c20e79dcc9bddf328be4884548ba22e 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     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__
 */
 
 #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 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__ */
 
 #endif                                                 /* __TINC_PROCESS_H__ */
index 7a32a17abd75aab218727051d166ce1ff84ecbbe..e85db5d1f856eaf2b12916d2a4652ab4f26f448b 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     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__
 */
 
 #ifndef __TINC_PROTOCOL_H__
@@ -66,7 +66,7 @@ typedef struct past_request_t {
 
 /* Basic functions */
 
 
 /* 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 *);
 extern void forward_request(struct connection_t *);
 extern bool receive_request(struct connection_t *);
 extern bool check_id(const char *);
index edca1c740859476cfa828ed99773de13b61ea55e..b0bc9113f9e568840264df36c6fda0402185caf1 100644 (file)
@@ -17,7 +17,7 @@
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
     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__
 */
 
 #ifndef __TINC_SUBNET_H__
@@ -64,11 +64,11 @@ typedef struct subnet_t {
        } net;
 } 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 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 *);
 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 *);