]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
[BUILD] Fix limits.h once for all
authorWilly Tarreau <w@1wt.eu>
Mon, 9 Apr 2007 20:16:12 +0000 (22:16 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 9 Apr 2007 20:16:12 +0000 (22:16 +0200)
Patch #cf83df3d162687d9c74783357421bd89f596eaac was stupid. Including
limits.h is portable and easier. At least it now builds on Solaris,
FreeBSD, Linux and OpenBSD.

include/common/standard.h

index 3dea1fdaec1db16e0139c3071c7441f1eeb189c3..b15023473081018bd09d6a66d8dee939fd433c52 100644 (file)
 #ifndef _COMMON_STANDARD_H
 #define _COMMON_STANDARD_H
 
-#include <sys/types.h>
+#include <limits.h>
 #include <netinet/in.h>
 #include <common/config.h>
 #include <proto/fd.h>
 
-#ifndef INT_MAX
-/* Needed on FreeBSD */
-#include <sys/limits.h>
-#endif
-
 /****** string-specific macros and functions ******/
 /* 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); })