Rely on gnulib's unistd.h replacement.
authorPedro Alves <palves@redhat.com>
Mon, 1 Jul 2013 11:19:27 +0000 (11:19 +0000)
committerPedro Alves <palves@redhat.com>
Mon, 1 Jul 2013 11:19:27 +0000 (11:19 +0000)
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.

gdb/ChangeLog
gdb/defs.h
gdb/gdbserver/ChangeLog
gdb/gdbserver/configure
gdb/gdbserver/configure.ac
gdb/gdbserver/event-loop.c
gdb/gdbserver/gdbreplay.c
gdb/gdbserver/remote-utils.c
gdb/gdbserver/server.c
gdb/tracepoint.c

index de97647fdea99e0ce8f58690ed6585c80fff99aa..7292d8b13dc4672fc7480dafd7baa439743bd1f6 100644 (file)
@@ -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>
 
        Import the "unistd" gnulib module.
index d8a1adb0ceee80a157d0df99482036ab9f666740..f90ca9da57cf2ae3726125d0dfa8c6a0c3a740af 100644 (file)
 #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
index 8f7348033476a1b766bbdd32f7338767628b4675..11ae9f3c2ed57f8bc7381562267df77d121f31f9 100644 (file)
@@ -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>
 
        * Makefile.in (version.c): Use version.in, not
index 0588c94001dd21ddb0badb270503805a85e00066..49b9ab66d90a52ad825b40d7451462721811b0c8 100755 (executable)
@@ -4783,7 +4783,7 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach
   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 :
   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"
index c983d41ff35885487a4f8f84098c1acb2fa785c5..2658bef21f0874d6300bb2bd98485b6a73240d0a 100644 (file)
@@ -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
                 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
                 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
index 9e172a9650469bc041d333f75b756d954fd2e622..fbe7898eb6279fc96f02fb4e0e8ad5bd47568090 100644 (file)
@@ -34,9 +34,7 @@
 #include <errno.h>
 #endif
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 typedef struct gdb_event gdb_event;
 typedef int (event_handler_func) (gdb_fildes_t);
index c0d0c8f15ce65f07527f3363a2b88c2af894d387..5e64f6d66817a092746d5184a8bcce7083a18589 100644 (file)
@@ -41,9 +41,7 @@
 #ifdef HAVE_STRING_H
 #include <string.h>
 #endif
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #ifdef HAVE_NETINET_IN_H
 #include <netinet/in.h>
 #endif
index 3f055cfc3360b9e4f76b7a01d66139126fd4cb26..5cd6fa14c2ddf467d4b584ed87dbc3afeb772b88 100644 (file)
@@ -51,9 +51,7 @@
 #include <fcntl.h>
 #endif
 #include <sys/time.h>
-#if HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #if HAVE_ARPA_INET_H
 #include <arpa/inet.h>
 #endif
index 4a1d1dcb0b08054cc657e0a7e4120286b2d067a9..a172c98f6f1eb6ce61c9963ca9fa377cb0a31dc4 100644 (file)
@@ -22,9 +22,7 @@
 #include "notif.h"
 #include "tdesc.h"
 
-#if HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #if HAVE_SIGNAL_H
 #include <signal.h>
 #endif
index 954aa136cb8c4694f07c954c6952e4260704dfa6..054372a20dfe0f408af40de5ac30be2f90f73501 100644 (file)
@@ -64,9 +64,7 @@
 /* readline defines this.  */
 #undef savestring
 
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 
 #ifndef O_LARGEFILE
 #define O_LARGEFILE 0
This page took 0.050615 seconds and 4 git commands to generate.