mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-03-05 10:58:14 +00:00
REORG: include: move MIN/MAX from tools.h to compat.h
Given that these macros are usually provided by sys/param.h, better move them to compat.h.
This commit is contained in:
parent
57bb71e83a
commit
5ae5006dde
@ -58,6 +58,14 @@ typedef struct { } empty_t;
|
||||
#define BITS_PER_INT (8*sizeof(int))
|
||||
#endif
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
/* this is for libc5 for example */
|
||||
#ifndef TCP_NODELAY
|
||||
#define TCP_NODELAY 1
|
||||
|
@ -22,16 +22,6 @@
|
||||
#ifndef _COMMON_TOOLS_H
|
||||
#define _COMMON_TOOLS_H
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#ifndef MIN
|
||||
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#ifndef MAX
|
||||
#define MAX(a, b) (((a) > (b)) ? (a) : (b))
|
||||
#endif
|
||||
|
||||
#define SWAP(a, b) do { typeof(a) t; t = a; a = b; b = t; } while(0)
|
||||
|
||||
/* return an integer of type <ret> with only the highest bit set. <ret> may be
|
||||
|
Loading…
Reference in New Issue
Block a user