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:
parent
8839a007ad
commit
bc7dea8de9
10 changed files with 19 additions and 26 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
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>.
|
||||||
|
|
||||||
2013-07-01 Pedro Alves <palves@redhat.com>
|
2013-07-01 Pedro Alves <palves@redhat.com>
|
||||||
|
|
||||||
Import the "unistd" gnulib module.
|
Import the "unistd" gnulib module.
|
||||||
|
|
14
gdb/defs.h
14
gdb/defs.h
|
@ -52,10 +52,7 @@
|
||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
||||||
/* First include ansidecl.h so we can use the various macro definitions
|
/* 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)
|
#define MERGEPID(PID, TID) ptid_build (PID, TID, 0)
|
||||||
#endif
|
#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
|
/* If this definition isn't overridden by the header files, assume
|
||||||
that isatty and fileno exist on this system. */
|
that isatty and fileno exist on this system. */
|
||||||
#ifndef ISATTY
|
#ifndef ISATTY
|
||||||
|
|
|
@ -1,3 +1,13 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2013-06-28 Tom Tromey <tromey@redhat.com>
|
2013-06-28 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
* Makefile.in (version.c): Use version.in, not
|
* Makefile.in (version.c): Use version.in, not
|
||||||
|
|
2
gdb/gdbserver/configure
vendored
2
gdb/gdbserver/configure
vendored
|
@ -4783,7 +4783,7 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach
|
||||||
cd "$ac_popdir"
|
cd "$ac_popdir"
|
||||||
|
|
||||||
|
|
||||||
for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h thread_db.h linux/elf.h stdlib.h unistd.h errno.h fcntl.h signal.h sys/file.h malloc.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h sys/wait.h wait.h sys/un.h linux/perf_event.h
|
for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h thread_db.h linux/elf.h stdlib.h errno.h fcntl.h signal.h sys/file.h malloc.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h sys/wait.h wait.h sys/un.h linux/perf_event.h
|
||||||
do :
|
do :
|
||||||
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
|
||||||
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
|
||||||
|
|
|
@ -65,7 +65,7 @@ ACX_CONFIGURE_DIR(["../gnulib"], ["build-gnulib-gdbserver"])
|
||||||
|
|
||||||
AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
|
AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
|
||||||
proc_service.h sys/procfs.h thread_db.h linux/elf.h dnl
|
proc_service.h sys/procfs.h thread_db.h linux/elf.h dnl
|
||||||
stdlib.h unistd.h dnl
|
stdlib.h dnl
|
||||||
errno.h fcntl.h signal.h sys/file.h malloc.h dnl
|
errno.h fcntl.h signal.h sys/file.h malloc.h dnl
|
||||||
sys/ioctl.h netinet/in.h sys/socket.h netdb.h dnl
|
sys/ioctl.h netinet/in.h sys/socket.h netdb.h dnl
|
||||||
netinet/tcp.h arpa/inet.h sys/wait.h wait.h sys/un.h dnl
|
netinet/tcp.h arpa/inet.h sys/wait.h wait.h sys/un.h dnl
|
||||||
|
|
|
@ -34,9 +34,7 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef struct gdb_event gdb_event;
|
typedef struct gdb_event gdb_event;
|
||||||
typedef int (event_handler_func) (gdb_fildes_t);
|
typedef int (event_handler_func) (gdb_fildes_t);
|
||||||
|
|
|
@ -41,9 +41,7 @@
|
||||||
#ifdef HAVE_STRING_H
|
#ifdef HAVE_STRING_H
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
#ifdef HAVE_NETINET_IN_H
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -51,9 +51,7 @@
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#if HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
#if HAVE_ARPA_INET_H
|
#if HAVE_ARPA_INET_H
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -22,9 +22,7 @@
|
||||||
#include "notif.h"
|
#include "notif.h"
|
||||||
#include "tdesc.h"
|
#include "tdesc.h"
|
||||||
|
|
||||||
#if HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
#if HAVE_SIGNAL_H
|
#if HAVE_SIGNAL_H
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -64,9 +64,7 @@
|
||||||
/* readline defines this. */
|
/* readline defines this. */
|
||||||
#undef savestring
|
#undef savestring
|
||||||
|
|
||||||
#ifdef HAVE_UNISTD_H
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef O_LARGEFILE
|
#ifndef O_LARGEFILE
|
||||||
#define O_LARGEFILE 0
|
#define O_LARGEFILE 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue