From: Jeff Bailey <jbailey@raspberryginger.com>
To: Andreas Schwab <schwab@suse.de>
Cc: libc-ports@sources.redhat.com, parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] Re: Duplicate ustat structure
Date: Sun, 16 Jul 2006 10:07:25 -0700 [thread overview]
Message-ID: <20060716170725.GA29459@titanium.v3.ca> (raw)
In-Reply-To: <jeodvpbj2k.fsf@sykes.suse.de>
On Sun, Jul 16, 2006 at 06:39:15PM +0200, Andreas Schwab wrote:
> > The problem is that bits/ustat.h includes the definition of struct
> > ustat. However, sys/types.h eventually winds up pulling in
> > linux/types.h which also defines struct ustat.
>
> <sys/types.h> should not include <linux/types.h> in the first place.
It seems like it ought to now that the kernel is exporting a set of
headers that are intended to be used by userspace. struct ustat is
defined in linux/types.h.
But in general, this is the path by which it gets included:
include/sys/types.h includes thread_db.h
nptl_db/thread_db.h includes procfs.h
ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h includes asm/elf.h for
elf_gregset_t and elf_fpregset_t
asm-parisc/elf.h includes asm/ptrace.h unnecessarily, but relies on it
to pull in linux/types for __u32
asm-parisc/ptrace.h includes linux/types.h for __u64
So the following patch would work instead, but I think this type of fix
used to be right when the kernel folks didn't want to provide userspace
headers. Now that they are doing so, I think it's more correct for us
to use them.
2006-07-16 Jeff Bailey <jbailey@ubuntu.com>
* sysdeps/unix/sysv/linux/hppa/sys/procfs.h: Don't include
elf.h.
Declare elf_greg_t, elf_gregset_t, elf_fpreg_t,
and elf_fpregset_t.
Index: sysdeps/unix/sysv/linux/hppa/sys/procfs.h
===================================================================
RCS file: /cvs/glibc/ports/sysdeps/unix/sysv/linux/hppa/sys/procfs.h,v
retrieving revision 1.2
diff -u -p -r1.2 procfs.h
--- sysdeps/unix/sysv/linux/hppa/sys/procfs.h 6 Jul 2001 04:56:16 -0000 1.2
+++ sysdeps/unix/sysv/linux/hppa/sys/procfs.h 16 Jul 2006 16:57:39 -0000
@@ -34,10 +34,18 @@
#include <sys/types.h>
#include <sys/ucontext.h>
#include <sys/user.h>
-#include <asm/elf.h>
__BEGIN_DECLS
+typedef unsigned long elf_greg_t;
+#define ELF_NGREG 80 /* We only need 64 at present, but leave space
+ for expansion. */
+typedef elf_greg_t elf_gregset_t[ELF_NGREG];
+
+#define ELF_NFPREG 32
+typedef double elf_fpreg_t;
+typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
+
struct elf_siginfo
{
int si_signo; /* Signal number. */
--
I do not agree with a word you say, but I will defend to the death your
right to say it.
- Voltaire
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
next prev parent reply other threads:[~2006-07-16 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-16 16:03 [parisc-linux] Duplicate ustat structure Jeff Bailey
[not found] ` <jeodvpbj2k.fsf@sykes.suse.de>
2006-07-16 17:07 ` Jeff Bailey [this message]
2006-07-16 20:13 ` [parisc-linux] " Carlos O'Donell
2006-07-25 0:47 ` Jeff Bailey
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=20060716170725.GA29459@titanium.v3.ca \
--to=jbailey@raspberryginger.com \
--cc=libc-ports@sources.redhat.com \
--cc=parisc-linux@lists.parisc-linux.org \
--cc=schwab@suse.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