diff options
Diffstat (limited to 'plugins/common.h')
| -rw-r--r-- | plugins/common.h | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/plugins/common.h b/plugins/common.h index 0f08e2f6..833479ce 100644 --- a/plugins/common.h +++ b/plugins/common.h | |||
| @@ -184,14 +184,6 @@ enum { | |||
| 184 | ERROR = -1 | 184 | ERROR = -1 |
| 185 | }; | 185 | }; |
| 186 | 186 | ||
| 187 | /* AIX seems to have this defined somewhere else */ | ||
| 188 | #ifndef FALSE | ||
| 189 | enum { | ||
| 190 | FALSE, | ||
| 191 | TRUE | ||
| 192 | }; | ||
| 193 | #endif | ||
| 194 | |||
| 195 | enum { | 187 | enum { |
| 196 | STATE_OK, | 188 | STATE_OK, |
| 197 | STATE_WARNING, | 189 | STATE_WARNING, |
| @@ -225,18 +217,4 @@ enum { | |||
| 225 | # define __attribute__(x) /* do nothing */ | 217 | # define __attribute__(x) /* do nothing */ |
| 226 | #endif | 218 | #endif |
| 227 | 219 | ||
| 228 | /* Try sysconf(_SC_OPEN_MAX) first, as it can be higher than OPEN_MAX. | ||
| 229 | * If that fails and the macro isn't defined, we fall back to an educated | ||
| 230 | * guess. There's no guarantee that our guess is adequate and the program | ||
| 231 | * will die with SIGSEGV if it isn't and the upper boundary is breached. */ | ||
| 232 | #define DEFAULT_MAXFD 256 /* fallback value if no max open files value is set */ | ||
| 233 | #define MAXFD_LIMIT 8192 /* upper limit of open files */ | ||
| 234 | #ifdef _SC_OPEN_MAX | ||
| 235 | static long maxfd = 0; | ||
| 236 | #elif defined(OPEN_MAX) | ||
| 237 | # define maxfd OPEN_MAX | ||
| 238 | #else /* sysconf macro unavailable, so guess (may be wildly inaccurate) */ | ||
| 239 | # define maxfd DEFAULT_MAXFD | ||
| 240 | #endif | ||
| 241 | |||
| 242 | #endif /* _COMMON_H_ */ | 220 | #endif /* _COMMON_H_ */ |
