diff options
Diffstat (limited to 'sysdeps/unix')
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/termios.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/termios.h | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/bits/termios.h | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/bits/termios.h | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/bits/termios.h | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/speed.c | 4 |
6 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/termios.h b/sysdeps/unix/sysv/linux/alpha/bits/termios.h index bfd64ee99a..13e17b7b43 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/termios.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/termios.h @@ -150,6 +150,8 @@ struct termios #define B3500000 00035 #define B4000000 00036 +#define __MAX_BAUD B4000000 + #define CSIZE 00001400 #define CS5 00000000 #define CS6 00000400 diff --git a/sysdeps/unix/sysv/linux/bits/termios.h b/sysdeps/unix/sysv/linux/bits/termios.h index a5ba1d258b..c978e1d1d1 100644 --- a/sysdeps/unix/sysv/linux/bits/termios.h +++ b/sysdeps/unix/sysv/linux/bits/termios.h @@ -165,6 +165,7 @@ struct termios #define B3000000 0010015 #define B3500000 0010016 #define B4000000 0010017 +#define __MAX_BAUD B4000000 #ifdef __USE_MISC # define CIBAUD 002003600000 /* input baud rate (not used) */ # define CRTSCTS 020000000000 /* flow control */ diff --git a/sysdeps/unix/sysv/linux/mips/bits/termios.h b/sysdeps/unix/sysv/linux/mips/bits/termios.h index f7abe474df..ca6b648548 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/termios.h +++ b/sysdeps/unix/sysv/linux/mips/bits/termios.h @@ -214,6 +214,7 @@ struct termios # define B3000000 0010015 # define B3500000 0010016 # define B4000000 0010017 +# define __MAX_BAUD B4000000 # define CIBAUD 002003600000 /* input baud rate (not used) */ # define CRTSCTS 020000000000 /* flow control */ #endif diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h index 648d9ab62b..85bd16203f 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/termios.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/termios.h @@ -151,6 +151,7 @@ struct termios { #define B3000000 00034 #define B3500000 00035 #define B4000000 00036 +#define __MAX_BAUD B4000000 #define CSIZE 00001400 #define CS5 00000000 diff --git a/sysdeps/unix/sysv/linux/sparc/bits/termios.h b/sysdeps/unix/sysv/linux/sparc/bits/termios.h index 14ff7b76a9..a454717092 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/termios.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/termios.h @@ -156,6 +156,7 @@ struct termios #define B1152000 0x0000100d #define B1500000 0x0000100e #define B2000000 0x0000100f +#define __MAX_BAUD B2000000 #define CIBAUD 0x100f0000 /* input baud rate (not used) */ #define CMSPAR 0x40000000 /* mark or space (stick) parity */ diff --git a/sysdeps/unix/sysv/linux/speed.c b/sysdeps/unix/sysv/linux/speed.c index 075c01de3f..96ae27c82f 100644 --- a/sysdeps/unix/sysv/linux/speed.c +++ b/sysdeps/unix/sysv/linux/speed.c @@ -60,7 +60,7 @@ cfsetospeed (termios_p, speed) speed_t speed; { if ((speed & ~CBAUD) != 0 - && (speed < B57600 || speed > B4000000)) + && (speed < B57600 || speed > __MAX_BAUD)) { __set_errno (EINVAL); return -1; @@ -82,7 +82,7 @@ cfsetispeed (termios_p, speed) speed_t speed; { if ((speed & ~CBAUD) != 0 - && (speed < B57600 || speed > B4000000)) + && (speed < B57600 || speed > __MAX_BAUD)) { __set_errno (EINVAL); return -1; |