diff options
author | John Högberg <john@erlang.org> | 2017-09-07 08:18:11 +0200 |
---|---|---|
committer | John Högberg <john@erlang.org> | 2017-09-07 08:28:10 +0200 |
commit | 1e67f9542a8d1be6c1d31048db19b7abe6f47372 (patch) | |
tree | 230d85f7f5750494d35d91b7bd51656e1a3bc2c5 /erts/emulator/beam/sys.h | |
parent | 5900bd977164eba24311bbf9995a4e313d4013a7 (diff) | |
download | erlang-1e67f9542a8d1be6c1d31048db19b7abe6f47372.tar.gz |
Replace ad-hoc MIN/MAX macros with common ones
Besides being noisy, they were already defined by a global Unix-
specific header, causing the Windows build to fail if one forgot to
define them.
Diffstat (limited to 'erts/emulator/beam/sys.h')
-rw-r--r-- | erts/emulator/beam/sys.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/beam/sys.h b/erts/emulator/beam/sys.h index 6662685f54..704d567337 100644 --- a/erts/emulator/beam/sys.h +++ b/erts/emulator/beam/sys.h @@ -1268,6 +1268,14 @@ void erl_bin_write(unsigned char *, int, int); # define DEBUGF(x) #endif +#ifndef MAX +#define MAX(A, B) ((A) > (B) ? (A) : (B)) +#endif + +#ifndef MIN +#define MIN(A, B) ((A) < (B) ? (A) : (B)) +#endif + #ifdef __WIN32__ #ifdef ARCH_64 #define ERTS_ALLOC_ALIGN_BYTES 16 |