1 #ifndef_LINUX_TYPES_H 2 #define_LINUX_TYPES_H 3
4 /* 5 * This allows for 256 file descriptors: if NR_OPEN is ever grown beyond that 6 * you'll have to change this too. But 256 fd's seem to be enough even for such 7 * "real" unices like SunOS, so hopefully this is one limit that doesn't have 8 * to be changed. 9 * 10 * Note that POSIX wants the FD_CLEAR(fd,fdsetp) defines to be in <sys/time.h> 11 * (and thus <linux/time.h>) - but this is a more logical place for them. Solved 12 * by having dummy defines in <sys/time.h>. 13 */ 14
15 /* 16 * Those macros may have been defined in <gnu/types.h>. But we always 17 * use the ones here. 18 */ 19 #undef__NFDBITS 20 #define__NFDBITS (8 * sizeof(unsignedint))
21
22 #undef__FD_SETSIZE 23 #define__FD_SETSIZE 256
24
25 #undef__FDSET_INTS 26 #define__FDSET_INTS (__FD_SETSIZE/__NFDBITS)
27
28 typedefstructfd_set{ 29 unsignedintfds_bits [__FDSET_INTS];
30 }fd_set;
31
32 #include <asm/types.h>
33
34 #ifndefNULL 35 #defineNULL ((void *) 0)
36 #endif 37
38 #ifdefined(__GNUC__) && !defined(__STRICT_ANSI__)
39 #define _LOFF_T
40 typedeflonglongloff_t;
41 #endif 42
43 /* bsd */ 44 typedefunsignedcharu_char;
45 typedefunsignedshortu_short;
46 typedefunsignedintu_int;
47 typedefunsignedlongu_long;
48
49 /* sysv */ 50 typedefunsignedcharunchar;
51 typedefunsignedshortushort;
52 typedefunsignedintuint;
53 typedefunsignedlongulong;
54
55 typedefchar *caddr_t;
56
57 typedefunsignedcharcc_t;
58 typedefunsignedint speed_t;
59 typedefunsignedinttcflag_t;
60
61 structustat{ 62 daddr_tf_tfree;
63 ino_tf_tinode;
64 char f_fname[6];
65 char f_fpack[6];
66 };
67
68 #endif