+/* In stric ansi C, we are not allowed to initialize a variable with
+ * a non-constant value. But the whole tree of categories is
+ * connected by setting the address of the parent category as a field
+ * of the child one.
+ *
+ * Unfortunately, Visual C builder does not target any standard
+ * compliance, and C99 is not an exception to this unfortunate rule.
+ *
+ * So, we work this around by adding a XBT_LOG_CONNECT() macro,
+ * allowing to connect a child to its parent. It should be used
+ * during the initialization of the code, before the child category
+ * gets used.
+ *
+ * When compiling with gcc, this is not necessary (XBT_LOG_CONNECT
+ * defines to nothing). When compiling with MSVC, this is needed if
+ * you don't want to see your child category become a child of root
+ * directly.
+ */
+#if defined(__STRICT_ANSI__) || defined(_MSC_VER)
+# define _XBT_LOG_PARENT_INITIALIZER(parent) NULL
+# define XBT_LOG_CONNECT(parent,child) _XBT_LOGV(child).parent = &_XBT_LOGV(parent)
+#else
+# define _XBT_LOG_PARENT_INITIALIZER(parent) &_XBT_LOGV(parent)
+# define XBT_LOG_CONNECT(parent,child) xbt_assert(_XBT_LOGV(child).parent == &_XBT_LOGV(parent))
+#endif
+