Defining min/max macros clashes with C++.
Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
if (registry_arena.len
< registry_arena.used + sizeof(struct rcu_reader))
resize_arena(®istry_arena,
- max(registry_arena.len << 1, ARENA_INIT_ALLOC));
+ caa_max(registry_arena.len << 1, ARENA_INIT_ALLOC));
/*
* Find a free spot.
*/
*/
#define CMM_ACCESS_ONCE(x) (*(volatile typeof(x) *)&(x))
-#ifndef max
-#define max(a,b) ((a)>(b)?(a):(b))
+#ifndef caa_max
+#define caa_max(a,b) ((a)>(b)?(a):(b))
#endif
-#ifndef min
-#define min(a,b) ((a)<(b)?(a):(b))
+#ifndef caa_min
+#define caa_min(a,b) ((a)<(b)?(a):(b))
#endif
#if defined(__SIZEOF_LONG__)