WIP/RFC patch for Linux termios overhaul

H. Peter Anvin hpa@zytor.com
Wed Mar 26 00:19:44 GMT 2025


On 3/25/25 13:40, H. Peter Anvin wrote:
> It is not even tested, never mind productized, but I would love to get 
> some feedback on this approach and implementation.
> 
> https://git.zytor.com/linux/glibc.git/commit/?h=hpa/termios
> 
>      -hpa
> 

My biggest confusion at this point is the libc_hidden_proto () 
definitions in <include/termios.h>:

/* Now define the internal interfaces.  */
extern int __tcgetattr (int __fd, struct termios *__termios_p);
extern int __tcsetattr (int __fd, int __optional_actions,
                         const struct termios *__termios_p);

extern int __libc_tcdrain (int __fd);

libc_hidden_proto (__tcgetattr)
libc_hidden_proto (tcsetattr)
libc_hidden_proto (cfsetispeed)
libc_hidden_proto (cfsetospeed)

This seems... random?! which ones are declared that way?

The result in my case is that the alias symbols for cfset[io]speed() end 
up marked hidden in libc.a, whereas cfget[io]speed() are not. This seems 
broken...

	-hpa



More information about the Libc-alpha mailing list