From e445a386f8ad1166b05fcdfdb5b9cde4622a8632 Mon Sep 17 00:00:00 2001 From: Andreas Baumann Date: Fri, 27 Dec 2024 15:32:24 +0100 Subject: check_http: fix documentation for --state-regex --- plugins/check_http.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/check_http.c b/plugins/check_http.c index 97c0e39a..baff682a 100644 --- a/plugins/check_http.c +++ b/plugins/check_http.c @@ -1805,7 +1805,7 @@ print_help (void) printf (" %s\n", "--invert-regex"); printf (" %s\n", _("Return STATE if found, OK if not (STATE is CRITICAL, per default)")); printf (" %s\n", _("can be changed with --state--regex)")); - printf (" %s\n", "--regex-state=STATE"); + printf (" %s\n", "--state-regex=STATE"); printf (" %s\n", _("Return STATE if regex is found, OK if not\n")); printf (" %s\n", "-a, --authorization=AUTH_PAIR"); -- cgit v1.2.3-74-g34f1 From b709a4d858537060a96f2b6986d15d3abcb9529a Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 31 Dec 2024 11:13:01 +0100 Subject: Don't check for TIME_WITH_SYS_TIME Follow the suggestion made by the autoupdate(1) tool: | All current systems provide time.h; it need not be checked for. Not | all systems provide sys/time.h, but those that do, all allow you to | include it and time.h simultaneously. Therefore, include sys/time.h if available, and include time.h unconditionally. --- configure.ac | 15 +-------------- plugins/common.h | 10 ++-------- 2 files changed, 3 insertions(+), 22 deletions(-) (limited to 'plugins') diff --git a/configure.ac b/configure.ac index e3b66fef..79b44c7b 100644 --- a/configure.ac +++ b/configure.ac @@ -607,23 +607,10 @@ dnl dnl Checks for header files. dnl -m4_warn([obsolete], -[Update your code to rely only on HAVE_SYS_TIME_H, -then remove this warning and the obsolete code below it. -All current systems provide time.h; it need not be checked for. -Not all systems provide sys/time.h, but those that do, all allow -you to include it and time.h simultaneously.])dnl -AC_CHECK_HEADERS_ONCE([sys/time.h]) -# Obsolete code to be removed. -if test $ac_cv_header_sys_time_h = yes; then - AC_DEFINE([TIME_WITH_SYS_TIME],[1],[Define to 1 if you can safely include both - and . This macro is obsolete.]) -fi -# End of obsolete code. - AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(signal.h syslog.h uio.h errno.h sys/time.h sys/socket.h sys/un.h sys/poll.h) AC_CHECK_HEADERS(features.h stdarg.h sys/unistd.h ctype.h) +AC_CHECK_HEADERS_ONCE([sys/time.h]) dnl Checks for typedefs, structures, and compiler characteristics. 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 @@ # define GET_NUMBER_OF_CPUS() -1 #endif -#ifdef TIME_WITH_SYS_TIME +#ifdef HAVE_SYS_TIME_H # include -# include -#else -# ifdef HAVE_SYS_TIME_H -# include -# else -# include -# endif #endif +#include #ifdef HAVE_SYS_TYPES_H #include -- cgit v1.2.3-74-g34f1