X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/494616a1d79ab04ce6f0309a5cbb29ee5876c379..93aca7f5dc887d27c32e721953064501b10e662c:/include/xbt/misc.h diff --git a/include/xbt/misc.h b/include/xbt/misc.h index 28428682d8..9b232f3ee6 100644 --- a/include/xbt/misc.h +++ b/include/xbt/misc.h @@ -21,12 +21,14 @@ # 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__ */ @@ -43,6 +45,17 @@ # define _XBT_INLINE #endif +/* The cruft needed to export data in DLLs */ +#ifdef _WIN32 +# ifdef DLL_EXPORT +# define XBT_EXPORT __declspec(dllexport) /* building the DLL */ +# else +# define XBT_EXPORT extern __declspec(dllimport) /* using the DLL */ +# endif +#else +# define XBT_EXPORT +#endif + #ifndef max @@ -76,14 +89,11 @@ /* End of cruft for C++ */ SG_BEGIN_DECL() -/* Dunno where to place this: needed by config and amok */ -typedef struct { - char *name; - int port; -} xbt_host_t; const char *xbt_procname(void); +#define XBT_BACKTRACE_SIZE 10 /* FIXME: better place? Do document */ + SG_END_DECL() #endif /* XBT_MISC_H */