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.
This commit is contained in:
Jeff Johnston 2004-05-26 17:57:10 +00:00
parent 227e6ef6c3
commit bb42a35c42
3 changed files with 14 additions and 0 deletions

View File

@ -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> 2004-05-25 Artem B. Bityuckiy <abitytsky@softminecorp.com>
* newlib.hin: (_WANT_IO_POS_ARGS): New define. * newlib.hin: (_WANT_IO_POS_ARGS): New define.

View File

@ -78,8 +78,12 @@ static void swap_header_copy(HASHHDR *, HASHHDR *);
#endif #endif
/* Macros for min/max. */ /* Macros for min/max. */
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b))
#endif
/* Fast arithmetic, relying on powers of 2, */ /* Fast arithmetic, relying on powers of 2, */
#define MOD(x, y) ((x) & ((y) - 1)) #define MOD(x, y) ((x) & ((y) - 1))

View File

@ -94,8 +94,12 @@ static BUFHEAD *newbuf(HTAB *, __uint32_t, BUFHEAD *);
#define LRU_INSERT(B) BUF_INSERT((B), LRU) #define LRU_INSERT(B) BUF_INSERT((B), LRU)
/* Macros for min/max. */ /* Macros for min/max. */
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a):(b)) #define MIN(a,b) (((a)<(b))?(a):(b))
#endif
#ifndef MAX
#define MAX(a,b) (((a)>(b))?(a):(b)) #define MAX(a,b) (((a)>(b))?(a):(b))
#endif
/* /*
* We are looking for a buffer with address "addr". If prev_bp is NULL, then * We are looking for a buffer with address "addr". If prev_bp is NULL, then