From: octo Date: Fri, 10 Mar 2006 17:59:42 +0000 (+0000) Subject: Include `config.h' and only include existing files.. X-Git-Tag: collectd-3.8.6^2~123 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;h=5d6c9d79f5951637e74678bbca56441fd0efd938;p=collectd.git Include `config.h' and only include existing files.. --- diff --git a/src/liboping/liboping.c b/src/liboping/liboping.c index 6f7d079f..b57f8e22 100644 --- a/src/liboping/liboping.c +++ b/src/liboping/liboping.c @@ -17,34 +17,67 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include -#include -#include +#if HAVE_CONFIG_H +# include +#endif -#include +#if STDC_HEADERS +# include +# include +# include +# include +# include +#else +# error "You don't have the standard C99 header files installed" +#endif /* STDC_HEADERS */ -#include -#include -#include +#if HAVE_UNISTD_H +# include +#endif -#include -#include +#if HAVE_FCNTL_H +# include +#endif +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif -#include -#include -#include -#include -#ifdef HAVE_NETINET_IP_VAR_H -# include +#if TIME_WITH_SYS_TIME +# include +# include #endif -#include -#include +#if HAVE_SYS_SOCKET_H +# include +#endif +#if HAVE_NETDB_H +# include +#endif -#include -#include +#if HAVE_NETINET_IN_SYSTM_H +# include +#endif +#if HAVE_NETINET_IN_H +# include +#endif +#if HAVE_NETINET_IP_H +# include +#endif +#if HAVE_NETINET_IP_ICMP_H +# include +#endif +#ifdef HAVE_NETINET_IP_VAR_H +# include +#endif +#if HAVE_NETINET_IP6_H +# include +#endif +#if HAVE_NETINET_ICMP6_H +# include +#endif #include "liboping.h" diff --git a/src/liboping/liboping.h b/src/liboping/liboping.h index 73d878c7..065ae950 100644 --- a/src/liboping/liboping.h +++ b/src/liboping/liboping.h @@ -20,8 +20,19 @@ #ifndef OCTO_PING_H #define OCTO_PING_H 1 -#include -#include +#if HAVE_CONFIG_H +# include +#endif + +#if HAVE_STDLIB_H +# include +#endif +#if HAVE_UNISTD_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif /* * Type definitions