/* * apc.h * * Main header file for apcupsd package */ /* * Copyright (C) 1999-2005 Kern Sibbald * Copyright (C) 1999 Brian Schau * Copyright (C) 1996-99 Andre M. Hedrick * * This program is free software; you can redistribute it and/or * modify it under the terms of version 2 of the GNU General * Public License as published by the Free Software Foundation. * * 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 * General Public License for more details. * * You should have received a copy of the GNU General Public * License along with this program; if not, write to the Free * Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, * MA 02111-1307, USA. */ #ifndef APC_H #define APC_H 1 #ifdef HAVE_WIN32 # include "winconfig.h" #else # include "config.h" #endif /* * Note, on the Alpha, we must include stdarg to get * the GNU version before stdio or we get multiple * definitions. This order could probably be used * on all systems, but is untested so I #ifdef it. * KES 9/2000 */ #ifdef HAVE_OSF1_OS # include # include # include #else # include # include # include #endif #ifdef HAVE_UNISTD_H # include #endif #ifdef HAVE_GETOPTLONG # include #else # include "getopt.h" #endif #define _THREAD_SAFE 1 #define _REENTRANT 1 #include #ifdef HAVE_SUN_OS # include # define set_thread_concurrency() thr_setconcurrency(4) #else # define set_thread_concurrency() #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include # ifdef HAVE_SYS_IPC_H # include # endif # ifdef HAVE_SYS_SEM_H # include # endif # ifdef HAVE_SYS_SHM_H # include # endif #ifdef HAVE_SYS_SOCKET_H # include #endif #include #ifdef HAVE_UNISTD_H # include #endif #ifdef TIME_WITH_SYS_TIME # include # include #else # ifdef HAVE_SYS_TIME_H # include # else # include # endif #endif #ifdef HAVE_SYS_WAIT_H # include #endif #ifdef HAVE_HPUX_OS # include #endif #include #include /* Include apcupsd stuff */ #include "apc_config.h" #include "apc_i18n.h" #include "version.h" #include "defines.h" #include "struct.h" #include "drivers.h" #include "nis.h" #include "extern.h" /* System includes conditionally included */ /* Pull in our local copy because the library does not have correct protos */ #ifdef HAVE_LIBWRAP # include "tcpd.h" #endif #endif