public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [RFC 03/17] Move event-loop configury to common.m4
Date: Sun, 24 Feb 2019 16:52:00 -0000	[thread overview]
Message-ID: <20190224165153.5062-4-tom@tromey.com> (raw)
In-Reply-To: <20190224165153.5062-1-tom@tromey.com>

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
2019-02-24  Tom Tromey  <tom@tromey.com>

	* common/common.m4 (GDB_AC_COMMON): Check for poll.h, sys/poll.h,
	sys/select.h, and poll.
	* configure: Rebuild.
	* configure.ac: Remove checks that are now in GDB_AC_COMMON.

gdb/gdbserver/ChangeLog
2019-02-24  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* config.in: Rebuild.
---
 gdb/ChangeLog           |  7 +++++++
 gdb/common/common.m4    |  5 +++--
 gdb/configure           | 14 +++++++-------
 gdb/configure.ac        |  6 +++---
 gdb/gdbserver/ChangeLog |  5 +++++
 gdb/gdbserver/config.in | 12 ++++++++++++
 gdb/gdbserver/configure |  4 ++--
 7 files changed, 39 insertions(+), 14 deletions(-)

diff --git a/gdb/common/common.m4 b/gdb/common/common.m4
index 5701dd98293..4461a44c036 100644
--- a/gdb/common/common.m4
+++ b/gdb/common/common.m4
@@ -26,12 +26,13 @@ AC_DEFUN([GDB_AC_COMMON], [
   AM_LANGINFO_CODESET
 
   AC_CHECK_HEADERS(linux/perf_event.h locale.h memory.h signal.h dnl
-		   sys/resource.h sys/socket.h dnl
+		   poll.h sys/poll.h dnl
+		   sys/resource.h sys/select.h sys/socket.h dnl
 		   sys/un.h sys/wait.h dnl
 		   thread_db.h wait.h dnl
 		   termios.h)
 
-  AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 socketpair sigaction])
+  AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 poll socketpair sigaction])
 
   AC_CHECK_DECLS([strerror, strstr])
 
diff --git a/gdb/configure b/gdb/configure
index 9c99213a168..5bf25045025 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -11477,8 +11477,8 @@ fi
 
 SRCHIGH_LIBS=
 SRCHIGH_CFLAGS=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for source highlight" >&5
-$as_echo_n "checking for source highlight... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
+$as_echo_n "checking for the source-highlight library... " >&6; }
 if test "${pkg_config_prog_path}" = "missing"; then
    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
 $as_echo "no - pkg-config not found" >&6; }
@@ -12245,11 +12245,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 proc_service.h \
+for ac_header in nlist.h machine/reg.h proc_service.h \
                   thread_db.h linux/elf.h \
 		  sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
 		  sys/resource.h sys/procfs.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 \
 		  dlfcn.h
 do :
@@ -13345,7 +13345,7 @@ $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
 fi
 
 for ac_func in getauxval getrusage getuid getgid \
-		pipe poll pread pread64 pwrite resize_term \
+		pipe pread pread64 pwrite resize_term \
 		sbrk getpgid setpgid setpgrp setsid \
 		sigaction sigprocmask sigsetmask socketpair \
 		ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
@@ -13742,7 +13742,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
+  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   poll.h sys/poll.h 		   sys/resource.h sys/select.h sys/socket.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h 		   termios.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"
@@ -13756,7 +13756,7 @@ fi
 done
 
 
-  for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
+  for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/gdb/configure.ac b/gdb/configure.ac
index f63507ff74e..9b37858affe 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -1318,11 +1318,11 @@ fi
 
 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 proc_service.h \
