12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182 |
- #ifndef _SYS_PARAM_H
- #define _SYS_PARAM_H 1
- #ifndef ARG_MAX
- # define __undef_ARG_MAX
- #endif
- #include <limits.h>
- #include <linux/limits.h>
- #include <linux/param.h>
- #ifndef __undef_ARG_MAX
- # undef ARG_MAX
- # undef __undef_ARG_MAX
- #endif
- #define NBBY CHAR_BIT
- #ifndef NGROUPS
- # define NGROUPS NGROUPS_MAX
- #endif
- #define MAXSYMLINKS 20
- #define CANBSIZ MAX_CANON
- #define MAXPATHLEN PATH_MAX
- #define NOFILE 256
- #define NCARGS 131072
- #include <sys/types.h>
- #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
- #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
- #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
- #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
- #ifndef howmany
- # define howmany(x, y) (((x) + ((y) - 1)) / (y))
- #endif
- #ifdef __GNUC__
- # define roundup(x, y) (__builtin_constant_p (y) && powerof2 (y) \
- ? (((x) + (y) - 1) & ~((y) - 1)) \
- : ((((x) + ((y) - 1)) / (y)) * (y)))
- #else
- # define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
- #endif
- #define powerof2(x) ((((x) - 1) & (x)) == 0)
- #define MIN(a,b) (((a)<(b))?(a):(b))
- #define MAX(a,b) (((a)>(b))?(a):(b))
- #define DEV_BSIZE 512
- #endif
|