Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <cagney@gnu.org>
To: Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
Cc: gdb-patches@sources.redhat.com
Subject: Re: PATCH: Workaround IRIX 5 compilation problem
Date: Wed, 28 Apr 2004 21:18:00 -0000	[thread overview]
Message-ID: <40901FC3.1080704@gnu.org> (raw)
In-Reply-To: <16525.29805.263020.874731@xayide.TechFak.Uni-Bielefeld.DE>

[-- Attachment #1: Type: text/plain, Size: 568 bytes --]

> This happens because the definition of of anon_hdl in <sys/types.h> 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: <sys/types.h> 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


[-- Attachment #2: diffs --]
[-- Type: text/plain, Size: 1247 bytes --]

2004-04-28  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
	    Andrew Cagney  <cagney@redhat.com>

	* configure.in (mips-sgi-irix5*): Define _KMEMUSER for
	<sys/proc.h>.
	* 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 <sys/proc.h> gets a definition of anon_hdl.  Works
+   around a <sys/proc.h> 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

  reply	other threads:[~2004-04-28 21:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-26 20:43 Rainer Orth
2004-04-28 21:18 ` Andrew Cagney [this message]
2004-04-28 22:47   ` Rainer Orth
2004-04-29  0:08   ` Rainer Orth
2004-04-29 14:30     ` Andrew Cagney
2004-04-29 16:23       ` Rainer Orth

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40901FC3.1080704@gnu.org \
    --to=cagney@gnu.org \
    --cc=gdb-patches@sources.redhat.com \
    --cc=ro@TechFak.Uni-Bielefeld.DE \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox