Re: On C99, C11, and other dialects

Steffen Nurpmeso <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <20260422144546.XR94n6jR@steffen%sdaoden.eu>
Ian Collier via Mutt-dev wrote in
 <[email protected]>:
 |On Tue, Apr 21, 2026 at 11:35:38PM +0200, Alejandro Colomar via Mutt-dev \
 |wrote:
 |> And here's the one from the Linux man-pages project:
 |> 
 |>  SYNOPSIS
 |>       #include <signal.h>
 |> 
 |>       typedef typeof(void (int))  *sighandler_t;
 |> 
 |>       sighandler_t signal(int signum, sighandler_t handler);
 |
 |> The latter still uses typeof() --even if it also uses typedef-- for
 |> reasons similar to malloc_T().  If we didn't use typeof() in that
 |> typedef definition, it would become quite unreadable.
 |
 |typedef void (*sighandler_t) (int);
 |
 |It doesn't seem that unreadable and it's also shorter (although
 |declaring pointers to functions is tricky for the uninitiated).

Me too.  (I do not understand easily the other one really.)

 |Indeed, the man page for sigaction(2) still uses that style of
 |definition on my system [man-pages-6.13].
 |
 |Ian Collier.
 |
 |PS incidentally I don't have signal(3 anything) on my system - sections \
 |2 and 7
 |only.

Very much luckily so my Linux distribution bundles both in one:

  source=(https://www.kernel.org/pub/linux/docs/$name/$name-$version.tar.xz
      https://www.kernel.org/pub/linux/docs/$name/$name-posix/$name-posix-2017-a.tar.xz)

I think Alejandro himself has problems with licenses, for bundling
out-of-the-box i mean.

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.