aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/arm/armos.c3
-rw-r--r--sim/common/callback.c2
-rw-r--r--sim/common/dv-pal.c2
-rw-r--r--sim/common/dv-sockser.c2
-rw-r--r--sim/common/nrun.c2
-rw-r--r--sim/common/sim-io.c2
-rw-r--r--sim/common/sim-memopt.c2
-rw-r--r--sim/common/syscall.c2
-rwxr-xr-xsim/configure7
-rw-r--r--sim/cr16/simops.c2
-rw-r--r--sim/cris/dv-rv.c2
-rw-r--r--sim/cris/rvdummy.c3
-rw-r--r--sim/cris/traps.c2
-rw-r--r--sim/d10v/simops.c2
-rw-r--r--sim/m4/sim_ac_platform.m43
-rw-r--r--sim/m68hc11/emulos.c2
-rw-r--r--sim/mn10300/op_utils.c2
-rw-r--r--sim/ppc/emul_bugapi.c2
-rw-r--r--sim/ppc/emul_chirp.c2
-rw-r--r--sim/ppc/emul_netbsd.c2
-rw-r--r--sim/ppc/emul_unix.c2
-rw-r--r--sim/ppc/hw_com.c2
-rw-r--r--sim/ppc/hw_disk.c3
-rw-r--r--sim/ppc/hw_pal.c2
-rw-r--r--sim/ppc/main.c2
-rw-r--r--sim/ppc/mon.c2
-rw-r--r--sim/ppc/table.c2
-rw-r--r--sim/rl78/main.c2
-rw-r--r--sim/rx/main.c2
-rw-r--r--sim/sh/interp.c2
-rw-r--r--sim/v850/simops.c2
31 files changed, 4 insertions, 67 deletions
diff --git a/sim/arm/armos.c b/sim/arm/armos.c
index a8ef7e4..9cf238a 100644
--- a/sim/arm/armos.c
+++ b/sim/arm/armos.c
@@ -31,10 +31,7 @@
#include <errno.h>
#include <limits.h>
#include <string.h>
-
-#ifdef HAVE_UNISTD_H
#include <unistd.h> /* For SEEK_SET etc. */
-#endif
#include "armdefs.h"
#include "armos.h"
diff --git a/sim/common/callback.c b/sim/common/callback.c
index ff14a11..306e95e 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -34,9 +34,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/sim/common/dv-pal.c b/sim/common/dv-pal.c
index 56692c1..25f8c68 100644
--- a/sim/common/dv-pal.c
+++ b/sim/common/dv-pal.c
@@ -24,9 +24,7 @@
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include "sim-main.h"
#include "hw-main.h"
diff --git a/sim/common/dv-sockser.c b/sim/common/dv-sockser.c
index fba2775..698cab8 100644
--- a/sim/common/dv-sockser.c
+++ b/sim/common/dv-sockser.c
@@ -29,9 +29,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <signal.h>
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/select.h>
diff --git a/sim/common/nrun.c b/sim/common/nrun.c
index 4c01162..2ebf8a1 100644
--- a/sim/common/nrun.c
+++ b/sim/common/nrun.c
@@ -21,10 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdlib.h>
/* For strsignal. */
#include <string.h>
-#ifdef HAVE_UNISTD_H
/* For chdir. */
#include <unistd.h>
-#endif
#include "bfd.h"
#include "environ.h"
diff --git a/sim/common/sim-io.c b/sim/common/sim-io.c
index f126c96..fc0d42f 100644
--- a/sim/common/sim-io.c
+++ b/sim/common/sim-io.c
@@ -29,9 +29,7 @@
#include <stdarg.h>
#include <stdint.h>
#include <stdlib.h>
-#if HAVE_UNISTD_H
#include <unistd.h>
-#endif
#undef open
diff --git a/sim/common/sim-memopt.c b/sim/common/sim-memopt.c
index 2d1b96b..2e5016c 100644
--- a/sim/common/sim-memopt.c
+++ b/sim/common/sim-memopt.c
@@ -26,9 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#endif
#include <stdlib.h>
#include <string.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
#endif
diff --git a/sim/common/syscall.c b/sim/common/syscall.c
index f65f616..96033db 100644
--- a/sim/common/syscall.c
+++ b/sim/common/syscall.c
@@ -33,9 +33,7 @@
#include <stdlib.h>
#include <string.h>
#include <time.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <sys/stat.h>
#include <sys/types.h>
diff --git a/sim/configure b/sim/configure
index c1333fc..1047514 100755
--- a/sim/configure
+++ b/sim/configure
@@ -2797,7 +2797,6 @@ as_fn_append ac_header_list " dlfcn.h"
as_fn_append ac_header_list " fcntl.h"
as_fn_append ac_header_list " fpu_control.h"
as_fn_append ac_header_list " termios.h"
-as_fn_append ac_header_list " unistd.h"
as_fn_append ac_header_list " utime.h"
as_fn_append ac_header_list " linux/if_tun.h"
as_fn_append ac_header_list " linux/mii.h"
@@ -5268,8 +5267,6 @@ done
-
-
for ac_func in $ac_func_list
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
@@ -12289,7 +12286,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12292 "configure"
+#line 12289 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -12395,7 +12392,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 12398 "configure"
+#line 12395 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c
index e652b81..73420a7 100644
--- a/sim/cr16/simops.c
+++ b/sim/cr16/simops.c
@@ -24,9 +24,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <string.h>
#include <time.h>
#include <sys/time.h>
diff --git a/sim/cris/dv-rv.c b/sim/cris/dv-rv.c
index 6caa4dd..9142b88 100644
--- a/sim/cris/dv-rv.c
+++ b/sim/cris/dv-rv.c
@@ -29,9 +29,7 @@
#include <ctype.h>
#include <errno.h>
#include <string.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
diff --git a/sim/cris/rvdummy.c b/sim/cris/rvdummy.c
index a263ee3..91a7ddc 100644
--- a/sim/cris/rvdummy.c
+++ b/sim/cris/rvdummy.c
@@ -36,10 +36,7 @@ main (int argc, char *argv[])
#include "libiberty.h"
#include <stdio.h>
-
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TYPES_H
diff --git a/sim/cris/traps.c b/sim/cris/traps.c
index afcb348..f5f169f 100644
--- a/sim/cris/traps.c
+++ b/sim/cris/traps.c
@@ -32,9 +32,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdlib.h>
#include <stdarg.h>
#include <errno.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
#endif
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index 96ed29f..bc7806c 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -5,9 +5,7 @@
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <string.h>
#include "bfd.h"
diff --git a/sim/m4/sim_ac_platform.m4 b/sim/m4/sim_ac_platform.m4
index 6356a80..665c1bd 100644
--- a/sim/m4/sim_ac_platform.m4
+++ b/sim/m4/sim_ac_platform.m4
@@ -18,12 +18,12 @@ AC_DEFUN([SIM_AC_PLATFORM],
[dnl
dnl Check for common headers.
dnl NB: You can assume C11 headers exist.
+dnl NB: We use gnulib from ../gnulib/, so we don't probe headers it provides.
AC_CHECK_HEADERS_ONCE(m4_flatten([
dlfcn.h
fcntl.h
fpu_control.h
termios.h
- unistd.h
utime.h
linux/if_tun.h
linux/mii.h
@@ -46,6 +46,7 @@ AC_CHECK_HEADERS_ONCE(m4_flatten([
]))
AC_HEADER_DIRENT
+dnl NB: We use gnulib from ../gnulib/, so we don't probe functions it provides.
AC_CHECK_FUNCS_ONCE(m4_flatten([
__setfpucw
access
diff --git a/sim/m68hc11/emulos.c b/sim/m68hc11/emulos.c
index 50d2753..fcf9cc1 100644
--- a/sim/m68hc11/emulos.c
+++ b/sim/m68hc11/emulos.c
@@ -21,9 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include "defs.h"
#include "sim-main.h"
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include "m68hc11-sim.h"
diff --git a/sim/mn10300/op_utils.c b/sim/mn10300/op_utils.c
index b29b803..7e035f4 100644
--- a/sim/mn10300/op_utils.c
+++ b/sim/mn10300/op_utils.c
@@ -3,9 +3,7 @@
#include <errno.h>
#include <time.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <string.h>
#include <sys/stat.h>
#include <sys/time.h>
diff --git a/sim/ppc/emul_bugapi.c b/sim/ppc/emul_bugapi.c
index f4eed44..067e406 100644
--- a/sim/ppc/emul_bugapi.c
+++ b/sim/ppc/emul_bugapi.c
@@ -27,9 +27,7 @@
#include "emul_generic.h"
#include "emul_bugapi.h"
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdlib.h>
#include <string.h>
diff --git a/sim/ppc/emul_chirp.c b/sim/ppc/emul_chirp.c
index 116f373..c064a28 100644
--- a/sim/ppc/emul_chirp.c
+++ b/sim/ppc/emul_chirp.c
@@ -28,9 +28,7 @@
#include "emul_chirp.h"
#include <string.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifndef STATIC_INLINE_EMUL_CHIRP
#define STATIC_INLINE_EMUL_CHIRP STATIC_INLINE
diff --git a/sim/ppc/emul_netbsd.c b/sim/ppc/emul_netbsd.c
index a8bfd27..51f8e98 100644
--- a/sim/ppc/emul_netbsd.c
+++ b/sim/ppc/emul_netbsd.c
@@ -72,10 +72,8 @@ int getrusage();
# endif
#endif
-#ifdef HAVE_UNISTD_H
#undef MAXPATHLEN /* sys/param.h might define this also */
#include <unistd.h>
-#endif
#include <stdlib.h>
diff --git a/sim/ppc/emul_unix.c b/sim/ppc/emul_unix.c
index 1d8b781..2872d23 100644
--- a/sim/ppc/emul_unix.c
+++ b/sim/ppc/emul_unix.c
@@ -115,10 +115,8 @@ int getrusage();
# endif
#endif
-#ifdef HAVE_UNISTD_H
#undef MAXPATHLEN /* sys/param.h might define this also */
#include <unistd.h>
-#endif
#include <stdlib.h>
#include <time.h>
diff --git a/sim/ppc/hw_com.c b/sim/ppc/hw_com.c
index 4ffd732..768d1ca 100644
--- a/sim/ppc/hw_com.c
+++ b/sim/ppc/hw_com.c
@@ -28,9 +28,7 @@
#include "device_table.h"
#include <string.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdlib.h>
/* DEVICE
diff --git a/sim/ppc/hw_disk.c b/sim/ppc/hw_disk.c
index 3a82520..54a11f6 100644
--- a/sim/ppc/hw_disk.c
+++ b/sim/ppc/hw_disk.c
@@ -26,10 +26,7 @@
#include "pk.h"
#include <stdio.h>
-
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifndef SEEK_SET
#define SEEK_SET 0
diff --git a/sim/ppc/hw_pal.c b/sim/ppc/hw_pal.c
index 8b07709..f858508 100644
--- a/sim/ppc/hw_pal.c
+++ b/sim/ppc/hw_pal.c
@@ -30,9 +30,7 @@
#include "cpu.h"
#include <string.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdlib.h>
diff --git a/sim/ppc/main.c b/sim/ppc/main.c
index 83b629e..aa1c85e 100644
--- a/sim/ppc/main.c
+++ b/sim/ppc/main.c
@@ -36,9 +36,7 @@
#include "sim/sim.h"
#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <string.h>
#include <errno.h>
diff --git a/sim/ppc/mon.c b/sim/ppc/mon.c
index 4e29ec9..8ab42af 100644
--- a/sim/ppc/mon.c
+++ b/sim/ppc/mon.c
@@ -26,9 +26,7 @@
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdlib.h>
#ifdef HAVE_SYS_TYPES_H
#include <sys/types.h>
diff --git a/sim/ppc/table.c b/sim/ppc/table.c
index 6399bda..da16967 100644
--- a/sim/ppc/table.c
+++ b/sim/ppc/table.c
@@ -29,9 +29,7 @@
#include "lf.h"
#include "table.h"
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdlib.h>
typedef struct _open_table open_table;
diff --git a/sim/rl78/main.c b/sim/rl78/main.c
index 7c250f7..1eafa33 100644
--- a/sim/rl78/main.c
+++ b/sim/rl78/main.c
@@ -25,9 +25,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <assert.h>
#include <setjmp.h>
#include <signal.h>
diff --git a/sim/rx/main.c b/sim/rx/main.c
index e404446..13d0c47 100644
--- a/sim/rx/main.c
+++ b/sim/rx/main.c
@@ -24,9 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <assert.h>
#include <setjmp.h>
#include <signal.h>
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 5a90cd2..5e0e8c4 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -25,9 +25,7 @@
#include <stdio.h>
#include <errno.h>
#include <signal.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#ifdef HAVE_MMAP
#include <sys/mman.h>
# ifndef MAP_FAILED
diff --git a/sim/v850/simops.c b/sim/v850/simops.c
index 69db8aa..326745e 100644
--- a/sim/v850/simops.c
+++ b/sim/v850/simops.c
@@ -12,9 +12,7 @@
#include <utime.h>
#endif
#include <time.h>
-#ifdef HAVE_UNISTD_H
#include <unistd.h>
-#endif
#include <stdlib.h>
#include <string.h>