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__FDSET_LONGS 20 #define__FDSET_LONGS (256/(8*sizeof(unsignedlong)))
21
22 typedefstructfd_set{ 23 unsignedlongfds_bits [__FDSET_LONGS];
24 }fd_set;
25
26 #undef__NFDBITS 27 #define__NFDBITS (8 * sizeof(unsignedlong))
28
29 #undef__FD_SETSIZE 30 #define__FD_SETSIZE (__FDSET_LONGS*__NFDBITS)
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_t f_tfree;
63 ino_t f_tinode;
64 char f_fname[6];
65 char f_fpack[6];
66 };
67
68 #endif