sys/param.h
#ifndef _SYS_PARAM_H
#define _SYS_PARAM_H 1
#include
#include
#include
#define NBBY CHAR_BIT
#ifndef NGROUPS
# define NGROUPS NGROUPS_MAX
#endif
#define MAXSYMLINKS 20
#define CANBSIZ MAX_CANON
#define NCARGS ARG_MAX
#define MAXPATHLEN PATH_MAX
#define NOFILE 256
#include
#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
|
|