From 58facd5fbf0caf1063b7d1ba016fe77b4c4e49c1 Mon Sep 17 00:00:00 2001 From: dmiller Date: Fri, 14 Aug 2026 17:16:15 +0000 Subject: [PATCH] Remove obsolete AC_HEADER_TIME --- nbase/configure | 17 ++++++----------- nbase/configure.ac | 6 ++++-- ncat/config.h.in | 3 --- ncat/configure | 11 ----------- ncat/configure.ac | 1 - nmap_config.h.in | 1 - nmap_error.cc | 12 +++--------- nmap_tty.cc | 12 +++--------- nping/configure.ac | 2 +- nping/nping.h | 10 ++-------- nping/nping_config.h.in | 1 - nping/stats.h | 12 +++--------- output.h | 12 +++--------- service_scan.cc | 12 +++--------- timing.h | 12 +++--------- 15 files changed, 31 insertions(+), 93 deletions(-) diff --git a/nbase/configure b/nbase/configure index 740151720..b76dd8efa 100755 --- a/nbase/configure +++ b/nbase/configure @@ -2408,7 +2408,6 @@ as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" -as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" # Auxiliary files required by this configure script. ac_aux_files="config.guess config.sub" @@ -4063,6 +4062,12 @@ if test "x$ac_cv_header_sys_select_h" = xyes then : printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h +fi +ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" +if test "x$ac_cv_header_sys_time_h" = xyes +then : + printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h + fi ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" if test "x$ac_cv_header_sys_types_h" = xyes @@ -4131,16 +4136,6 @@ then : fi - - -# Obsolete code to be removed. -if test $ac_cv_header_sys_time_h = yes; then - -printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi -# End of obsolete code. - ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" if test "x$ac_cv_header_sys_socket_h" = xyes then : diff --git a/nbase/configure.ac b/nbase/configure.ac index 1f41b6db2..0d8777014 100644 --- a/nbase/configure.ac +++ b/nbase/configure.ac @@ -67,8 +67,10 @@ esac dnl Checks for header files. AC_HEADER_STDC -AC_CHECK_HEADERS( string.h getopt.h strings.h sys/param.h sys/time.h unistd.h errno.h sys/select.h sys/types.h sys/socket.h netinet/in.h arpa/inet.h sys/stat.h netdb.h sys/wait.h fcntl.h sys/resource.h inttypes.h mach-o/dyld.h) -AC_HEADER_TIME +AC_CHECK_HEADERS([string.h getopt.h strings.h sys/param.h sys/time.h unistd.h + errno.h sys/select.h sys/time.h sys/types.h sys/socket.h + netinet/in.h arpa/inet.h sys/stat.h netdb.h sys/wait.h + fcntl.h sys/resource.h inttypes.h mach-o/dyld.h]) dnl A special check required for on Darwin. See dnl http://www.gnu.org/software/autoconf/manual/html_node/Header-Portability.html. AC_CHECK_HEADERS([sys/socket.h]) diff --git a/ncat/config.h.in b/ncat/config.h.in index ea512ca04..6f85afa46 100644 --- a/ncat/config.h.in +++ b/ncat/config.h.in @@ -177,9 +177,6 @@ /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - /* Define to empty if `const' does not conform to ANSI C. */ #undef const diff --git a/ncat/configure b/ncat/configure index 27b289fe9..63b4c3646 100755 --- a/ncat/configure +++ b/ncat/configure @@ -2451,7 +2451,6 @@ as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" -as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" as_fn_append ac_header_c_list " vfork.h vfork_h HAVE_VFORK_H" as_fn_append ac_func_c_list " fork HAVE_FORK" as_fn_append ac_func_c_list " vfork HAVE_VFORK" @@ -4438,16 +4437,6 @@ printf "%s\n" "#define const /**/" >>confdefs.h fi - -# Obsolete code to be removed. -if test $ac_cv_header_sys_time_h = yes; then - -printf "%s\n" "#define TIME_WITH_SYS_TIME 1" >>confdefs.h - -fi -# End of obsolete code. - - # Checks for library functions. ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default diff --git a/ncat/configure.ac b/ncat/configure.ac index 1d5d2ebdb..dec6586d2 100644 --- a/ncat/configure.ac +++ b/ncat/configure.ac @@ -46,7 +46,6 @@ AC_CHECK_HEADERS([linux/vm_sockets.h], , , [#include ]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STAT AC_C_CONST -AC_HEADER_TIME # Checks for library functions. AC_FUNC_FORK diff --git a/nmap_config.h.in b/nmap_config.h.in index 90c7b112d..9bb6a861d 100644 --- a/nmap_config.h.in +++ b/nmap_config.h.in @@ -123,7 +123,6 @@ #undef SPRINTF_RETURNS_STRING -#undef TIME_WITH_SYS_TIME #undef HAVE_SYS_TIME_H #undef recvfrom6_t diff --git a/nmap_error.cc b/nmap_error.cc index 3dda4d08d..f2562ec96 100644 --- a/nmap_error.cc +++ b/nmap_error.cc @@ -66,16 +66,10 @@ #include "xml.h" #include -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif +#if HAVE_SYS_TIME_H +#include #endif +#include extern NmapOps o; diff --git a/nmap_tty.cc b/nmap_tty.cc index 7ada19e36..e8d137c29 100644 --- a/nmap_tty.cc +++ b/nmap_tty.cc @@ -79,16 +79,10 @@ #endif #include -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif +#if HAVE_SYS_TIME_H +#include #endif +#include #include "nmap_tty.h" #include "NmapOps.h" diff --git a/nping/configure.ac b/nping/configure.ac index e53ad31e5..6512f8159 100644 --- a/nping/configure.ac +++ b/nping/configure.ac @@ -116,7 +116,7 @@ AC_PATH_TOOL([STRIP], [strip], [/bin/true]) needs_cpp_precomp=no dnl Checks for header files. -AC_CHECK_HEADERS(pwd.h termios.h sys/sockio.h) +AC_CHECK_HEADERS(pwd.h termios.h sys/sockio.h sys/time.h) dnl If any socket libraries needed AC_SEARCH_LIBS(setsockopt, socket) diff --git a/nping/nping.h b/nping/nping.h index f3979144f..a9f157af3 100644 --- a/nping/nping.h +++ b/nping/nping.h @@ -130,16 +130,10 @@ #include #endif -#if TIME_WITH_SYS_TIME +#if HAVE_SYS_TIME_H #include - #include -#else - #if HAVE_SYS_TIME_H - #include - #else - #include - # endif #endif +#include #ifdef HAVE_PWD_H #include diff --git a/nping/nping_config.h.in b/nping/nping_config.h.in index 8bdb90721..832f973d8 100644 --- a/nping/nping_config.h.in +++ b/nping/nping_config.h.in @@ -120,7 +120,6 @@ #undef SPRINTF_RETURNS_STRING -#undef TIME_WITH_SYS_TIME #undef HAVE_SYS_TIME_H #undef recvfrom6_t diff --git a/nping/stats.h b/nping/stats.h index 95a0cfcf1..6ec340368 100644 --- a/nping/stats.h +++ b/nping/stats.h @@ -85,16 +85,10 @@ #include #endif -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif +#if HAVE_SYS_TIME_H +#include #endif +#include /* Make sure we define a 64bit integer type */ #ifndef u64_t diff --git a/output.h b/output.h index 32d817041..99862a858 100644 --- a/output.h +++ b/output.h @@ -112,16 +112,10 @@ class Target; #include #include -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif +#if HAVE_SYS_TIME_H +#include #endif +#include /* Prints the familiar Nmap tabular output showing the "interesting" ports found on the machine. It also handles the Machine/Grepable diff --git a/service_scan.cc b/service_scan.cc index cedf5498c..a4e284718 100644 --- a/service_scan.cc +++ b/service_scan.cc @@ -90,16 +90,10 @@ #include #endif -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif +#if HAVE_SYS_TIME_H +#include #endif +#include #ifndef IPPROTO_SCTP #include "libnetutil/netutil.h" diff --git a/timing.h b/timing.h index 0d9396a19..9bba17f8e 100644 --- a/timing.h +++ b/timing.h @@ -66,16 +66,10 @@ #ifndef NMAP_TIMING_H #define NMAP_TIMING_H -#if TIME_WITH_SYS_TIME -# include -# include -#else -# if HAVE_SYS_TIME_H -# include -# else -# include -# endif +#if HAVE_SYS_TIME_H +#include #endif +#include #include /* u32 */