From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8784 invoked by alias); 6 Sep 2010 22:29:28 -0000 Received: (qmail 8753 invoked by uid 22791); 6 Sep 2010 22:29:26 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 06 Sep 2010 22:29:20 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 06BA52BABAC; Mon, 6 Sep 2010 18:29:19 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id QcalVV7zSJgT; Mon, 6 Sep 2010 18:29:18 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id C055F2BABC1; Mon, 6 Sep 2010 18:29:18 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 392E1F59A0; Tue, 7 Sep 2010 00:29:02 +0200 (CEST) From: Joel Brobecker To: gdb-patches@sourceware.org Cc: Joel Brobecker Subject: [LynxOS/gdbserver 1/3] Include sys/ptrace.h instead of ptrace.h Date: Mon, 06 Sep 2010 22:40:00 -0000 Message-Id: <1283812137-30703-2-git-send-email-brobecker@adacore.com> In-Reply-To: <1283812137-30703-1-git-send-email-brobecker@adacore.com> References: <1283812137-30703-1-git-send-email-brobecker@adacore.com> 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 X-SW-Source: 2010-09/txt/msg00168.txt.bz2 Really interesting: On LynxOS 4.x, there is a #warning when sys/ptrace.h is used (explaining that ptrace.h will be used instead), whereas this file was removed from LynxOS 5.x. The contents of sys/ptrace.h on 4.x (or at least the meat of it): #if defined(__GNUC__) || defined(__GNUG__) #if !defined(__NO_INCLUDE_WARN__) #warning Using instead of #endif /* defined(__NO_INCLUDE_WARN__) */ #endif /* defined(__GNUC__) || defined(__GNUG__) */ #include The fix I went for, for now, is to just include unconditionally. I could have done some configury, but we already have to build with -D__NO_INCLUDE_WARN__ to avoid the warnings anyway, and that's unvoidable, due to system includes themselves including the "wrong" header file. Since seems to be the choice that was made for LynxOS, and since it works to include it on LynxOS 4.x, I think that's the simplest solution. gdb/gdbserver/ChangeLog: * lynx-low.c, lynx-ppc-loc.c: Include instead of --- gdb/gdbserver/lynx-low.c | 2 +- gdb/gdbserver/lynx-ppc-low.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gdb/gdbserver/lynx-low.c b/gdb/gdbserver/lynx-low.c index 7a949c0..74d2bcd 100644 --- a/gdb/gdbserver/lynx-low.c +++ b/gdb/gdbserver/lynx-low.c @@ -20,7 +20,7 @@ #include "lynx-low.h" #include -#include +#include #include /* Provides PIDGET, TIDGET, BUILDPID, etc. */ #include #include diff --git a/gdb/gdbserver/lynx-ppc-low.c b/gdb/gdbserver/lynx-ppc-low.c index 9caa8ac..97d691a 100644 --- a/gdb/gdbserver/lynx-ppc-low.c +++ b/gdb/gdbserver/lynx-ppc-low.c @@ -21,7 +21,7 @@ #include #include #include -#include +#include /* The following two typedefs are defined in a .h file which is not in the standard include path (/sys/include/family/ppc/ucontext.h), -- 1.7.1