Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
the gcc attribute 'unused' made portable
[simgrid.git] / include / xbt / misc.h
index 03257f5..2889ea7 100644 (file)
 # define _XBT_GNUC_FORMAT( arg_idx )                \
                   __attribute__((__format_arg__ (arg_idx)))
 # define _XBT_GNUC_NORETURN __attribute__((__noreturn__))
+# define _XBT_GNUC_UNUSED  __attribute__((unused))
 
 #else   /* !__GNUC__ */
 # define _XBT_GNUC_PRINTF( format_idx, arg_idx )
 # define _XBT_GNUC_SCANF( format_idx, arg_idx )
 # define _XBT_GNUC_FORMAT( arg_idx )
 # define _XBT_GNUC_NORETURN
+# define _XBT_GNUC_UNUSED
 
 #endif  /* !__GNUC__ */
 
@@ -80,7 +82,7 @@ SG_BEGIN_DECL()
 typedef struct {  
    char *name;
    int port;
-} xbt_host_t;
+} s_xbt_host_t, *xbt_host_t;
 
 const char *xbt_procname(void);
 
@@ -89,6 +91,7 @@ const char *xbt_procname(void);
 
    typedef void (void_f_ppvoid_t)(void**);
    typedef void (void_f_pvoid_t) (void*);
+   typedef void (*void_f_void_t) (void);
 
    typedef int  (int_f_pvoid_pvoid_t) (void*,void*);