/* ex: set tabstop=4 shiftwidth=4 autoindent: +-------------------------------------------------------------------------+ | Copyright (C) 2004-2026 The Cacti Group | | | | This program is free software; you can redistribute it and/or | | modify it under the terms of the GNU Lesser General Public | | License as published by the Free Software Foundation; either | | version 2.1 of the License, or (at your option) any later version. | | | | This program is distributed in the hope that it will be useful, | | but WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | | GNU Lesser General Public License for more details. | | | | You should have received a copy of the GNU Lesser General Public | | License along with this library; if not, write to the Free Software | | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA | | 02110-1301, USA | | | +-------------------------------------------------------------------------+ | spine: a backend data gatherer for cacti | +-------------------------------------------------------------------------+ | This poller would not have been possible without: | | - Larry Adams (current development and enhancements) | | - Rivo Nurges (rrd support, mysql poller cache, misc functions) | | - RTG (core poller code, pthreads, snmp, autoconf examples) | | - Brady Alleman/Doug Warner (threading ideas, implementation details) | +-------------------------------------------------------------------------+ | - Cacti - http://www.cacti.net/ | +-------------------------------------------------------------------------+ */ #ifndef SPINE_COMMON_H #define SPINE_COMMON_H 1 #ifdef __CYGWIN__ /* We use a Unix API, so pretend it's not Windows */ #undef WIN #undef WIN32 #undef _WIN #undef _WIN32 #undef _WIN64 #undef __WIN__ #undef __WIN32__ #define HAVE_ERRNO_AS_DEFINE /* Cygwin supports only 64 open file descriptors, let's increase it a bit. */ #define FD_SETSIZE 512 #endif /* __CYGWIN__ */ #define _THREAD_SAFE #define _PTHREADS #define _P __P #ifndef _REENTRANT #define _REENTRANT #endif #ifndef _LIBC_REENTRANT #define _LIBC_REENTRANT #endif #define PTHREAD_MUTEXATTR_DEFAULT ((pthread_mutexattr_t *) 0) #include "config/config.h" #if STDC_HEADERS # include # include #elif HAVE_STRINGS_H # include #endif /*STDC_HEADERS*/ #if HAVE_UNISTD_H # include # include #endif #include #include #include #include #include #include #include #include #include #include #include #include "spine_sem.h" #include #include #include #include #include #include #if HAVE_STDINT_H # include #endif #if HAVE_NETINET_IN_H # include # include # include # include #ifndef __CYGWIN__ # include #endif # include #endif #if HAVE_NET_IF_H # include #endif #if HAVE_IFADDRS_H # include #endif #if HAVE_SYS_TIME_H # include #endif #include #ifndef HAVE_LIBPTHREAD # define HAVE_LIBPTHREAD 0 #else # include #endif #ifdef SOLAR_PRIV # include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_LCAP # include # include # include #endif #include "uthash.h" #endif /* SPINE_COMMON_H */