diff options
-rw-r--r-- | configure.ac | 15 | ||||
-rw-r--r-- | plugins/common.h | 10 |
2 files changed, 3 insertions, 22 deletions
diff --git a/configure.ac b/configure.ac index e3b66fef..79b44c7b 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -607,23 +607,10 @@ dnl | |||
607 | dnl Checks for header files. | 607 | dnl Checks for header files. |
608 | dnl | 608 | dnl |
609 | 609 | ||
610 | m4_warn([obsolete], | ||
611 | [Update your code to rely only on HAVE_SYS_TIME_H, | ||
612 | then remove this warning and the obsolete code below it. | ||
613 | All current systems provide time.h; it need not be checked for. | ||
614 | Not all systems provide sys/time.h, but those that do, all allow | ||
615 | you to include it and time.h simultaneously.])dnl | ||
616 | AC_CHECK_HEADERS_ONCE([sys/time.h]) | ||
617 | # Obsolete code to be removed. | ||
618 | if test $ac_cv_header_sys_time_h = yes; then | ||
619 | AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both <sys/time.h> | ||
620 | and <time.h>. This macro is obsolete.]) | ||
621 | fi | ||
622 | # End of obsolete code. | ||
623 | |||
624 | AC_HEADER_SYS_WAIT | 610 | AC_HEADER_SYS_WAIT |
625 | AC_CHECK_HEADERS(signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h) | 611 | AC_CHECK_HEADERS(signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h) |
626 | AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h) | 612 | AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h) |
613 | AC_CHECK_HEADERS_ONCE([sys/time.h]) | ||
627 | 614 | ||
628 | dnl Checks for typedefs, structures, and compiler characteristics. | 615 | dnl Checks for typedefs, structures, and compiler characteristics. |
629 | AC_C_CONST | 616 | AC_C_CONST |
diff --git a/plugins/common.h b/plugins/common.h index 833479ce..b7a7d59b 100644 --- a/plugins/common.h +++ b/plugins/common.h | |||
@@ -90,16 +90,10 @@ | |||
90 | # define GET_NUMBER_OF_CPUS() -1 | 90 | # define GET_NUMBER_OF_CPUS() -1 |
91 | #endif | 91 | #endif |
92 | 92 | ||
93 | #ifdef TIME_WITH_SYS_TIME | 93 | #ifdef HAVE_SYS_TIME_H |
94 | # include <sys/time.h> | 94 | # include <sys/time.h> |
95 | # include <time.h> | ||
96 | #else | ||
97 | # ifdef HAVE_SYS_TIME_H | ||
98 | # include <sys/time.h> | ||
99 | # else | ||
100 | # include <time.h> | ||
101 | # endif | ||
102 | #endif | 95 | #endif |
96 | #include <time.h> | ||
103 | 97 | ||
104 | #ifdef HAVE_SYS_TYPES_H | 98 | #ifdef HAVE_SYS_TYPES_H |
105 | #include <sys/types.h> | 99 | #include <sys/types.h> |