#include <simgrid/zone.h>
#include <xbt.h>
+#ifdef MIN
+#undef MIN
+#endif
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+#ifdef MAX
+#undef MAX
+#endif
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
#ifdef __cplusplus
#include <map>
#include <simgrid/simix.h>
#include <set>
#endif
+#ifdef MIN
+#undef MIN
+#endif
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+
+#ifdef MAX
+#undef MAX
+#endif
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
SG_BEGIN_DECL()
/** @brief Link opaque datatype
# define XBT_THREAD_LOCAL No thread local on this architecture
#endif
-/* improvable on gcc (by evaluating arguments only once), but wouldn't be portable */
-#ifdef MIN
-# undef MIN
-#endif
-#define MIN(a,b) ((a)<(b)?(a):(b))
-
-#ifdef MAX
-# undef MAX
-#endif
-#define MAX(a,b) ((a)>(b)?(a):(b))
-
/*
* Expands to `one' if there is only one argument for the variadic part.
* Otherwise, expands to `more'.
-/* Copyright (c) 2006-2018. The SimGrid Team.
- * All rights reserved. */
+/* Copyright (c) 2006-2018. 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. */
#include "xbt/sysdep.h"
#include "xbt/xbt_os_thread.h"
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
int xbt_log_no_loc = 0; /* if set to true (with --log=no_loc), file localization will be omitted (for tesh tests) */
static xbt_os_mutex_t log_cat_init_mutex = NULL;
#include "xbt/asserts.h"
#include "xbt/sysdep.h"
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
XBT_LOG_NEW_DEFAULT_SUBCATEGORY(xbt_mallocator, xbt, "Mallocators");
/** Implementation note on the mallocators:
#include <pthread.h>
#include <stdint.h>
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
#ifdef HAVE_LIMITS_H
# include <limits.h>
#else
#include "xbt/sysdep.h"
#include <stdio.h>
+#define MIN(a, b) ((a) < (b) ? (a) : (b))
+#define MAX(a, b) ((a) > (b) ? (a) : (b))
+
extern const char *xbt_log_priority_names[8];
#define ERRMSG \