vfs: check userland buffers before reading them.
[haiku.git] / headers / posix / sys / param.h
blob3e5c2b0b66ac9530500c644cbdff355fcfdb72c7
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
9 #include <limits.h>
12 #define MAXPATHLEN PATH_MAX
13 #define MAXSYMLINKS SYMLOOP_MAX
15 #define NOFILE OPEN_MAX
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
24 #define _ALIGNBYTES (sizeof(long) - 1)
25 #define _ALIGN(p) \
26 (((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
28 /* maximum possible length of this machine's hostname */
29 #ifndef MAXHOSTNAMELEN
30 # define MAXHOSTNAMELEN 256
31 #endif
33 #endif /* _SYS_PARAM_H */