diff options
Diffstat (limited to 'newlib/libc')
-rw-r--r-- | newlib/libc/search/hash.c | 4 | ||||
-rw-r--r-- | newlib/libc/search/hash_buf.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/newlib/libc/search/hash.c b/newlib/libc/search/hash.c index 1b045e83f..3d919286a 100644 --- a/newlib/libc/search/hash.c +++ b/newlib/libc/search/hash.c @@ -78,8 +78,12 @@ static void swap_header_copy(HASHHDR *, HASHHDR *); #endif /* Macros for min/max. */ +#ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b)) +#endif +#ifndef MAX #define MAX(a,b) (((a)>(b))?(a):(b)) +#endif /* Fast arithmetic, relying on powers of 2, */ #define MOD(x, y) ((x) & ((y) - 1)) diff --git a/newlib/libc/search/hash_buf.c b/newlib/libc/search/hash_buf.c index 3979bcdd5..3dfc2069f 100644 --- a/newlib/libc/search/hash_buf.c +++ b/newlib/libc/search/hash_buf.c @@ -94,8 +94,12 @@ static BUFHEAD *newbuf(HTAB *, __uint32_t, BUFHEAD *); #define LRU_INSERT(B) BUF_INSERT((B), LRU) /* Macros for min/max. */ +#ifndef MIN #define MIN(a,b) (((a)<(b))?(a):(b)) +#endif +#ifndef MAX #define MAX(a,b) (((a)>(b))?(a):(b)) +#endif /* * We are looking for a buffer with address "addr". If prev_bp is NULL, then |