[binutils-gdb] sim: assume sys/select.h always exists

Michael Frysinger vapier@sourceware.org
Sun Jun 13 02:19:49 GMT 2021


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2726bbc3391eddf0f75da56011137d327a156aab

commit 2726bbc3391eddf0f75da56011137d327a156aab
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Sat May 29 15:20:28 2021 -0400

    sim: assume sys/select.h always exists
    
    Now that gnulib provides this, assume it exists.

Diff:
---
 sim/ChangeLog             | 5 +++++
 sim/common/ChangeLog      | 4 ++++
 sim/common/dv-sockser.c   | 1 +
 sim/config.h.in           | 3 ---
 sim/configure             | 3 ---
 sim/cris/ChangeLog        | 5 +++++
 sim/cris/dv-rv.c          | 2 --
 sim/cris/rvdummy.c        | 5 +----
 sim/lm32/ChangeLog        | 4 ++++
 sim/lm32/dv-lm32uart.c    | 1 +
 sim/m32c/ChangeLog        | 4 ++++
 sim/m32c/mem.c            | 2 --
 sim/m4/sim_ac_platform.m4 | 1 -
 13 files changed, 25 insertions(+), 15 deletions(-)

diff --git a/sim/ChangeLog b/sim/ChangeLog
index 54f2216c42d..b90b13a0760 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-12  Mike Frysinger  <vapier@gentoo.org>
+
+	* m4/sim_ac_platform.m4: Delete sys/select.h.
+	* config.h.in, configure: Regenerate.
+
 2021-06-12  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure.ac: Call SIM_AC_OPTION_ALIGNMENT.
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index ff0f4e22323..19e93bbe492 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-12  Mike Frysinger  <vapier@gentoo.org>
+
+	* dv-sockser.c: Include sys/select.h.
+
 2021-06-12  Mike Frysinger  <vapier@gentoo.org>
 
 	* Make-common.in: Delete SIM_ALIGNMENT.
diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index ef652f62f46..7f1cf798e4b 100644
--- a/sim/common/dv-sockser.c
+++ b/sim/common/dv-sockser.c
@@ -39,6 +39,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
+#include <sys/select.h>
 #include <sys/socket.h>
 
 #ifndef __CYGWIN32__
diff --git a/sim/config.h.in b/sim/config.h.in
index a1d4f782431..6e876864941 100644
--- a/sim/config.h.in
+++ b/sim/config.h.in
@@ -287,9 +287,6 @@
 /* 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/sim/configure b/sim/configure
index bb3c54cae3d..2d4204fe526 100755
--- a/sim/configure
+++ b/sim/configure
@@ -2355,7 +2355,6 @@ as_fn_append ac_header_list " sys/mman.h"
 as_fn_append ac_header_list " sys/mount.h"
 as_fn_append ac_header_list " sys/param.h"
 as_fn_append ac_header_list " sys/resource.h"
-as_fn_append ac_header_list " sys/select.h"
 as_fn_append ac_header_list " sys/socket.h"
 as_fn_append ac_header_list " sys/stat.h"
 as_fn_append ac_header_list " sys/statfs.h"
@@ -4657,8 +4656,6 @@ done
 
 
 
-
-
 
 
 
diff --git a/sim/cris/ChangeLog b/sim/cris/ChangeLog
index bde34bb9303..2f4be8d9478 100644
--- a/sim/cris/ChangeLog
+++ b/sim/cris/ChangeLog
@@ -1,3 +1,8 @@
+2021-06-12  Mike Frysinger  <vapier@gentoo.org>
+
+	* dv-rv.c: Delete HAVE_SYS_SELECT_H.
+	* rvdummy.c: Likewise.
+
 2021-06-12  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
diff --git a/sim/cris/dv-rv.c b/sim/cris/dv-rv.c
index 310155c8442..89d6408ef9c 100644
--- a/sim/cris/dv-rv.c
+++ b/sim/cris/dv-rv.c
@@ -39,9 +39,7 @@
 
 #include <sys/time.h>
 
-#ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
-#endif
 
 /* Not guarded in dv-sockser.c, so why here.  */
 #include <netinet/in.h>
diff --git a/sim/cris/rvdummy.c b/sim/cris/rvdummy.c
index b53e823f8f7..719b2fcb74b 100644
--- a/sim/cris/rvdummy.c
+++ b/sim/cris/rvdummy.c
@@ -48,16 +48,13 @@ main (int argc, char *argv[])
 
 #include <sys/time.h>
 
-#ifdef HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-
 #include <errno.h>
 
 /* Not guarded in dv-sockser.c, so why here.  */
 #include <netinet/in.h>
 #include <arpa/inet.h>
 #include <netdb.h>
+#include <sys/select.h>
 #include <sys/socket.h>
 
 enum rv_command {
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index 3223d90b097..d47e165b531 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-12  Mike Frysinger  <vapier@gentoo.org>
+
+	* dv-lm32uart.c: Include sys/select.h.
+
 2021-06-12  Mike Frysinger  <vapier@gentoo.org>
 
 	* configure.ac: Delete call to SIM_AC_OPTION_ALIGNMENT.
diff --git a/sim/lm32/dv-lm32uart.c b/sim/lm32/dv-lm32uart.c
index 1f8ba1d92ee..68f02a32df6 100644
--- a/sim/lm32/dv-lm32uart.c
+++ b/sim/lm32/dv-lm32uart.c
@@ -26,6 +26,7 @@
 #include "sim-assert.h"
 
 #include <stdio.h>
+#include <sys/select.h>
 #include <sys/time.h>
 
 struct lm32uart
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index 270b5907ffc..8d3e606b1fb 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,7 @@
+2021-06-12  Mike Frysinger  <vapier@gentoo.org>
+
+	* mem.c: Delete HAVE_SYS_SELECT_H.
+
 2021-06-12  Mike Frysinger  <vapier@gentoo.org>
 
 	* aclocal.m4, config.in, configure: Regenerate.
diff --git a/sim/m32c/mem.c b/sim/m32c/mem.c
index 243b7c4e072..bc293aa637d 100644
--- a/sim/m32c/mem.c
+++ b/sim/m32c/mem.c
@@ -29,9 +29,7 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include <sys/time.h>
 #include <sys/types.h>
 #include <unistd.h>
-#ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
-#endif
 #ifdef HAVE_TERMIOS_H
 #include <termios.h>
 #endif
diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index 95760a65a96..c505c74e7af 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -36,7 +36,6 @@ AC_CHECK_HEADERS_ONCE(m4_flatten([
   sys/mount.h
   sys/param.h
   sys/resource.h
-  sys/select.h
   sys/socket.h
   sys/stat.h
   sys/statfs.h


More information about the Gdb-cvs mailing list