aboutsummaryrefslogtreecommitdiff
path: root/sim/common
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-01-16 04:35:48 -0500
committerMike Frysinger <vapier@gentoo.org>2023-01-16 04:35:48 -0500
commit4cd7de783bc72cc1f44fe989e7a0c7feb10532d5 (patch)
tree39e49c04f886bece9add9d5b076fc269170e4afa /sim/common
parente9bf6a4a20798cd495b2833112482ebc55bc5982 (diff)
downloadgdb-4cd7de783bc72cc1f44fe989e7a0c7feb10532d5.zip
gdb-4cd7de783bc72cc1f44fe989e7a0c7feb10532d5.tar.gz
gdb-4cd7de783bc72cc1f44fe989e7a0c7feb10532d5.tar.bz2
sim: formally assume unistd.h always exists (via gnulib)
We have many uses of unistd.h that are unprotected by HAVE_UNISTD_H, so this is more formalizing the reality that we require this header. Since we switched to gnulib, it guarantees that a unistd.h exists for us to include, so we're doubly OK.
Diffstat (limited to 'sim/common')
-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
7 files changed, 0 insertions, 14 deletions
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>