diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2004-05-26 17:57:10 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2004-05-26 17:57:10 +0000 |
commit | bb42a35c429153600841c165dfe1b7a99d7ebb28 (patch) | |
tree | ac26f10e210aa45ac247a82e3529a07d79934406 /newlib | |
parent | 227e6ef6c377fb56e871282d3afa2b2454d0e861 (diff) | |
download | cygnal-bb42a35c429153600841c165dfe1b7a99d7ebb28.tar.gz cygnal-bb42a35c429153600841c165dfe1b7a99d7ebb28.tar.bz2 cygnal-bb42a35c429153600841c165dfe1b7a99d7ebb28.zip |
2004-05-26 Jeff Johnston <jjohnstn@redhat.com>
* libc/search/hash_buf.c: Protect MAX and MIN macros from
redefinition.
* libc/search/hash.c: Ditto.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 6 | ||||
-rw-r--r-- | newlib/libc/search/hash.c | 4 | ||||
-rw-r--r-- | newlib/libc/search/hash_buf.c | 4 |
3 files changed, 14 insertions, 0 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 58b354c07..43ca24a78 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,9 @@ +2004-05-26 Jeff Johnston <jjohnstn@redhat.com> + + * libc/search/hash_buf.c: Protect MAX and MIN macros from + redefinition. + * libc/search/hash.c: Ditto. + 2004-05-25 Artem B. Bityuckiy <abitytsky@softminecorp.com> * newlib.hin: (_WANT_IO_POS_ARGS): New define. 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 |