haiku/headers/posix/sys/param.h
Augustin Cavalier 8bacd281ba sys/param.h: Cleanup.
* 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)
2024-10-14 13:53:54 -04:00

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 */