All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: "Alejandro Colomar (man-pages)" <alx.manpages@gmail.com>
Cc: Zack Weinberg <zackw@panix.com>,
	mtk.manpages@gmail.com, linux-man@vger.kernel.org,
	libc-alpha@sourceware.org
Subject: Re: [PATCH] makecontext.3: Fix function declarator with empty parentheses.
Date: Fri, 05 Mar 2021 11:21:36 +0100	[thread overview]
Message-ID: <8735x9hpe7.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <c5df9263-edb8-c50a-e691-a454d4ae833f@gmail.com> (Alejandro Colomar's message of "Fri, 5 Mar 2021 02:13:52 +0100")

* Alejandro Colomar:

> I did actually mean 'void (*f)(void)'.  Glibc uses that for the
> prototype (as you can see from my commit message (see above)), and as I
> confirmed just now, it also uses that type for the definition of the
> function:
>
> [
> .../glibc$ grep -rn '^makecontext\s*('
> stdlib/makecontext.c:22:makecontext (ucontext_t *ucp, void (*func)
> (void), int argc, ...)
> .../glibc$
> ]
>
> However, I should have read the manual page (I must admit that I only
> read the SYNOPSIS and EXAMPLES sections of the manual page and the glibc
> source before writing the patch).  It's clear that the prototype that
> was being used in the manual page was more correct (in the sense that it
> more accurately represented the actual expected function pointer) than
> the glibc prototype (eventhough the glibc prototype is more standards
> conforming).
>
> So my patch is wrong.
>
> Florian, should I file a bug in glibc's bugzilla?

I don't know.  SUSv2 has (void *func) (), which would make this a glibc
bug.  I'm not sure if I have easy access to POSIX.1 from 2001, which I
believe still has this function.

I am not sure if all glibc implementations of makecontext can be used to
call variadic functions.

Thanks,
Florian


  reply	other threads:[~2021-03-05 10:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-04 19:45 [PATCH] makecontext.3: Fix function declarator with empty parentheses Alejandro Colomar
     [not found] ` <CAKCAbMg3G4EAeuUhN9EQTDnrTSD0sPoH0uH1=kkpfj9qYorPdg@mail.gmail.com>
2021-03-04 21:10   ` Florian Weimer
2021-03-05  1:13     ` Alejandro Colomar (man-pages)
2021-03-05 10:21       ` Florian Weimer [this message]
2021-03-05 10:27         ` Andreas Schwab
2021-03-05 12:48         ` Alejandro Colomar (man-pages)

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=8735x9hpe7.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=alx.manpages@gmail.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=zackw@panix.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.