sim: assume sys/select.h always exists

Message ID 20210608050518.376-1-vapier@gentoo.org
State New
Headers show
Series
  • sim: assume sys/select.h always exists
Related show

Commit Message

Mike Frysinger via Gdb-patches June 8, 2021, 5:05 a.m.
Now that gnulib provides this, assume it exists.
---
 sim/common/dv-sockser.c | 1 +
 sim/cris/config.in      | 3 ---
 sim/cris/configure      | 7 ++-----
 sim/cris/configure.ac   | 1 -
 sim/cris/dv-rv.c        | 2 --
 sim/cris/rvdummy.c      | 3 +--
 sim/lm32/dv-lm32uart.c  | 1 +
 sim/m32c/config.in      | 3 ---
 sim/m32c/configure      | 7 ++-----
 sim/m32c/configure.ac   | 1 -
 sim/m32c/mem.c          | 2 --
 11 files changed, 7 insertions(+), 24 deletions(-)

-- 
2.31.1

Patch

diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index ef652f62f468..7f1cf798e4b9 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/cris/config.in b/sim/cris/config.in
index 1a12e071d7fc..86eafcea8e01 100644
--- a/sim/cris/config.in
+++ b/sim/cris/config.in
@@ -124,9 +124,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/cris/configure b/sim/cris/configure
index 1aaf58dc9d68..85b081cfe0ca 100755
--- a/sim/cris/configure
+++ b/sim/cris/configure
@@ -2322,7 +2322,6 @@  as_fn_append ac_func_list " strsignal"
 as_fn_append ac_func_list " time"
 as_fn_append ac_func_list " truncate"
 as_fn_append ac_header_list " sys/param.h"
-as_fn_append ac_header_list " sys/select.h"
 as_fn_append ac_header_list " sys/socket.h"
 # Check that the precious variables saved in the cache have kept the same
 # value.
@@ -11221,7 +11220,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11224 "configure"
+#line 11223 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11327,7 +11326,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11330 "configure"
+#line 11329 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11883,8 +11882,6 @@  _ACEOF
 
 
 
-
-
 wire_endian="LITTLE"
 default_endian=""
 # Check whether --enable-sim-endian was given.
diff --git a/sim/cris/configure.ac b/sim/cris/configure.ac
index f8aa533a063c..04ab511cbc7e 100644
--- a/sim/cris/configure.ac
+++ b/sim/cris/configure.ac
@@ -7,7 +7,6 @@  SIM_AC_COMMON
 # For dv-rv and rvdummy.
 AC_CHECK_HEADERS_ONCE(m4_flatten([
   sys/param.h
-  sys/select.h
   sys/socket.h
 ]))
 
diff --git a/sim/cris/dv-rv.c b/sim/cris/dv-rv.c
index 310155c84420..89d6408ef9cd 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 b53e823f8f7a..91d6d3f2b86e 100644
--- a/sim/cris/rvdummy.c
+++ b/sim/cris/rvdummy.c
@@ -48,9 +48,7 @@  main (int argc, char *argv[])
 
 #include <sys/time.h>
 
-#ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
-#endif
 
 #include <errno.h>
 
@@ -58,6 +56,7 @@  main (int argc, char *argv[])
 #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/dv-lm32uart.c b/sim/lm32/dv-lm32uart.c
index 1f8ba1d92eee..68f02a32df6b 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/config.in b/sim/m32c/config.in
index 2bd2bea880ca..30ce743b59ad 100644
--- a/sim/m32c/config.in
+++ b/sim/m32c/config.in
@@ -127,9 +127,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/m32c/configure b/sim/m32c/configure
index 7135728d7f63..64b7ba6aaf92 100755
--- a/sim/m32c/configure
+++ b/sim/m32c/configure
@@ -2306,7 +2306,6 @@  as_fn_append ac_func_list " truncate"
 as_fn_append ac_header_list " termios.h"
 as_fn_append ac_header_list " netinet/in.h"
 as_fn_append ac_header_list " netinet/tcp.h"
-as_fn_append ac_header_list " sys/select.h"
 as_fn_append ac_header_list " sys/socket.h"
 # Check that the precious variables saved in the cache have kept the same
 # value.
@@ -11205,7 +11204,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11208 "configure"
+#line 11207 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11311,7 +11310,7 @@  else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 11314 "configure"
+#line 11313 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -11870,8 +11869,6 @@  _ACEOF
 
 
 
-
-
 # Check whether --enable-werror was given.
 if test "${enable_werror+set}" = set; then :
   enableval=$enable_werror; case "${enableval}" in
diff --git a/sim/m32c/configure.ac b/sim/m32c/configure.ac
index de1587eaac11..1655219bcdcb 100644
--- a/sim/m32c/configure.ac
+++ b/sim/m32c/configure.ac
@@ -27,7 +27,6 @@  AC_CHECK_HEADERS_ONCE(m4_flatten([
   termios.h
   netinet/in.h
   netinet/tcp.h
-  sys/select.h
   sys/socket.h
 ]))
 
diff --git a/sim/m32c/mem.c b/sim/m32c/mem.c
index 243b7c4e072c..bc293aa637d2 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