Go to the documentation of this file.
9 #ifndef SQUID_COMPAT_COMPAT_SHARED_H
10 #define SQUID_COMPAT_COMPAT_SHARED_H
39 #if HAVE_SYS_RESOURCE_H
40 #include <sys/resource.h>
49 #if defined(__USE_FILE_OFFSET64) && !defined(__GNUC__)
50 #define dirent_t struct dirent64
52 #define dirent_t struct dirent
64 #if defined(USE_SELECT)
66 # define SQUID_MAXFD_LIMIT ((signed int)FD_SETSIZE)
68 #elif defined(USE_POLL)
70 # define SQUID_MAXFD_LIMIT ((signed int)FD_SETSIZE)
72 #elif defined(USE_KQUEUE) || defined(USE_EPOLL) || defined(USE_DEVPOLL)
73 # define SQUID_FDSET_NOUSE 1
76 # error Unknown select loop model!
79 #if !HAVE_STRUCT_RUSAGE
111 #define min(a,b) ((a) < (b) ? (a) : (b))
132 #define max(a,b) ((a) < (b) ? (b) : (a))
139 #define w_space " \t\n\r"
141 #ifndef SQUID_NONBLOCK
146 #if defined(O_NONBLOCK)
153 #define SQUID_NONBLOCK O_NONBLOCK
156 #define SQUID_NONBLOCK O_NDELAY
164 #if defined(__cplusplus)
178 #define SA_RESETHAND 0
180 #if SA_RESETHAND == 0 && defined(SA_ONESHOT)
182 #define SA_RESETHAND SA_ONESHOT
190 #if HAVE_ET_COM_ERR_H
192 #include <et/com_err.h>
220 #define memcpy(d,s,n) bcopy((s),(d),(n))
222 #define memcpy(d,s,n) memmove((d),(s),(n))
226 #if !HAVE_MEMMOVE && HAVE_BCOPY
227 #define memmove(d,s,n) bcopy((s),(d),(n))
232 #define PRINTF_FORMAT_ARG1 __attribute__ ((format (gnu_printf, 1, 2)))
233 #define PRINTF_FORMAT_ARG2 __attribute__ ((format (gnu_printf, 2, 3)))
234 #define PRINTF_FORMAT_ARG3 __attribute__ ((format (gnu_printf, 3, 4)))
236 #define PRINTF_FORMAT_ARG1 __attribute__ ((format (printf, 1, 2)))
237 #define PRINTF_FORMAT_ARG2 __attribute__ ((format (printf, 2, 3)))
238 #define PRINTF_FORMAT_ARG3 __attribute__ ((format (printf, 3, 4)))
241 #define PRINTF_FORMAT_ARG1
242 #define PRINTF_FORMAT_ARG2
243 #define PRINTF_FORMAT_ARG3
void(* failure_notify)(const char *)
const A & max(A const &lhs, A const &rhs)
const A & min(A const &lhs, A const &rhs)