From: Arnaud Giersch Date: Fri, 30 Mar 2012 09:55:37 +0000 (+0200) Subject: Connect categories before the beginning of main(). X-Git-Tag: v3_7~138 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/4e5ad23a2d8bcaa043c96018e65eaca36897ad79?ds=sidebyside Connect categories before the beginning of main(). This allows to list the user defined categories with --help-log-categories. Unfortunately, this feature is only available when using gcc. --- diff --git a/include/xbt/log.h b/include/xbt/log.h index 56e915942f..a398c405e2 100644 --- a/include/xbt/log.h +++ b/include/xbt/log.h @@ -136,7 +136,7 @@ typedef enum { * to avoid an extra declaration of root when XBT_LOG_NEW_SUBCATEGORY is called by * XBT_LOG_NEW_CATEGORY */ #define XBT_LOG_NEW_SUBCATEGORY_helper(catName, parent, desc) \ - XBT_PUBLIC(void) _XBT_LOGV_CTOR(catName)(void); \ + XBT_PUBLIC(void) _XBT_LOGV_CTOR(catName)(void) _XBT_GNUC_CONSTRUCTOR(600); \ void _XBT_LOGV_CTOR(catName)(void) \ { \ XBT_LOG_EXTERNAL_CATEGORY(catName); \