From 4e5ad23a2d8bcaa043c96018e65eaca36897ad79 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Fri, 30 Mar 2012 11:55:37 +0200 Subject: [PATCH] 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. --- include/xbt/log.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); \ -- 2.20.1