From 34ea20af73a35cd918ce9dc25796bebf9493b49c Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Thu, 14 Apr 2016 17:03:01 +0200 Subject: [PATCH] Remove checks for headers and functions that are in C99. --- configure.ac | 6 +++--- src/have.h | 9 ++------- src/system.h | 6 ------ 3 files changed, 5 insertions(+), 16 deletions(-) diff --git a/configure.ac b/configure.ac index cc62e2e0..d43bfa02 100644 --- a/configure.ac +++ b/configure.ac @@ -171,8 +171,8 @@ dnl Checks for header files. dnl We do this in multiple stages, because unlike Linux all the other operating systems really suck and don't include their own dependencies. AC_HEADER_STDC -AC_CHECK_HEADERS([stdbool.h syslog.h sys/file.h sys/ioctl.h sys/mman.h sys/param.h sys/resource.h sys/socket.h sys/time.h sys/un.h sys/wait.h netdb.h arpa/inet.h dirent.h getopt.h]) -AC_CHECK_HEADERS([net/if.h net/if_types.h linux/if_tun.h net/if_tun.h net/if_utun.h net/tun/if_tun.h net/if_tap.h net/tap/if_tap.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h time.h netpacket/packet.h], +AC_CHECK_HEADERS([syslog.h sys/file.h sys/ioctl.h sys/mman.h sys/param.h sys/resource.h sys/socket.h sys/time.h sys/un.h sys/wait.h netdb.h arpa/inet.h dirent.h getopt.h]) +AC_CHECK_HEADERS([net/if.h net/if_types.h linux/if_tun.h net/if_tun.h net/if_utun.h net/tun/if_tun.h net/if_tap.h net/tap/if_tap.h net/ethernet.h net/if_arp.h netinet/in_systm.h netinet/in.h netinet/in6.h netpacket/packet.h], [], [], [#include "$srcdir/src/have.h"] ) AC_CHECK_HEADERS([netinet/if_ether.h netinet/ip.h netinet/ip6.h resolv.h], @@ -199,7 +199,7 @@ AC_CHECK_TYPES([socklen_t, struct ether_header, struct arphdr, struct ether_arp, dnl Checks for library functions. AC_TYPE_SIGNAL -AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random recvmmsg select strdup strerror strsignal strtol system time usleep unsetenv vsyslog devname fdevname], +AC_CHECK_FUNCS([asprintf daemon fchmod flock ftime fork get_current_dir_name gettimeofday mlockall putenv random recvmmsg select strdup strsignal usleep unsetenv vsyslog devname fdevname], [], [], [#include "$srcdir/src/have.h"] ) diff --git a/src/have.h b/src/have.h index a054c563..97d8d433 100644 --- a/src/have.h +++ b/src/have.h @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +42,7 @@ #include #include #include +#include #ifdef HAVE_MINGW #include @@ -49,10 +51,6 @@ #include #endif -#ifdef HAVE_STDBOOL_H -#include -#endif - #ifdef HAVE_TERMIOS_H #include #endif @@ -71,9 +69,6 @@ #include #endif -#ifdef HAVE_TIME_H -#include -#endif #ifdef HAVE_SYS_TYPES_H #include diff --git a/src/system.h b/src/system.h index 7180b870..4b428b17 100644 --- a/src/system.h +++ b/src/system.h @@ -25,12 +25,6 @@ #include "have.h" -#ifndef HAVE_STDBOOL_H -typedef int bool; -#define true 1 -#define false 0 -#endif - #ifndef HAVE_STRSIGNAL # define strsignal(p) "" #endif -- 2.20.1