>From c89961391cd3ad616cdd457c89c25f22c3213713 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 15 Oct 2023 12:30:04 +0200 Subject: [PATCH 2/8] MSVC port, part 2: Accommodate the added gnulib modules. * configure.ac: Don't test for sys/time.h, since gnulib now provides it. * info/man.c: Assume that sys/time.h. Also include , for the select() function. * info/session.c: Likewise. * info/Makefile.am (LDADD): Add $(SELECT_LIB), needed for the 'select' module. --- configure.ac | 2 +- info/Makefile.am | 3 +++ info/man.c | 3 +-- info/session.c | 11 ++--------- 4 files changed, 7 insertions(+), 12 deletions(-) diff --git a/configure.ac b/configure.ac index 7fa457deb2..bd34937e06 100644 --- a/configure.ac +++ b/configure.ac @@ -220,7 +220,7 @@ AC_SUBST([DIFF_A_OPTION]) # Checks for header files. AC_CHECK_HEADERS(io.h pwd.h \ termcap.h termios.h unistd.h \ - sys/ioctl.h sys/time.h sys/wait.h) + sys/ioctl.h sys/wait.h) AC_SYS_POSIX_TERMIOS diff --git a/info/Makefile.am b/info/Makefile.am index f57b341ea2..0cc770413f 100644 --- a/info/Makefile.am +++ b/info/Makefile.am @@ -29,6 +29,9 @@ LDADD = $(top_builddir)/gnulib/lib/libgnu.a $(TERMLIBS) # for various gnulib modules LDADD += $(LIBINTL) $(LIBICONV) $(LIBC32CONV) $(LIBUNISTRING) $(LIBTHREAD) +# for select gnulib module +LDADD += $(SELECT_LIB) + # for hard-locale gnulib module which is brought in indirectly LDADD += $(HARD_LOCALE_LIB) $(SETLOCALE_NULL_LIB) diff --git a/info/man.c b/info/man.c index 49a0d0636f..cbb8451cb7 100644 --- a/info/man.c +++ b/info/man.c @@ -19,9 +19,8 @@ #include "info.h" #include "signals.h" -#if defined (HAVE_SYS_TIME_H) #include -#endif +#include #if defined (HAVE_SYS_WAIT_H) #include #endif diff --git a/info/session.c b/info/session.c index 7c1a9d30a9..881749ae4c 100644 --- a/info/session.c +++ b/info/session.c @@ -38,10 +38,8 @@ extern ssize_t w32_read (int, void *, size_t); #endif -#if defined (HAVE_SYS_TIME_H) -# include -# define HAVE_STRUCT_TIMEVAL -#endif /* HAVE_SYS_TIME_H */ +#include +#include /* **************************************************************** */ /* */ @@ -741,11 +739,6 @@ get_input_key_internal (void) } } -#if defined (HAVE_SYS_TIME_H) -# include -# define HAVE_STRUCT_TIMEVAL -#endif /* HAVE_SYS_TIME_H */ - #if !defined (FD_SET) && defined (__MINGW32__) # define WIN32_LEAN_AND_MEAN # include -- 2.34.1