summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c9a5b03)
raw | patch | inline | side by side (parent: c9a5b03)
author | octo <octo> | |
Fri, 10 Mar 2006 17:59:42 +0000 (17:59 +0000) | ||
committer | octo <octo> | |
Fri, 10 Mar 2006 17:59:42 +0000 (17:59 +0000) |
src/liboping/liboping.c | patch | blob | history | |
src/liboping/liboping.h | patch | blob | history |
index 6f7d079f4378d4bd00ee8491b695dff3444d6fba..b57f8e2201c857fcc14c611991801bdb556d1e0b 100644 (file)
--- a/src/liboping/liboping.c
+++ b/src/liboping/liboping.c
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include <stdlib.h>
-#include <stdio.h>
-#include <unistd.h>
-#include <errno.h>
-#include <string.h>
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
-#include <assert.h>
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stdio.h>
+# include <string.h>
+# include <errno.h>
+# include <assert.h>
+#else
+# error "You don't have the standard C99 header files installed"
+#endif /* STDC_HEADERS */
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
-#include <sys/socket.h>
-#include <netdb.h>
+#if HAVE_FCNTL_H
+# include <fcntl.h>
+#endif
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
-#include <netinet/in_systm.h>
-#include <netinet/in.h>
-#include <netinet/ip.h>
-#include <netinet/ip_icmp.h>
-#ifdef HAVE_NETINET_IP_VAR_H
-# include <netinet/ip_var.h>
+#if TIME_WITH_SYS_TIME
+# include <sys/time.h>
+# include <time.h>
#endif
-#include <netinet/ip6.h>
-#include <netinet/icmp6.h>
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
+#if HAVE_NETDB_H
+# include <netdb.h>
+#endif
-#include <sys/time.h>
-#include <time.h>
+#if HAVE_NETINET_IN_SYSTM_H
+# include <netinet/in_systm.h>
+#endif
+#if HAVE_NETINET_IN_H
+# include <netinet/in.h>
+#endif
+#if HAVE_NETINET_IP_H
+# include <netinet/ip.h>
+#endif
+#if HAVE_NETINET_IP_ICMP_H
+# include <netinet/ip_icmp.h>
+#endif
+#ifdef HAVE_NETINET_IP_VAR_H
+# include <netinet/ip_var.h>
+#endif
+#if HAVE_NETINET_IP6_H
+# include <netinet/ip6.h>
+#endif
+#if HAVE_NETINET_ICMP6_H
+# include <netinet/icmp6.h>
+#endif
#include "liboping.h"
index 73d878c711aa714b9e3c111519e07b8a69fad440..065ae9509854e6b757855bade63b4abdf55a3a6d 100644 (file)
--- a/src/liboping/liboping.h
+++ b/src/liboping/liboping.h
#ifndef OCTO_PING_H
#define OCTO_PING_H 1
-#include <stdlib.h>
-#include <unistd.h>
+#if HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+#if HAVE_STDLIB_H
+# include <stdlib.h>
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+#if HAVE_SYS_SOCKET_H
+# include <sys/socket.h>
+#endif
/*
* Type definitions