]> AND Public Git Repository - simgrid.git/blobdiff - include/xbt/log.h
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[From A. Giersch] Fix the following compilation errors in ICO-C99 mode:
[simgrid.git] / include / xbt / log.h
index cd31e12ec31038a89393c0167fa20fc603a77d6e..5bba6f69151a458d4a86464ccf9bd8c8aa29a420 100644 (file)
@@ -1,8 +1,7 @@
-/* $Id$ */
-
 /* log - a generic logging facility in the spirit of log4j                  */
 
-/* Copyright (c) 2003, 2004 Martin Quinson. All rights reserved.            */
+/* Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, 2010. The SimGrid Team.
+ * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
@@ -93,7 +92,7 @@ SG_BEGIN_DECL()
 /* The root of the category hierarchy. */
 #define XBT_LOG_ROOT_CAT   root
 
-/* In stric ansi C, we are not allowed to initialize a variable with 
+/* In strict 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.
@@ -168,7 +167,7 @@ SG_BEGIN_DECL()
  * Indicates which category is the default one.
  */
 
-#if defined(XBT_LOG_MAYDAY)     /*|| defined (NLOG) * turning logging off */
+#if defined(XBT_LOG_MAYDAY) || defined(SUPERNOVAE_MODE)     /*|| defined (NLOG) * turning logging off */
 # define XBT_LOG_DEFAULT_CATEGORY(cname)
 #else
 # define XBT_LOG_DEFAULT_CATEGORY(cname) \
@@ -241,7 +240,7 @@ XBT_PUBLIC(void) xbt_log_control_set(const char *cs);
 /*
  * Do NOT access any members of this structure directly. FIXME: move to private?
  */
-#ifdef WIN32
+#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 */
@@ -266,7 +265,7 @@ XBT_PUBLIC(void) xbt_log_control_set(const char *cs);
        int lineNum;
        va_list ap;
        va_list ap_copy;         /* need a copy to launch dynamic layouts when the static ones overflowed */
-#ifdef WIN32
+#ifdef _XBT_WIN32
        char *buffer;
 #else
        char buffer[XBT_LOG_BUFF_SIZE];
@@ -389,7 +388,7 @@ XBT_PUBLIC_DATA(s_xbt_log_category_t) _XBT_LOGV(XBT_LOG_ROOT_CAT);
  * code. 
  * Setting the LogEvent's valist member is done inside _log_logEvent.
  */
-#ifdef WIN32
+#ifdef _XBT_WIN32
 #define _XBT_LOG_PRE(catv, priority) do {                       \
      if (_XBT_LOG_ISENABLEDV(catv, priority)) {                  \
          s_xbt_log_event_t _log_ev =                             \