From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27930 invoked by alias); 28 Apr 2004 21:18:58 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 27922 invoked from network); 28 Apr 2004 21:18:58 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 28 Apr 2004 21:18:58 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i3SLIvKI025992 for ; Wed, 28 Apr 2004 17:18:57 -0400 Received: from localhost.redhat.com (to-dhcp51.toronto.redhat.com [172.16.14.151]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i3SLIuv01641; Wed, 28 Apr 2004 17:18:56 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id E326B2B9D; Wed, 28 Apr 2004 17:18:59 -0400 (EDT) Message-ID: <40901FC3.1080704@gnu.org> Date: Wed, 28 Apr 2004 21:18:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: Rainer Orth Cc: gdb-patches@sources.redhat.com Subject: Re: PATCH: Workaround IRIX 5 compilation problem References: <16525.29805.263020.874731@xayide.TechFak.Uni-Bielefeld.DE> In-Reply-To: <16525.29805.263020.874731@xayide.TechFak.Uni-Bielefeld.DE> Content-Type: multipart/mixed; boundary="------------010007000306030005080308" X-SW-Source: 2004-04/txt/msg00647.txt.bz2 This is a multi-part message in MIME format. --------------010007000306030005080308 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 568 > This happens because the definition of of anon_hdl in is > protected with _KERNEL || _STANDALONE || _KMEMUSER. > > Compiling with -D_KMEMUSER works, but unfortunately adding that definition > to gdb/config/mips/nm-irix5.h does not: is included before > defs.h, so the definition needs to go either into config.h or directly into > proc-api.c. I think the former approach is cleaner, so this patch > implements it. > > Ok for 6.1 branch and mainline? Does the attached also work? This avoids blindly un/redefining _KMEMUSER. Andrew --------------010007000306030005080308 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 1247 2004-04-28 Rainer Orth Andrew Cagney * configure.in (mips-sgi-irix5*): Define _KMEMUSER for . * acconfig.h: Provide default _KMEMUSER value. * config.in, configure: Re-generate. Index: acconfig.h =================================================================== RCS file: /cvs/src/src/gdb/acconfig.h,v retrieving revision 1.28 diff -u -r1.28 acconfig.h --- acconfig.h 20 Jan 2004 09:29:13 -0000 1.28 +++ acconfig.h 28 Apr 2004 21:16:42 -0000 @@ -165,3 +165,9 @@ /* nativefile */ #undef GDB_NM_FILE + +/* Define to 1 so gets a definition of anon_hdl. Works + around a problem on IRIX 5. */ +#ifndef _KMEMUSER +#undef _KMEMUSER +#endif Index: configure.in =================================================================== RCS file: /cvs/src/src/gdb/configure.in,v retrieving revision 1.151 diff -u -r1.151 configure.in --- configure.in 25 Apr 2004 20:42:45 -0000 1.151 +++ configure.in 28 Apr 2004 21:16:44 -0000 @@ -632,7 +632,10 @@ *-*-solaris2.[[6789]]) AC_DEFINE(NEW_PROC_API) ;; - esac + mips-sgi-irix5*) + AC_DEFINE([_KMEMUSER], 1) + ;; + esac fi if test "$ac_cv_header_sys_procfs_h" = yes; then --------------010007000306030005080308--