From bc273e17510c7680bcffee75858d374aa93f7e4b Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 4 Jan 2016 22:24:03 -0500 Subject: sim: unify min/max macros Import defines from gdb/defs.h to the sim core so we can delete the various copies that already exist. --- sim/common/sim-basics.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sim/common/sim-basics.h') diff --git a/sim/common/sim-basics.h b/sim/common/sim-basics.h index e0cb6d1..16c7eb5 100644 --- a/sim/common/sim-basics.h +++ b/sim/common/sim-basics.h @@ -48,6 +48,13 @@ extern int asprintf (char **result, const char *format, ...); #endif +#ifndef min +#define min(a, b) ((a) < (b) ? (a) : (b)) +#endif +#ifndef max +#define max(a, b) ((a) > (b) ? (a) : (b)) +#endif + /* Some versions of GCC include an attribute operator, define it */ -- cgit v1.1