X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/3302686f8952854a69b0328f0efa3148d64548b2..b6c71dc8e729a9d07d33713d74bc72e6fd5d4819:/include/xbt/log.h diff --git a/include/xbt/log.h b/include/xbt/log.h index 8ffe99f9c2..d80ba1ea88 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -27,12 +27,8 @@ /* XBT_LOG_MAYDAY: define this to replace the logging facilities with basic printf function. Useful to debug the logging facilities themselves */ -#include "gras_config.h" #undef XBT_LOG_MAYDAY //#define XBT_LOG_MAYDAY -#ifdef _WIN64 - #define XBT_LOG_MAYDAY -#endif #ifndef _XBT_LOG_H_ #define _XBT_LOG_H_ @@ -245,11 +241,9 @@ typedef struct xbt_log_category_s s_xbt_log_category_t, /* * Do NOT access any members of this structure directly. FIXME: move to private? */ -#ifdef _XBT_WIN32 -#define XBT_LOG_BUFF_SIZE 16384 /* Size of the static string in which we build the log string */ -#else + #define XBT_LOG_BUFF_SIZE 2048 /* Size of the static string in which we build the log string */ -#endif + struct xbt_log_category_s { xbt_log_category_t parent; xbt_log_category_t firstChild; @@ -270,11 +264,7 @@ struct xbt_log_event_s { int lineNum; va_list ap; va_list ap_copy; /* need a copy to launch dynamic layouts when the static ones overflowed */ -#ifdef _XBT_WIN32 - char *buffer; -#else char buffer[XBT_LOG_BUFF_SIZE]; -#endif }; /** @@ -393,15 +383,10 @@ extern xbt_log_layout_t xbt_log_default_layout; * code. * Setting the LogEvent's valist member is done inside _log_logEvent. */ -#ifdef _XBT_WIN32 -#include /* calloc */ -#define _XBT_LOG_EV_BUFFER_ZERO() \ - _log_ev.buffer = (char*) calloc(XBT_LOG_BUFF_SIZE + 1, sizeof(char)) -#else + #include /* memset */ #define _XBT_LOG_EV_BUFFER_ZERO() \ memset(_log_ev.buffer, 0, XBT_LOG_BUFF_SIZE) -#endif /* Logging Macros */