mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 20:48:48 +01:00
8bacd281ba
* Minor tweaks to POSIX sys/param.h for style. * Don't redefine alignment macros in BSD sys/param.h even conditionally. And add a few more macros from the real BSD sys/param.h, for convenience. (Most of these are also declared in musl and glibc's sys/param.h)
31 lines
627 B
C
31 lines
627 B
C
/*
|
|
* Copyright 2002-2024, Haiku, Inc. All rights reserved.
|
|
* Distributed under the terms of the MIT License.
|
|
*/
|
|
#ifndef _SYS_PARAM_H
|
|
#define _SYS_PARAM_H
|
|
|
|
|
|
#include <limits.h>
|
|
|
|
|
|
#define MAXHOSTNAMELEN (256) /* maximum possible length of this machine's hostname */
|
|
|
|
#define MAXPATHLEN PATH_MAX
|
|
#define MAXSYMLINKS SYMLOOP_MAX
|
|
#define NOFILE OPEN_MAX
|
|
|
|
|
|
#ifndef MIN
|
|
# define MIN(a,b) (((a) < (b)) ? (a) : (b))
|
|
#endif
|
|
#ifndef MAX
|
|
# define MAX(a,b) (((a) > (b)) ? (a) : (b))
|
|
#endif
|
|
|
|
#define _ALIGNBYTES (sizeof(long) - 1)
|
|
#define _ALIGN(p) (((u_long)(p) + _ALIGNBYTES) &~ _ALIGNBYTES)
|
|
|
|
|
|
#endif /* _SYS_PARAM_H */
|