[PATCH RFC v4 08/11] hurd+generic/termios: make speed_t an unsigned int

Samuel Thibault samuel.thibault@aquilenet.fr
Tue May 13 20:41:13 GMT 2025


H. Peter Anvin, le mar. 13 mai 2025 13:35:47 -0700, a ecrit:
> POSIX requires that speed_t is an unsigned integer type, so change the
> generic speed_t definition to be an unsigned int instead of a plain
> int.
> 
> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>

Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>

> ---
>  bits/termios.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/bits/termios.h b/bits/termios.h
> index 9e3ed8ee7a08..398efa5ddd2f 100644
> --- a/bits/termios.h
> +++ b/bits/termios.h
> @@ -105,7 +105,7 @@ typedef unsigned int tcflag_t;
>  typedef unsigned char cc_t;
>  
>  /* Type of baud rate specifiers.  */
> -typedef int speed_t;
> +typedef unsigned int speed_t;
>  
>  /* Terminal control structure.  */
>  struct termios
> -- 
> 2.49.0


More information about the Libc-alpha mailing list