From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3337 invoked by alias); 27 Jun 2013 18:52:35 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 3276 invoked by uid 89); 27 Jun 2013 18:52:35 -0000 X-Spam-SWARE-Status: No, score=-8.1 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 18:52:32 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r5RIqUWe020946 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 27 Jun 2013 14:52:31 -0400 Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5RIqTl5030998 for ; Thu, 27 Jun 2013 14:52:30 -0400 Subject: [PATCH 4/9] Rely on gnulib's unistd.h replacement. To: gdb-patches@sourceware.org From: Pedro Alves Date: Thu, 27 Jun 2013 18:52:00 -0000 Message-ID: <20130627185229.6625.60141.stgit@brno.lan> In-Reply-To: <20130627185200.6625.10526.stgit@brno.lan> References: <20130627185200.6625.10526.stgit@brno.lan> User-Agent: StGit/0.16 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-SW-Source: 2013-06/txt/msg00843.txt.bz2 With gnulib's unistd module, we can assume unistd.h is always present, and that STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO are always defined. gdb/ 2013-06-27 Pedro Alves * defs.h: Don't check HAVE_UNISTD_H before including . (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): Delete. * tracepoint.c: Don't check HAVE_UNISTD_H before including . gdbserver/ 2013-06-27 Pedro Alves * event-loop.c: Don't check HAVE_UNISTD_H before including . * gdbreplay.c: Likewise. * remote-utils.c: Likewise. * server.c: Likewise. --- gdb/defs.h | 14 -------------- gdb/gdbserver/event-loop.c | 2 -- gdb/gdbserver/gdbreplay.c | 2 -- gdb/gdbserver/remote-utils.c | 2 -- gdb/gdbserver/server.c | 2 -- gdb/tracepoint.c | 2 -- 6 files changed, 24 deletions(-) diff --git a/gdb/defs.h b/gdb/defs.h index d8a1adb..f90ca9d 100644 --- a/gdb/defs.h +++ b/gdb/defs.h @@ -52,10 +52,7 @@ #include #endif -#ifdef HAVE_UNISTD_H #include -#endif - #include /* 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 diff --git a/gdb/gdbserver/event-loop.c b/gdb/gdbserver/event-loop.c index 9e172a9..fbe7898 100644 --- a/gdb/gdbserver/event-loop.c +++ b/gdb/gdbserver/event-loop.c @@ -34,9 +34,7 @@ #include #endif -#ifdef HAVE_UNISTD_H #include -#endif typedef struct gdb_event gdb_event; typedef int (event_handler_func) (gdb_fildes_t); diff --git a/gdb/gdbserver/gdbreplay.c b/gdb/gdbserver/gdbreplay.c index c0d0c8f..5e64f6d 100644 --- a/gdb/gdbserver/gdbreplay.c +++ b/gdb/gdbserver/gdbreplay.c @@ -41,9 +41,7 @@ #ifdef HAVE_STRING_H #include #endif -#ifdef HAVE_UNISTD_H #include -#endif #ifdef HAVE_NETINET_IN_H #include #endif diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 3f055cf..5cd6fa1 100644 --- a/gdb/gdbserver/remote-utils.c +++ b/gdb/gdbserver/remote-utils.c @@ -51,9 +51,7 @@ #include #endif #include -#if HAVE_UNISTD_H #include -#endif #if HAVE_ARPA_INET_H #include #endif diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c index 4a1d1dc..a172c98 100644 --- a/gdb/gdbserver/server.c +++ b/gdb/gdbserver/server.c @@ -22,9 +22,7 @@ #include "notif.h" #include "tdesc.h" -#if HAVE_UNISTD_H #include -#endif #if HAVE_SIGNAL_H #include #endif diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index bbba2f8..b8451e5 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -64,9 +64,7 @@ /* readline defines this. */ #undef savestring -#ifdef HAVE_UNISTD_H #include -#endif #ifndef O_LARGEFILE #define O_LARGEFILE 0