xref: /haiku/headers/posix/sys/param.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2002-2012 Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _SYS_PARAM_H
6 #define _SYS_PARAM_H
7 
8 
9 #include <limits.h>
10 
11 
12 #define MAXPATHLEN      PATH_MAX
13 #define MAXSYMLINKS		SYMLOOP_MAX
14 
15 #define NOFILE          OPEN_MAX
16 
17 #ifndef MIN
18 #	define MIN(a,b) (((a) < (b)) ? (a) : (b))
19 #endif
20 #ifndef MAX
21 #	define MAX(a,b) (((a) > (b)) ? (a) : (b))
22 #endif
23 
24 #define _ALIGNBYTES	(sizeof(long) - 1)
25 #define _ALIGN(p) \
26 	(((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
27 
28 /* maximum possible length of this machine's hostname */
29 #ifndef MAXHOSTNAMELEN
30 #	define MAXHOSTNAMELEN 256
31 #endif
32 
33 #endif	/* _SYS_PARAM_H */
34