public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "Arfrever.FTA at GMail dot Com" <sourceware-bugzilla@sourceware.org>
To: glibc-bugs@sourceware.org
Subject: [Bug libc/28938] New: [csky, microblaze, or1k, powerpc] typedef for greg_t missing in sys/ucontext.h on some architectures
Date: Thu, 03 Mar 2022 14:19:52 +0000	[thread overview]
Message-ID: <bug-28938-131@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=28938

            Bug ID: 28938
           Summary: [csky, microblaze, or1k, powerpc] typedef for greg_t
                    missing in sys/ucontext.h on some architectures
           Product: glibc
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: unassigned at sourceware dot org
          Reporter: Arfrever.FTA at GMail dot Com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

Original bug report: https://bugs.gentoo.org/834450

> In file included from include/libucontext/libucontext.h:5,
>                  from arch/ppc/makecontext.c:19:
> include/libucontext/bits.h:8:9: error: unknown type name 'greg_t'
>     8 | typedef greg_t libucontext_greg_t;
>       |         ^~~~~~


In glibc 2.35:

The following sys/ucontext.h files define both greg_t and gregset_t:

sysdeps/arm/sys/ucontext.h
sysdeps/i386/sys/ucontext.h
sysdeps/m68k/sys/ucontext.h
sysdeps/mips/sys/ucontext.h
sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h
sysdeps/unix/sysv/linux/alpha/sys/ucontext.h
sysdeps/unix/sysv/linux/arm/sys/ucontext.h
sysdeps/unix/sysv/linux/hppa/sys/ucontext.h
sysdeps/unix/sysv/linux/m68k/sys/ucontext.h
sysdeps/unix/sysv/linux/mips/sys/ucontext.h
sysdeps/unix/sysv/linux/riscv/sys/ucontext.h
sysdeps/unix/sysv/linux/s390/sys/ucontext.h
sysdeps/unix/sysv/linux/sh/sys/ucontext.h
sysdeps/unix/sysv/linux/sparc/sys/ucontext.h
sysdeps/unix/sysv/linux/x86/sys/ucontext.h

The following sys/ucontext.h files define gregset_t, but not greg_t:

sysdeps/unix/sysv/linux/csky/sys/ucontext.h
sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h

The following sys/ucontext.h files do not define greg_t or gregset_t:

sysdeps/generic/sys/ucontext.h
sysdeps/unix/sysv/linux/arc/sys/ucontext.h
sysdeps/unix/sysv/linux/ia64/sys/ucontext.h
sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h
sysdeps/unix/sysv/linux/nios2/sys/ucontext.h
sysdeps/unix/sysv/linux/or1k/sys/ucontext.h


In musl, sys/ucontext.h includes ucontext.h, which includes signal.h, which
includes bits/signal.h.

In musl, the following bits/signal.h files define greg_t and gregset_t:

arch/aarch64/bits/signal.h
arch/arm/bits/signal.h
arch/i386/bits/signal.h
arch/m68k/bits/signal.h
arch/microblaze/bits/signal.h
arch/mips/bits/signal.h
arch/mips64/bits/signal.h
arch/mipsn32/bits/signal.h
arch/or1k/bits/signal.h
arch/powerpc/bits/signal.h
arch/powerpc64/bits/signal.h
arch/riscv64/bits/signal.h
arch/s390x/bits/signal.h
arch/sh/bits/signal.h
arch/x32/bits/signal.h
arch/x86_64/bits/signal.h


In glibc, typedef for greg_t needs to be added at least in:

sysdeps/unix/sysv/linux/powerpc/sys/ucontext.h
  (In musl, in arch/powerpc/bits/signal.h: 'typedef unsigned long greg_t,
gregset_t[48]')
  (In musl, in arch/powerpc64/bits/signal.h: 'typedef unsigned long greg_t,
gregset_t[48]')

And probably also in:

sysdeps/unix/sysv/linux/csky/sys/ucontext.h
  (Not supported by musl, but 'typedef unsigned long greg_t' seems obvious.)
sysdeps/unix/sysv/linux/microblaze/sys/ucontext.h
  (In musl: 'typedef unsigned long greg_t, gregset_t[38]')
sysdeps/unix/sysv/linux/or1k/sys/ucontext.h
  (In musl: 'typedef unsigned long greg_t, gregset_t[34]')

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-03-03 14:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-03 14:19 Arfrever.FTA at GMail dot Com [this message]
2022-03-03 15:05 ` [Bug libc/28938] " schwab@linux-m68k.org
2022-03-03 16:24 ` sam at gentoo dot org
2022-06-30  2:16 ` matoro_bugzilla_glibc at matoro dot tk

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=bug-28938-131@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).