00001 #ifndef SQUID_FDSETSIZE_H
00002 #define SQUID_FDSETSIZE_H
00003
00004
00005
00006
00007
00008
00009
00010
00011 #if 0
00012
00013
00014
00015
00016 #ifdef _SYS_TYPES_H
00017 #error squid_fdsetsize.h for FDSETSIZE must be included before sys/types.h
00018 #error Make sure that squid.h or config.h is the first file included by your .cc
00019 #endif
00020 #endif
00021
00022
00023
00024
00025
00026
00027 #define CHANGE_FD_SETSIZE 1
00028
00029
00030
00031
00032
00033
00034
00035
00036 #if _SQUID_LINUX_ || _SQUID_KFREEBSD_
00037 #undef CHANGE_FD_SETSIZE
00038 #define CHANGE_FD_SETSIZE 0
00039 #include <features.h>
00040 #if (__GLIBC__ > 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
00041 #if SQUID_MAXFD > DEFAULT_FD_SETSIZE
00042 #include <bits/types.h>
00043 #if HAVE_LINUX_POSIX_TYPES_H
00044 #include <linux/posix_types.h>
00045 #endif
00046 #undef __FD_SETSIZE
00047 #define __FD_SETSIZE SQUID_MAXFD
00048 #endif
00049 #endif
00050 #endif
00051
00052
00053
00054
00055
00056
00057
00058 #if _SQUID_FREEBSD_
00059 #include <osreldate.h>
00060 #if __FreeBSD_version < 220000
00061 #undef CHANGE_FD_SETSIZE
00062 #define CHANGE_FD_SETSIZE 0
00063 #endif
00064 #endif
00065
00066
00067
00068
00069
00070 #if _SQUID_APPLE_
00071 #undef CHANGE_FD_SETSIZE
00072 #define CHANGE_FD_SETSIZE 0
00073 #endif
00074
00075
00076 #if CHANGE_FD_SETSIZE && SQUID_MAXFD > DEFAULT_FD_SETSIZE
00077 #define FD_SETSIZE SQUID_MAXFD
00078 #endif
00079
00080
00081
00082
00083
00084
00085
00086
00087 #ifdef SQUID_FDSET_NOUSE
00088 # ifndef SQUID_HELPER
00089 # define fd_set ERROR_FD_SET_USED
00090 # endif
00091 #endif
00092
00093 #endif