Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
adapt the macro XBT_LOG_NEW_CATEGORY to the windows DLL
authorcherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 1 Mar 2007 16:31:54 +0000 (16:31 +0000)
committercherierm <cherierm@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Thu, 1 Mar 2007 16:31:54 +0000 (16:31 +0000)
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@3182 48e7efb5-ca39-0410-a469-dd3cf9ba447f

include/xbt/log.h

index afb5d95..3d8eba3 100644 (file)
@@ -124,7 +124,17 @@ typedef enum {
  *
  * Creates a new subcategory of the root category.
  */
-#define XBT_LOG_NEW_CATEGORY(catName,desc)  XBT_LOG_NEW_SUBCATEGORY_helper(catName, XBT_LOG_ROOT_CAT, desc)
+#if (defined(_WIN32) && !defined(DLL_STATIC))
+# define XBT_LOG_NEW_CATEGORY(catName,desc)  \
+       XBT_EXPORT_NO_IMPORT(s_xbt_log_category_t) _XBT_LOGV(catName) = {       \
+        0, 0, 0,                    \
+               #catName, xbt_log_priority_uninitialized, 1, \
+        0, 1                                          \
+    }
+#else
+# define XBT_LOG_NEW_CATEGORY(catName,desc)  XBT_LOG_NEW_SUBCATEGORY_helper(catName, XBT_LOG_ROOT_CAT, desc)  
+#endif
 
 /**
  * \ingroup XBT_log