diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-04 22:24:03 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-04 22:24:03 -0500 |
commit | bc273e17510c7680bcffee75858d374aa93f7e4b (patch) | |
tree | 70fafc5ebb2b4104b5d0169578f8e24f4a497ba4 /sim/common/sim-basics.h | |
parent | ac8eefeb243ad326946c3b2b78ba5d1367fe0f99 (diff) | |
download | gdb-bc273e17510c7680bcffee75858d374aa93f7e4b.zip gdb-bc273e17510c7680bcffee75858d374aa93f7e4b.tar.gz gdb-bc273e17510c7680bcffee75858d374aa93f7e4b.tar.bz2 |
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.
Diffstat (limited to 'sim/common/sim-basics.h')
-rw-r--r-- | sim/common/sim-basics.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 */ |