+AC_CHECK_HEADERS([nlist.h machine/reg.h proc_service.h \
                   thread_db.h linux/elf.h \
 		  sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
 		  sys/resource.h sys/procfs.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 \
 		  dlfcn.h])
 AC_CHECK_HEADERS(sys/user.h, [], [],
@@ -1377,7 +1377,7 @@ AC_C_BIGENDIAN
 AC_FUNC_MMAP
 AC_FUNC_VFORK
 AC_CHECK_FUNCS([getauxval getrusage getuid getgid \
-		pipe poll pread pread64 pwrite resize_term \
+		pipe pread pread64 pwrite resize_term \
 		sbrk getpgid setpgid setpgrp setsid \
 		sigaction sigprocmask sigsetmask socketpair \
 		ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
diff --git a/gdb/gdbserver/config.in b/gdb/gdbserver/config.in
index 05537df81e3..8b35d20a4b4 100644
--- a/gdb/gdbserver/config.in
+++ b/gdb/gdbserver/config.in
@@ -171,6 +171,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
 
@@ -253,6 +259,9 @@
 /* Define to 1 if you have the <sys/ioctl.h> header file. */
 #undef HAVE_SYS_IOCTL_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
 
@@ -265,6 +274,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/gdb/gdbserver/configure b/gdb/gdbserver/configure
index 1ddbd6b27e0..ed43b7f50ca 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -6874,7 +6874,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
+  for ac_header in linux/perf_event.h locale.h memory.h signal.h 		   poll.h sys/poll.h 		   sys/resource.h sys/select.h sys/socket.h 		   sys/un.h sys/wait.h 		   thread_db.h wait.h 		   termios.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"
@@ -6888,7 +6888,7 @@ fi
 done
 
 
-  for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction
+  for ac_func in fdwalk getrlimit pipe pipe2 poll socketpair sigaction
 do :
   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
-- 
2.17.2

  parent reply	other threads:[~2019-02-24 16:52 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-24 16:51 [RFC 00/17] Merge event loop implementations Tom Tromey
2019-02-24 16:52 ` [RFC 12/17] Add the ability to stop the event loop Tom Tromey
2019-02-24 16:52 ` [RFC 07/17] Use warning in event-loop Tom Tromey
2019-09-26 14:02   ` Pedro Alves
2019-02-24 16:52 ` [RFC 14/17] Remove some dead code from event-loop.c Tom Tromey
2019-02-24 16:52 ` [RFC 05/17] Remove gdb_usleep.c Tom Tromey
2019-09-26 14:02   ` Pedro Alves
2019-09-26 14:43     ` Tom Tromey
2019-02-24 16:52 ` [RFC 16/17] Remove gdb_fildes_t Tom Tromey
2019-02-24 16:52 ` [RFC 13/17] Switch gdbserver to common event loop Tom Tromey
2019-02-24 16:52 ` [RFC 15/17] Move gdb_notifier comment Tom Tromey
2019-09-26 14:06   ` Pedro Alves
2019-02-24 16:52 ` [RFC 11/17] Implement event-loop glue for gdbserver Tom Tromey
2019-02-24 16:52 ` [RFC 02/17] Move gdb-specific code out of start_event_loop Tom Tromey
2019-09-26 14:02   ` Pedro Alves
2019-02-24 16:52 ` Tom Tromey [this message]
2019-02-24 16:52 ` [RFC 06/17] Include <chrono> in event-loop.c Tom Tromey
2019-09-26 14:02   ` Pedro Alves
2019-02-24 16:52 ` [RFC 10/17] Move event-loop.[ch] to common/ Tom Tromey
2019-09-26 14:06   ` Pedro Alves
2019-10-04 22:06     ` Tom Tromey
2019-02-24 16:52 ` [RFC 04/17] Move gdb_select.h " Tom Tromey
2019-02-24 16:52 ` [RFC 09/17] Introduce async-event.[ch] Tom Tromey
2019-09-26 14:06   ` Pedro Alves
2019-10-04 22:17     ` Tom Tromey
2019-02-24 16:52 ` [RFC 01/17] Remove include from event-loop.c Tom Tromey
2019-02-24 16:52 ` [RFC 17/17] Simplify gdbserver's serial event handling Tom Tromey
2019-09-26 17:36   ` Pedro Alves
2019-10-04 22:08     ` Tom Tromey
2019-02-24 16:52 ` [RFC 08/17] Introduce and use flush_streams Tom Tromey
2019-02-24 17:14 ` [RFC 00/17] Merge event loop implementations Eli Zaretskii
2019-02-24 17:26   ` Tom Tromey
2019-02-24 17:45     ` Eli Zaretskii
2019-02-25 19:57       ` Tom Tromey
2019-02-25 20:30         ` Eli Zaretskii
2019-02-25 20:55           ` Tom Tromey
2019-02-26 16:04             ` Eli Zaretskii
2019-02-26 16:23               ` Tom Tromey
2019-02-26 16:46                 ` Eli Zaretskii
2019-09-26 17:47 ` Pedro Alves
2019-09-26 23:09   ` Tom Tromey
2019-09-27 13:53     ` Pedro Alves
2019-09-27 14:05       ` Pedro Alves
2019-09-27 14:21         ` Eli Zaretskii
2019-09-27 14:53           ` Pedro Alves
2019-09-27 15:32             ` Eli Zaretskii
2019-09-27 19:10       ` Tom Tromey
2020-02-14  2:22         ` Tom Tromey
2020-02-14 17:58           ` Pedro Alves
2020-02-14 18:36             ` Tom Tromey
2019-10-04 22:25   ` Tom Tromey
2020-02-14 18:20     ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190224165153.5062-4-tom@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).