FACT++  1.0
dim_tcpip.h
Go to the documentation of this file.
1 /*
2  * DIM Include file for changing the number of open connections
3  * Date: 06-12-2007
4  * Author: C. Gaspar
5  */
6 
7 #ifdef WIN32
8 #define FD_SETSIZE 16384
9 #else
10 #ifdef linux
11 #ifndef NOMORECONNS
12 /* CG: Copied here bits/typesizes.h */
13 #ifndef _BITS_TYPESIZES_H
14 #define _BITS_TYPESIZES_H 1
15 
16 /* See <bits/types.h> for the meaning of these macros. This file exists so
17 that <bits/types.h> need not vary across different GNU platforms. */
18 
19 #define __DEV_T_TYPE __UQUAD_TYPE
20 #define __UID_T_TYPE __U32_TYPE
21 #define __GID_T_TYPE __U32_TYPE
22 #define __INO_T_TYPE __ULONGWORD_TYPE
23 #define __INO64_T_TYPE __UQUAD_TYPE
24 #define __MODE_T_TYPE __U32_TYPE
25 #define __NLINK_T_TYPE __UWORD_TYPE
26 #define __OFF_T_TYPE __SLONGWORD_TYPE
27 #define __OFF64_T_TYPE __SQUAD_TYPE
28 #define __PID_T_TYPE __S32_TYPE
29 #define __RLIM_T_TYPE __ULONGWORD_TYPE
30 #define __RLIM64_T_TYPE __UQUAD_TYPE
31 #define __BLKCNT_T_TYPE __SLONGWORD_TYPE
32 #define __BLKCNT64_T_TYPE __SQUAD_TYPE
33 #define __FSBLKCNT_T_TYPE __ULONGWORD_TYPE
34 #define __FSBLKCNT64_T_TYPE __UQUAD_TYPE
35 #define __FSFILCNT_T_TYPE __ULONGWORD_TYPE
36 #define __FSFILCNT64_T_TYPE __UQUAD_TYPE
37 #define __FSWORD_T_TYPE __SWORD_TYPE
38 #define __ID_T_TYPE __U32_TYPE
39 #define __CLOCK_T_TYPE __SLONGWORD_TYPE
40 #define __TIME_T_TYPE __SLONGWORD_TYPE
41 #define __USECONDS_T_TYPE __U32_TYPE
42 #define __SUSECONDS_T_TYPE __SLONGWORD_TYPE
43 #define __DADDR_T_TYPE __S32_TYPE
44 #define __SWBLK_T_TYPE __SLONGWORD_TYPE
45 #define __KEY_T_TYPE __S32_TYPE
46 #define __CLOCKID_T_TYPE __S32_TYPE
47 #define __TIMER_T_TYPE void *
48 #define __BLKSIZE_T_TYPE __SLONGWORD_TYPE
49 #define __FSID_T_TYPE struct { int __val[2]; }
50 #define __SSIZE_T_TYPE __SWORD_TYPE
51 #define __SYSCALL_SLONG_TYPE __SLONGWORD_TYPE
52 #define __SYSCALL_ULONG_TYPE __ULONGWORD_TYPE
53 
54 #ifdef __LP64__
55 /* Tell the libc code that off_t and off64_t are actually the same type
56 for all ABI purposes, even if possibly expressed as different base types
57 for C type-checking purposes. */
58 # define __OFF_T_MATCHES_OFF64_T 1
59 
60 /* Same for ino_t and ino64_t. */
61 # define __INO_T_MATCHES_INO64_T 1
62 #endif
63 
64 /* Number of descriptors that can fit in an `fd_set'. */
65 #define __FD_SETSIZE 16384
66 
67 
68 #endif /* bits/typesizes.h */
69 
70 /* CG: Copied here linux/posix_types.h */
71 #ifndef _LINUX_POSIX_TYPES_H
72 #define _LINUX_POSIX_TYPES_H
73 
74 #include <linux/stddef.h>
75 
76 #undef __NFDBITS
77 #define __NFDBITS (8 * sizeof(unsigned long))
78 
79 #undef __FD_SETSIZE
80 #define __FD_SETSIZE 16384
81 
82 #undef __FDSET_LONGS
83 #define __FDSET_LONGS (__FD_SETSIZE/__NFDBITS)
84 
85 #undef __FDELT
86 #define __FDELT(d) ((d) / __NFDBITS)
87 
88 #undef __FDMASK
89 #define __FDMASK(d) (1UL << ((d) % __NFDBITS))
90 
91 typedef struct {
92  unsigned long fds_bits [__FDSET_LONGS];
93 } __kernel_fd_set;
94 
95 /* Type of a signal handler. */
96 typedef void (*__kernel_sighandler_t)(int);
97 
98 /* Type of a SYSV IPC key. */
99 typedef int __kernel_key_t;
100 typedef int __kernel_mqd_t;
101 
102 #include <asm/posix_types.h>
103 
104 #endif /* _LINUX_POSIX_TYPES_H */
105 
106 #endif /* NOMORECONNS */
107 #endif /* linux */
108 
109 #endif