[v2,02/12] Move event-loop configury to common.m4

Message ID 20200314185158.7816-3-tom@tromey.com
State New
Headers show
Series
  • Merge event loop implementations
Related show

Commit Message

Tom Tromey March 14, 2020, 6:51 p.m.
gdb_select.h and the event loop require some configure checks, so this
moves the needed checks to common.m4 and updates the configure
scripts.

gdb/ChangeLog
2020-03-14  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac: Remove checks that are now in GDB_AC_COMMON.

gdbserver/ChangeLog
2020-03-14  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* config.in: Rebuild.

gdbsupport/ChangeLog
2020-03-14  Tom Tromey  <tom@tromey.com>

	* config.in, configure: Rebuild.
	* common.m4 (GDB_AC_COMMON): Check for poll.h, sys/poll.h,
	sys/select.h, and poll.
---
 gdb/ChangeLog        |  5 +++++
 gdb/configure        | 10 +++++-----
 gdb/configure.ac     |  6 +++---
 gdbserver/ChangeLog  |  5 +++++
 gdbserver/config.in  | 12 ++++++++++++
 gdbserver/configure  |  4 ++--
 gdbsupport/ChangeLog |  6 ++++++
 gdbsupport/common.m4 |  5 +++--
 gdbsupport/config.in | 12 ++++++++++++
 gdbsupport/configure |  4 ++--
 10 files changed, 55 insertions(+), 14 deletions(-)

-- 
2.17.2

Patch

diff --git a/gdb/configure b/gdb/configure
index 614f3402c3d..a70597e3e17 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -11615,11 +11615,11 @@  $as_echo "#define STDC_HEADERS 1" >>confdefs.h
 fi
 
 # elf_hp.h is for HP/UX 64-bit shared library support.
-for ac_header in nlist.h machine/reg.h poll.h sys/poll.h \
+for ac_header in nlist.h machine/reg.h \
                   thread_db.h \
 		  sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
 		  sys/resource.h sys/ptrace.h ptrace.h \
-		  sys/reg.h sys/debugreg.h sys/select.h \
+		  sys/reg.h sys/debugreg.h \
 		  termios.h elf_hp.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
@@ -12265,7 +12265,7 @@  $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
 # ------------------------------ #
 
 for ac_func in getuid getgid \
-		pipe poll pread pread64 pwrite resize_term \
+		pipe pread pread64 pwrite resize_term \
 		getpgid setsid \
 		sigaction sigsetmask socketpair \
 		ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
@@ -12778,7 +12778,7 @@  $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
   fi
 
 
-  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h 		   termios.h 		   dlfcn.h 		   linux/elf.h sys/procfs.h proc_service.h
+  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h 		   termios.h 		   dlfcn.h 		   linux/elf.h sys/procfs.h proc_service.h 		   poll.h sys/poll.h sys/select.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -13183,7 +13183,7 @@  $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
 
 fi
 
-  for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
+  for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
 		  ptrace64 sbrk setns sigaltstack sigprocmask \
 		  setpgid setpgrp getrusage getauxval
 do :
diff --git a/gdb/configure.ac b/gdb/configure.ac
index b9dbe13232a..f405a0351d7 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1229,11 +1229,11 @@  AC_SUBST(SRCHIGH_CFLAGS)
 
 AC_HEADER_STDC
 # elf_hp.h is for HP/UX 64-bit shared library support.
-AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h \
+AC_CHECK_HEADERS([nlist.h machine/reg.h \
                   thread_db.h \
 		  sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
 		  sys/resource.h sys/ptrace.h ptrace.h \
-		  sys/reg.h sys/debugreg.h sys/select.h \
+		  sys/reg.h sys/debugreg.h \
 		  termios.h elf_hp.h])
 AC_CHECK_HEADERS(sys/user.h, [], [],
 [#if HAVE_SYS_PARAM_H
@@ -1279,7 +1279,7 @@  AC_C_BIGENDIAN
 # ------------------------------ #
 
 AC_CHECK_FUNCS([getuid getgid \
-		pipe poll pread pread64 pwrite resize_term \
+		pipe pread pread64 pwrite resize_term \
 		getpgid setsid \
 		sigaction sigsetmask socketpair \
 		ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
diff --git a/gdbserver/config.in b/gdbserver/config.in
index e62795072f2..8376b81d63f 100644
--- a/gdbserver/config.in
+++ b/gdbserver/config.in
@@ -195,6 +195,12 @@ 
 /* Define to 1 if you have the `pipe2' function. */
 #undef HAVE_PIPE2
 
+/* Define to 1 if you have the `poll' function. */
+#undef HAVE_POLL
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
 /* Define to 1 if you have the `pread' function. */
 #undef HAVE_PREAD
 
@@ -319,6 +325,9 @@ 
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#undef HAVE_SYS_POLL_H
+
 /* Define to 1 if you have the <sys/procfs.h> header file. */
 #undef HAVE_SYS_PROCFS_H
 
@@ -331,6 +340,9 @@ 
 /* Define to 1 if you have the <sys/resource.h> header file. */
 #undef HAVE_SYS_RESOURCE_H
 
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
 /* Define to 1 if you have the <sys/socket.h> header file. */
 #undef HAVE_SYS_SOCKET_H
 
diff --git a/gdbserver/configure b/gdbserver/configure
index 55cf2416b56..4ed95baf73f 100755
--- a/gdbserver/configure
+++ b/gdbserver/configure
@@ -6706,7 +6706,7 @@  $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
   fi
 
 
-  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h 		   termios.h 		   dlfcn.h 		   linux/elf.h sys/procfs.h proc_service.h
+  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h 		   termios.h 		   dlfcn.h 		   linux/elf.h sys/procfs.h proc_service.h 		   poll.h sys/poll.h sys/select.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -7111,7 +7111,7 @@  $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
 
 fi
 
-  for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
+  for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
 		  ptrace64 sbrk setns sigaltstack sigprocmask \
 		  setpgid setpgrp getrusage getauxval
 do :
diff --git a/gdbsupport/common.m4 b/gdbsupport/common.m4
index e67058632ca..b461f5f017d 100644
--- a/gdbsupport/common.m4
+++ b/gdbsupport/common.m4
@@ -46,11 +46,12 @@  AC_DEFUN([GDB_AC_COMMON], [
 		   thread_db.h wait.h dnl
 		   termios.h dnl
 		   dlfcn.h dnl
-		   linux/elf.h sys/procfs.h proc_service.h)
+		   linux/elf.h sys/procfs.h proc_service.h dnl
+		   poll.h sys/poll.h sys/select.h)
 
   AC_FUNC_MMAP
   AC_FUNC_VFORK
-  AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 socketpair sigaction \
+  AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
 		  ptrace64 sbrk setns sigaltstack sigprocmask \
 		  setpgid setpgrp getrusage getauxval])
 
diff --git a/gdbsupport/config.in b/gdbsupport/config.in
index 6a6b0bc74f0..3ba9d521cb2 100644
--- a/gdbsupport/config.in
+++ b/gdbsupport/config.in
@@ -155,6 +155,12 @@ 
 /* Define to 1 if you have the `pipe2' function. */
 #undef HAVE_PIPE2
 
+/* Define to 1 if you have the `poll' function. */
+#undef HAVE_POLL
+
+/* Define to 1 if you have the <poll.h> header file. */
+#undef HAVE_POLL_H
+
 /* Define if <sys/procfs.h> has prfpregset_t. */
 #undef HAVE_PRFPREGSET_T
 
@@ -245,6 +251,9 @@ 
 /* Define to 1 if you have the <sys/param.h> header file. */
 #undef HAVE_SYS_PARAM_H
 
+/* Define to 1 if you have the <sys/poll.h> header file. */
+#undef HAVE_SYS_POLL_H
+
 /* Define to 1 if you have the <sys/procfs.h> header file. */
 #undef HAVE_SYS_PROCFS_H
 
@@ -254,6 +263,9 @@ 
 /* Define to 1 if you have the <sys/resource.h> header file. */
 #undef HAVE_SYS_RESOURCE_H
 
+/* Define to 1 if you have the <sys/select.h> header file. */
+#undef HAVE_SYS_SELECT_H
+
 /* Define to 1 if you have the <sys/socket.h> header file. */
 #undef HAVE_SYS_SOCKET_H
 
diff --git a/gdbsupport/configure b/gdbsupport/configure
index 2ffe539eb09..bace202f651 100755
--- a/gdbsupport/configure
+++ b/gdbsupport/configure
@@ -8404,7 +8404,7 @@  $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
   fi
 
 
-  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h 		   termios.h 		   dlfcn.h 		   linux/elf.h sys/procfs.h proc_service.h
+  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   sys/resource.h sys/socket.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h 		   termios.h 		   dlfcn.h 		   linux/elf.h sys/procfs.h proc_service.h 		   poll.h sys/poll.h sys/select.h
 do :
   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -8809,7 +8809,7 @@  $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
 
 fi
 
-  for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
+  for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction \
 		  ptrace64 sbrk setns sigaltstack sigprocmask \
 		  setpgid setpgrp getrusage getauxval
 do :