1 /* 2 * Copyright 2006-2024, Haiku Inc. All rights reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _BSD_SYS_PARAM_H_ 6 #define _BSD_SYS_PARAM_H_ 7 8 9 #include_next <sys/param.h> 10 #include <features.h> 11 12 13 #ifdef _DEFAULT_SOURCE 14 15 16 #define MAXLOGNAME 33 17 #define NBBY 8 18 19 20 #define ALIGNBYTES _ALIGNBYTES 21 #define ALIGN(p) _ALIGN(p) 22 23 #ifndef howmany 24 #define howmany(x, y) (((x)+((y)-1))/(y)) 25 #endif 26 #define nitems(x) (sizeof((x)) / sizeof((x)[0])) 27 #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) 28 #define rounddown(x, y) (((x)/(y))*(y)) 29 #define powerof2(x) ((((x)-1)&(x))==0) 30 31 32 #endif /* _DEFAULT_SOURCE */ 33 34 35 #endif /* _BSD_SYS_PARAM_H_ */ 36