diff --git a/configure.ac b/configure.ac index 3161620..e148077 100644 --- a/configure.ac +++ b/configure.ac @@ -161,22 +161,9 @@ dnl AC_HEADER_STDC AC_HEADER_TIME AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([sys/ioctl.h sys/mman.h sys/resource.h \ - sys/select.h sys/socket.h sys/time.h sys/uio.h \ - sys/un.h arpa/inet.h netinet/in.h \ - assert.h errno.h fcntl.h grp.h io.h libintl.h \ - netdb.h pwd.h regex.h signal.h stdarg.h \ - sysexits.h syslog.h time.h wchar.h wctype.h \ +AC_CHECK_HEADERS([sys/ioctl.h alloca.h memory.h malloc.h sysexits.h \ values.h]) -dnl OpenBSD machines don't like having malloc included (even if it's present) -dnl as they expect you to use stdlib.h -case "$target" in - *-openbsd*) ;; - *) AC_CHECK_HEADER(malloc.h);; -esac - - dnl Checks for types AC_TYPE_SIZE_T AC_TYPE_PID_T diff --git a/src/common.h b/src/common.h index 7f5ce9b..47a1ed1 100644 --- a/src/common.h +++ b/src/common.h @@ -41,115 +41,58 @@ #include #include #include - -#ifdef HAVE_SYS_TYPES_H +/* standard POSIX headers - they need to be there as well. */ +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include # include -#endif +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +/* rest - some oddball headers */ #ifdef HAVE_VALUES_H # include #endif -#ifdef HAVE_INTTYPES_H -# include -#endif #ifdef HAVE_SYS_IOCTL_H # include #endif -#ifdef HAVE_SYS_SELECT_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef TIME_WITH_SYS_TIME -# include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif -#endif - -#ifdef HAVE_SYS_RESOURCE_H -# include -#endif -#ifdef HAVE_SYS_UIO_H -# include -#endif -#ifdef HAVE_SYS_UN_H -# include -#endif -#ifdef HAVE_SYS_WAIT_H -# include -#endif - -#ifdef HAVE_NETINET_IN_H -# include -#endif -#ifdef HAVE_ARPA_INET_H -# include -#endif #ifdef HAVE_ALLOCA_H # include #endif -#ifdef HAVE_ASSERT_H -# include -#endif -#ifdef HAVE_ERRNO_H -# include -#endif -#ifdef HAVE_FCNTL_H -# include -#endif -#ifdef HAVE_GRP_H -# include -#endif + #ifdef HAVE_MEMORY_H # include #endif -#ifdef HAVE_NETDB_H -# include -#endif -#ifdef HAVE_PWD_H -# include -#endif -#ifdef HAVE_REGEX_H -# include -#endif -#ifdef HAVE_SIGNAL_H -# include -#endif -#ifdef HAVE_STDARG_H -# include -#endif #ifdef HAVE_MALLOC_H # include #endif -#ifdef HAVE_STRINGS_H -# include -#endif #ifdef HAVE_SYSEXITS_H -# include -#endif -#ifdef HAVE_SYSLOG_H -# include -#endif -#ifdef HAVE_WCHAR_H -# include -#endif -#ifdef HAVE_WCTYPE_H -# include -#endif -#ifdef HAVE_SYS_MMAN_H -# include +# include #endif /* diff --git a/src/log.h b/src/log.h index b523ab0..68c89c3 100644 --- a/src/log.h +++ b/src/log.h @@ -77,16 +77,7 @@ * don't advocate this, but it could be useful at times.) */ -#ifdef HAVE_SYSLOG_H -# include -#else -# define LOG_CRIT 2 -# define LOG_ERR 3 -# define LOG_WARNING 4 -# define LOG_NOTICE 5 -# define LOG_INFO 6 -# define LOG_DEBUG 7 -#endif +#include #define LOG_CONN 8 /* extra to log connections without the INFO stuff */