aboutsummaryrefslogtreecommitdiff
path: root/gdb/common
diff options
context:
space:
mode:
authorTom Tromey <tom@tromey.com>2018-09-26 05:28:07 -0600
committerTom Tromey <tom@tromey.com>2018-10-01 02:58:23 -0600
commit4176f14d9c9e509425bffc01404c751e238b1f01 (patch)
tree52d0fe01cad44b8950278103ad719603b3837139 /gdb/common
parenta95746f91769c0f65e9393ff83aad0871d1a666b (diff)
downloadbinutils-4176f14d9c9e509425bffc01404c751e238b1f01.zip
binutils-4176f14d9c9e509425bffc01404c751e238b1f01.tar.gz
binutils-4176f14d9c9e509425bffc01404c751e238b1f01.tar.bz2
Don't check HAVE_UNISTD_H
I noticed some spots that were checking HAVE_UNISTD_H. There is no need to do this, as <unistd.h> is unconditionally included in many places in gdb. This sort of cleanup was done once before, in 2013: 2013-07-01 Pedro Alves <palves@redhat.com> * defs.h: Don't check HAVE_UNISTD_H before including <unistd.h>. (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Delete. * tracepoint.c: Don't check HAVE_UNISTD_H before including <unistd.h>. HAVE_UNISTD_H seems to come from gnulib, so there are still mentions of it in the source. gdb/ChangeLog 2018-10-01 Tom Tromey <tom@tromey.com> * unittests/scoped_mmap-selftests.c: Don't check HAVE_UNISTD_H. * unittests/scoped_fd-selftests.c: Don't check HAVE_UNISTD_H. * common/scoped_fd.h: Don't check HAVE_UNISTD_H.
Diffstat (limited to 'gdb/common')
-rw-r--r--gdb/common/scoped_fd.h5
1 files changed, 0 insertions, 5 deletions
diff --git a/gdb/common/scoped_fd.h b/gdb/common/scoped_fd.h
index a6a8ab9..c2125bd 100644
--- a/gdb/common/scoped_fd.h
+++ b/gdb/common/scoped_fd.h
@@ -20,10 +20,6 @@
#ifndef SCOPED_FD_H
#define SCOPED_FD_H
-#include "config.h"
-
-#ifdef HAVE_UNISTD_H
-
#include <unistd.h>
/* A smart-pointer-like class to automatically close a file descriptor. */
@@ -56,5 +52,4 @@ private:
int m_fd;
};
-#endif /* HAVE_UNISTD_H */
#endif /* SCOPED_FD_H */