Rev | Line | |
---|
[1] | 1 | #ifndef _SYS_PARAM_H |
---|
| 2 | #define _SYS_PARAM_H |
---|
| 3 | |
---|
| 4 | #include <limits.h> |
---|
| 5 | |
---|
| 6 | #define MAXPATHLEN PATH_MAX |
---|
| 7 | #define MAXHOSTNAMELEN 64 |
---|
| 8 | #define NGROUPS 32 |
---|
| 9 | #define NOGROUP (-1) |
---|
| 10 | #define NOFILE OPEN_MAX |
---|
| 11 | |
---|
| 12 | #undef MIN |
---|
| 13 | #undef MAX |
---|
| 14 | #define MIN(a,b) (((a)<(b))?(a):(b)) |
---|
| 15 | #define MAX(a,b) (((a)>(b))?(a):(b)) |
---|
| 16 | |
---|
| 17 | #ifdef __alpha__ |
---|
| 18 | #define HZ 1024 |
---|
| 19 | #else |
---|
| 20 | #define HZ 100 |
---|
| 21 | #endif |
---|
| 22 | |
---|
| 23 | #ifndef howmany |
---|
| 24 | # define howmany(x, y) (((x)+((y)-1))/(y)) |
---|
| 25 | #endif |
---|
| 26 | #define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) |
---|
| 27 | #define powerof2(x) ((((x)-1)&(x))==0) |
---|
| 28 | |
---|
| 29 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.