Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Fix warning about undefined identifier [-Wundef].
authorArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 24 Apr 2014 14:38:31 +0000 (16:38 +0200)
committerArnaud Giersch <arnaud.giersch@iut-bm.univ-fcomte.fr>
Thu, 24 Apr 2014 14:38:31 +0000 (16:38 +0200)
Thanks to Samuel Thibault for the report.

include/xbt/log.h

index c33d0ff..6589249 100644 (file)
@@ -91,7 +91,7 @@ typedef enum {
 #define _XBT_LOG_CONCAT(x, y) x ## y
 #define _XBT_LOG_CONCAT2(x, y) _XBT_LOG_CONCAT(x, y)
 /* Apparently, constructor priorities are not supported by gcc on Macs */
 #define _XBT_LOG_CONCAT(x, y) x ## y
 #define _XBT_LOG_CONCAT2(x, y) _XBT_LOG_CONCAT(x, y)
 /* Apparently, constructor priorities are not supported by gcc on Macs */
-#if __GNUC__ && __APPLE__
+#if defined(__GNUC__) && defined(__APPLE__)
 #  define _XBT_LOGV_CTOR_ATTRIBUTE
 #else
 #  define _XBT_LOGV_CTOR_ATTRIBUTE _XBT_GNUC_CONSTRUCTOR(600)
 #  define _XBT_LOGV_CTOR_ATTRIBUTE
 #else
 #  define _XBT_LOGV_CTOR_ATTRIBUTE _XBT_GNUC_CONSTRUCTOR(600)