param.h 755 B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef _SYS_PARAM_H
  2. #define _SYS_PARAM_H
  3. #define MAXSYMLINKS 20
  4. #define MAXHOSTNAMELEN 64
  5. #define MAXNAMLEN 255
  6. #define MAXPATHLEN 4096
  7. #define NBBY 8
  8. #define NGROUPS 32
  9. #define CANBSIZ 255
  10. #define NOFILE 256
  11. #define NCARGS 131072
  12. #define DEV_BSIZE 512
  13. #define NOGROUP (-1)
  14. #undef MIN
  15. #undef MAX
  16. #define MIN(a,b) (((a)<(b))?(a):(b))
  17. #define MAX(a,b) (((a)>(b))?(a):(b))
  18. #define __bitop(x,i,o) ((x)[(i)/8] o (1<<(i)%8))
  19. #define setbit(x,i) __bitop(x,i,|=)
  20. #define clrbit(x,i) __bitop(x,i,&=~)
  21. #define isset(x,i) __bitop(x,i,&)
  22. #define isclr(x,i) !isset(x,i)
  23. #define howmany(n,d) (((n)+((d)-1))/(d))
  24. #define roundup(n,d) (howmany(n,d)*(d))
  25. #define powerof2(n) !(((n)-1) & (n))
  26. #include <sys/resource.h>
  27. #include <endian.h>
  28. #include <limits.h>
  29. #endif