forked from Imagelibrary/binutils-gdb
Rely on gnulib's unistd.h replacement.
With gnulib's unistd module, we can assume unistd.h is always present, and that STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO are always defined. Don't remove unistd.h from GDB's configure.ac, as later tests in the file use HAVE_UNISTD_H checks. gdb/ 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>. gdb/gdbserver/ 2013-07-01 Pedro Alves <palves@redhat.com> * event-loop.c: Don't check HAVE_UNISTD_H before including <unistd.h>. * gdbreplay.c: Likewise. * remote-utils.c: Likewise. * server.c: Likewise. * configure.ac: Don't check for unistd.h. * configure: Regenerate.
This commit is contained in:
14
gdb/defs.h
14
gdb/defs.h
@@ -52,10 +52,7 @@
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include <fcntl.h>
|
||||
|
||||
/* First include ansidecl.h so we can use the various macro definitions
|
||||
@@ -766,17 +763,6 @@ extern int use_windows;
|
||||
#define MERGEPID(PID, TID) ptid_build (PID, TID, 0)
|
||||
#endif
|
||||
|
||||
/* Define well known filenos if the system does not define them. */
|
||||
#ifndef STDIN_FILENO
|
||||
#define STDIN_FILENO 0
|
||||
#endif
|
||||
#ifndef STDOUT_FILENO
|
||||
#define STDOUT_FILENO 1
|
||||
#endif
|
||||
#ifndef STDERR_FILENO
|
||||
#define STDERR_FILENO 2
|
||||
#endif
|
||||
|
||||
/* If this definition isn't overridden by the header files, assume
|
||||
that isatty and fileno exist on this system. */
|
||||
#ifndef ISATTY
|
||||
|
||||
Reference in New Issue
Block a user