param.h
01:
02:
03:
04:
05:
06:
07:
08:
09:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20: #ifndef _SYS_PARAM_H
21: #define _SYS_PARAM_H 1
22:
23: #ifndef ARG_MAX
24: # define __undef_ARG_MAX
25: #endif
26:
27: #include <limits.h>
28: #include <linux/limits.h>
29: #include <linux/param.h>
30:
31:
32: #ifdef __undef_ARG_MAX
33: # undef ARG_MAX
34: # undef __undef_ARG_MAX
35: #endif
36:
37:
38:
39: #define NBBY CHAR_BIT
40: #ifndef NGROUPS
41: # define NGROUPS NGROUPS_MAX
42: #endif
43: #define MAXSYMLINKS 20
44: #define CANBSIZ MAX_CANON
45: #define MAXPATHLEN PATH_MAX
46:
47:
48:
49: #define NOFILE 256
50: #define NCARGS 131072
51:
52:
53: #include <sys/types.h>
54:
55:
56: #define setbit(a,i) ((a)[(i)/NBBY] |= 1<<((i)%NBBY))
57: #define clrbit(a,i) ((a)[(i)/NBBY] &= ~(1<<((i)%NBBY)))
58: #define isset(a,i) ((a)[(i)/NBBY] & (1<<((i)%NBBY)))
59: #define isclr(a,i) (((a)[(i)/NBBY] & (1<<((i)%NBBY))) == 0)
60:
61:
62: #ifndef howmany
63: # define howmany(x, y) (((x) + ((y) - 1)) / (y))
64: #endif
65: #ifdef __GNUC__
66: # define roundup(x, y) (__builtin_constant_p (y) && powerof2 (y) \
67: ? (((x) + (y) - 1) & ~((y) - 1)) \
68: : ((((x) + ((y) - 1)) / (y)) * (y)))
69: #else
70: # define roundup(x, y) ((((x) + ((y) - 1)) / (y)) * (y))
71: #endif
72: #define powerof2(x) ((((x) - 1) & (x)) == 0)
73:
74:
75: #define MIN(a,b) (((a)<(b))?(a):(b))
76: #define MAX(a,b) (((a)>(b))?(a):(b))
77:
78:
79:
80: #define DEV_BSIZE 512
81:
82:
83: #endif
84:
for client
18.222.148.124
© Andrew Scott 2006 -
2024,
All Rights Reserved