mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-10 00:57:02 +02:00
[BUILD] Fix limits.h once for all
Patch #cf83df3d162687d9c74783357421bd89f596eaac was stupid. Including limits.h is portable and easier. At least it now builds on Solaris, FreeBSD, Linux and OpenBSD.
This commit is contained in:
parent
a1973c4d82
commit
167d8b5953
@ -22,16 +22,11 @@
|
|||||||
#ifndef _COMMON_STANDARD_H
|
#ifndef _COMMON_STANDARD_H
|
||||||
#define _COMMON_STANDARD_H
|
#define _COMMON_STANDARD_H
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <limits.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <common/config.h>
|
#include <common/config.h>
|
||||||
#include <proto/fd.h>
|
#include <proto/fd.h>
|
||||||
|
|
||||||
#ifndef INT_MAX
|
|
||||||
/* Needed on FreeBSD */
|
|
||||||
#include <sys/limits.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/****** string-specific macros and functions ******/
|
/****** string-specific macros and functions ******/
|
||||||
/* if a > max, then bound <a> to <max>. The macro returns the new <a> */
|
/* if a > max, then bound <a> to <max>. The macro returns the new <a> */
|
||||||
#define UBOUND(a, max) ({ typeof(a) b = (max); if ((a) > b) (a) = b; (a); })
|
#define UBOUND(a, max) ({ typeof(a) b = (max); if ((a) > b) (a) = b; (a); })
|
||||||
|
Loading…
Reference in New Issue
Block a user