Re: [PATCH] makecontext.3: Fix function declarator with empty parentheses.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* 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




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux