Linux Manual Pages development
 help / color / mirror / Atom feed
From: Guillem Jover <guillem@debian.org>
To: linux-man@vger.kernel.org, libc-alpha@sourceware.org
Cc: "Alejandro Colomar" <alx@kernel.org>, "Pali Rohár" <pali@kernel.org>
Subject: On <asm/termbits.h> and <asm/termios.h> usage in man pages
Date: Sun, 16 Aug 2026 13:54:24 +0200	[thread overview]
Message-ID: <aoGk8FSBlwYAmvu8@thunder.hadrons.org> (raw)

Hi!

I was just refreshing my mind about documentation around TIOCGWINSZ,
and noticed the weird <asm/termbits.h> and <asm/termios.h> usage in
various ioctl man pages.

These originate from commit c023614536251bd6b47a0eab45ab3bcfd2ad9ec2,
where it states that the «struct termios» definitions in the
<termios.h> header are incompatible with the defined ioctl calls.

This seems problematic, for one because the <asm/*> headers are Linux
specific, so they reduce portability for all these macros, even when
they do not rely or make use of «struct termios». For another because if
there is a problem in glibc with the interaction between «struct termios»
and the ioctl calls, then that should be fixed in glibc, instead of
adding these workarounds in the man pages.

It seems the problem is that in glibc «struct termios» maps to the Linux
«struct termios2», but the macros for ioctls that use «struct termios»
do not match (for example TCGETS instead of TCGETS2)?


I think this should be fixed both in glibc, to make the definitions
coherent, and in man-pages to not use those Linux-only headers where
it is not necessary and then on a second stage to point back to the
portable headers once glibc has been fixed?

Thanks,
Guillem

             reply	other threads:[~2026-08-16 12:08 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-16 11:54 Guillem Jover [this message]
2026-08-16 12:06 ` On <asm/termbits.h> and <asm/termios.h> usage in man pages Andreas Schwab
2026-08-16 12:15 ` Pali Rohár
2026-08-16 13:03   ` Adhemerval Zanella Netto
2026-08-16 13:19     ` Pali Rohár
2026-08-16 19:49       ` H. Peter Anvin
2026-08-16 20:11         ` H. Peter Anvin
2026-08-17  9:03         ` Alejandro Colomar
2026-08-17  9:23           ` H. Peter Anvin
2026-08-17  9:53             ` Alejandro Colomar

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=aoGk8FSBlwYAmvu8@thunder.hadrons.org \
    --to=guillem@debian.org \
    --cc=alx@kernel.org \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-man@vger.kernel.org \
    --cc=pali@kernel.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