From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31738 invoked by alias); 27 Jun 2013 08:44:37 -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 31636 invoked by uid 89); 27 Jun 2013 08:44:37 -0000 X-Spam-SWARE-Status: No, score=-6.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from mga14.intel.com (HELO mga14.intel.com) (143.182.124.37) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 27 Jun 2013 08:44:36 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by azsmga102.ch.intel.com with ESMTP; 27 Jun 2013 01:44:35 -0700 X-ExtLoop1: 1 Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga001.fm.intel.com with ESMTP; 27 Jun 2013 01:45:17 -0700 Received: from ulslx001.iul.intel.com (ulslx001.iul.intel.com [172.28.207.63]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id r5R8iTAt009477; Thu, 27 Jun 2013 09:44:29 +0100 Received: from ulslx001.iul.intel.com (localhost [127.0.0.1]) by ulslx001.iul.intel.com with ESMTP id r5R8iTQa003435; Thu, 27 Jun 2013 10:44:29 +0200 Received: (from mgherza1@localhost) by ulslx001.iul.intel.com with id r5R8iTjB003431; Thu, 27 Jun 2013 10:44:29 +0200 From: Mircea Gherzan To: tromey@redhat.com, palves@redhat.com, jan.kratochvil@redhat.com Cc: gdb-patches@sourceware.org, Mircea Gherzan Subject: [PATCH 1/7] gdbserver, common: conditionally include the unistd.h Date: Thu, 27 Jun 2013 08:44:00 -0000 Message-Id: <1372322622-3216-2-git-send-email-mircea.gherzan@intel.com> In-Reply-To: <1372322622-3216-1-git-send-email-mircea.gherzan@intel.com> References: <1372322622-3216-1-git-send-email-mircea.gherzan@intel.com> X-SW-Source: 2013-06/txt/msg00813.txt.bz2 2013-06-25 Mircea Gherzan * common/agent.c: Conditionally include unistd.h. gdbserver/ * hostio.c: Conditionally include unistd.h and define PATH_MAX if unistd.h is not available. * tracepoint.h: Conditionally include unistd.h. Signed-off-by: Mircea Gherzan --- gdb/common/agent.c | 2 ++ gdb/gdbserver/hostio.c | 7 +++++++ gdb/gdbserver/tracepoint.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/gdb/common/agent.c b/gdb/common/agent.c index 99cef4f..bbf5c4c 100644 --- a/gdb/common/agent.c +++ b/gdb/common/agent.c @@ -26,7 +26,9 @@ #endif #include +#ifdef HAVE_UNISTD_H #include +#endif #include "agent.h" #include "filestuff.h" diff --git a/gdb/gdbserver/hostio.c b/gdb/gdbserver/hostio.c index df94d31..3cf93db 100644 --- a/gdb/gdbserver/hostio.c +++ b/gdb/gdbserver/hostio.c @@ -23,7 +23,14 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#endif + +/* PATH_MAX is defined in unistd.h, which might not be available. */ +#ifndef PATH_MAX +#define PATH_MAX 4096 +#endif extern int remote_debug; diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 5c0dec7..c0dea5b 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -22,7 +22,9 @@ #include #include +#ifdef HAVE_UNISTD_H #include +#endif #include #include #include -- 1.7.12.4