#include <termios/termios.h>
#ifndef _ISOMAC
-/* Now define the internal interfaces. */
+extern speed_t __cfgetospeed (const struct termios *__termios_p);
+extern speed_t __cfgetispeed (const struct termios *__termios_p);
+extern int __cfsetospeed (struct termios *__termios_p, speed_t __speed);
+extern int __cfsetispeed (struct termios *__termios_p, speed_t __speed);
+extern int __cfsetspeed (struct termios *__termios_p, speed_t __speed);
+
+extern baud_t __cfgetobaud (const struct termios *__termios_p);
+extern baud_t __cfgetibaud (const struct termios *__termios_p);
+extern int __cfsetobaud (struct termios *__termios_p, baud_t __baud);
+extern int __cfsetibaud (struct termios *__termios_p, baud_t __baud);
+extern int __cfsetbaud (struct termios *__termios_p, baud_t __baud);
+
extern int __tcgetattr (int __fd, struct termios *__termios_p);
extern int __tcsetattr (int __fd, int __optional_actions,
const struct termios *__termios_p);
libc_hidden_proto (__tcgetattr)
libc_hidden_proto (__tcsetattr)
-libc_hidden_proto (cfsetispeed)
-libc_hidden_proto (cfsetospeed)
+libc_hidden_proto (__cfgetispeed)
+libc_hidden_proto (__cfgetospeed)
+libc_hidden_proto (__cfsetispeed)
+libc_hidden_proto (__cfsetospeed)
+libc_hidden_proto (__cfsetspeed)
+libc_hidden_proto (__cfgetibaud)
+libc_hidden_proto (__cfgetobaud)
+libc_hidden_proto (__cfsetibaud)
+libc_hidden_proto (__cfsetobaud)
+libc_hidden_proto (__cfsetbaud)
#endif
#endif
values entirely. This is only meaningful in a call to @code{tcsetattr}.
The @code{c_cflag} member and the line speed values returned by
-@code{cfgetispeed} and @code{cfgetospeed} will be unaffected by the
-call. @code{CIGNORE} is useful if you want to set all the software
-modes in the other members, but leave the hardware details in
-@code{c_cflag} unchanged. (This is how the @code{TCSASOFT} flag to
-@code{tcsettattr} works.)
+@code{cfgetispeed}, @code{cfgetospeed}, @code{cfgetibaud} and
+@code{cfsetibaud} will be unaffected by the call. @code{CIGNORE} is
+useful if you want to set all the software modes in the other members,
+but leave the hardware details in @code{c_cflag} unchanged. (This is
+how the @code{TCSASOFT} flag to @code{tcsettattr} works.)
This bit is never set in the structure filled in by @code{tcgetattr}.
@end deftypevr
represent line speeds.
@end deftp
-The functions @code{cfsetospeed} and @code{cfsetispeed} report errors
-only for speed values that the system simply cannot handle. If you
-specify a speed value that is basically acceptable, then those functions
-will succeed. But they do not check that a particular hardware device
-can actually support the specified speeds---in fact, they don't know
-which device you plan to set the speed for. If you use @code{tcsetattr}
-to set the speed of a particular device to a value that it cannot
-handle, @code{tcsetattr} returns @math{-1}.
+@deftypefun speed_t cfgetospeed (const struct termios *@var{termios-p})
+@standards{POSIX.1, termios.h}
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+@c Direct access to a single termios field, except on Linux, where
+@c multiple accesses may take place. No worries either way, callers
+@c must ensure mutual exclusion on such non-opaque types.
+This function returns the output line speed stored in the structure
+@code{*@var{termios-p}}.
+@end deftypefun
@strong{Portability note:} In @theglibc{}, the functions above
accept speeds measured in bits per second as input, and return speed
alias for @code{B19200} and @code{EXTB} is an alias for @code{B38400}.
These aliases are obsolete.
+@deftypefun baud_t cfgetibaud (const struct termios *@var{termios-p})
+@standards{GNU, termios.h}
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+This function returns the input line baud rate stored in the structure
+@code{*@var{termios-p}}.
+@end deftypefun
+
+@deftypefun int cfsetobaud (struct termios *@var{termios-p}, baud_t @var{baud})
+@standards{GNU, termios.h}
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+This function stores @var{baud} in @code{*@var{termios-p}} as the output
+baud rate. The normal return value is @math{0}; a value of @math{-1}
+indicates an error. If @var{baud} is not a valid baud rate, @code{cfsetobaud}
+returns @math{-1}.
+@end deftypefun
+
+@deftypefun int cfsetibaud (struct termios *@var{termios-p}, baud_t @var{baud})
+@standards{GNU, termios.h}
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+This function stores @var{baud} in @code{*@var{termios-p}} as the input
+baud rate. The normal return value is @math{0}; a value of @math{-1}
+indicates an error. If @var{baud} is not a valid baud rate, @code{cfsetobaud}
+returns @math{-1}.
+@end deftypefun
+
+@deftypefun int cfsetbaud (struct termios *@var{termios-p}, baud_t @var{baud})
+@standards{GNU, termios.h}
+@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
+@c There's no guarantee that the two calls are atomic, but since this is
+@c not an opaque type, callers ought to ensure mutual exclusion to the
+@c termios object.
+
+@c cfsetbaud ok
+@c cfsetibaud ok
+@c cfsetobaud ok
+This function stores @var{baud} in @code{*@var{termios-p}} as both the
+input and output baud rates. The normal return value is @math{0}; a value
+of @math{-1} indicates an error. If @var{baud} is not a valid baud rate,
+@code{cfsetbaud} returns @math{-1}.
+@end deftypefun
+
+@deftp {Data Type} baud_t
+@standards{GNU}
+The @code{baud_t} type is a numeric data type used to represent line
+baud rates. It will always represent the actual numeric value
+representing the baud rate, unlike @code{speed_t}. In the current
+version of @theglibc{} this is the same type as @code{speed_t}, but this
+may not be the case in future versions, or on other implementations; it
+may not even necessarily be an integer type.
+
+@end deftp
+
+The functions @code{cfsetospeed}, @code{cfsetispeed}, @code{cfsetobaud}
+and @code{cfsetibaud} report errors only for speed values that the
+system simply cannot handle. If you specify a speed value that is
+basically acceptable, then those functions will succeed. But they do
+not check that a particular hardware device can actually support the
+specified speeds---in fact, they don't know which device you plan to set
+the speed for. If you use @code{tcsetattr} to set the speed of a
+particular device to a value that it cannot handle, either @code{tcsetattr}
+returns @math{-1}, or the value is adjusted to the closest supported
+value, depending on the policy of the kernel driver.
+
@node Special Characters
@subsection Special Characters
GLIBC_2.41 pthread_sigmask F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
+GLIBC_2.42 cfgetobaud F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 pthread_barrier_destroy F
GLIBC_2.42 pthread_barrier_init F
GLIBC_2.42 pthread_barrier_wait F
GLIBC_2.41 pthread_sigmask F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
+GLIBC_2.42 cfgetobaud F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 pthread_barrier_destroy F
GLIBC_2.42 pthread_barrier_init F
GLIBC_2.42 pthread_barrier_wait F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
return 0;
}
+libc_hidden_def (__cfsetspeed)
versioned_symbol (libc, __cfsetspeed, cfsetspeed, GLIBC_2_42);
#if _TERMIOS_OLD_COMPAT
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
{
return termios_p->c_ospeed;
}
+libc_hidden_def (__cfgetospeed)
versioned_symbol (libc, __cfgetospeed, cfgetospeed, GLIBC_2_42);
/* Return the input baud rate stored in *TERMIOS_P. */
{
return termios_p->c_ispeed;
}
+libc_hidden_def (__cfgetispeed)
versioned_symbol (libc, __cfgetispeed, cfgetispeed, GLIBC_2_42);
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
return 0;
}
+libc_hidden_def (__cfsetospeed)
versioned_symbol (libc, __cfsetospeed, cfsetospeed, GLIBC_2_42);
/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
return 0;
}
+libc_hidden_def (__cfsetispeed)
versioned_symbol (libc, __cfsetispeed, cfsetispeed, GLIBC_2_42);
#if _TERMIOS_OLD_COMPAT
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
GLIBC_2.41 sched_setattr F
GLIBC_2.42 __inet_ntop_chk F
GLIBC_2.42 __inet_pton_chk F
+GLIBC_2.42 cfgetibaud F
GLIBC_2.42 cfgetispeed F
+GLIBC_2.42 cfgetobaud F
GLIBC_2.42 cfgetospeed F
+GLIBC_2.42 cfsetbaud F
+GLIBC_2.42 cfsetibaud F
GLIBC_2.42 cfsetispeed F
+GLIBC_2.42 cfsetobaud F
GLIBC_2.42 cfsetospeed F
GLIBC_2.42 cfsetspeed F
GLIBC_2.42 pthread_gettid_np F
sys/ttydefaults.h sys/termios.h sys/ttychars.h
routines := speed cfsetspeed tcsetattr tcgetattr tcgetpgrp tcsetpgrp \
- tcdrain tcflow tcflush tcsendbrk cfmakeraw tcgetsid
+ tcdrain tcflow tcflush tcsendbrk cfmakeraw tcgetsid \
+ baud cfsetbaud
include ../Rules
# t*
tcgetsid;
}
+ GLIBC_2.42 {
+ # cf*baud
+ cfgetibaud; cfgetobaud; cfsetibaud; cfsetobaud; cfsetbaud;
+ }
}
--- /dev/null
+/* `struct termios' speed frobnication functions, baud rate wrappers.
+ Any platform which doesn't have Bxxx == xxx for all baud rate
+ constants will need to override this file.
+
+ Copyright (C) 1991-2025 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <stddef.h>
+#include <errno.h>
+#include <termios.h>
+
+baud_t
+__cfgetobaud (const struct termios *termios_p)
+{
+ return __cfgetospeed (termios_p);
+}
+libc_hidden_def (__cfgetobaud)
+weak_alias (__cfgetobaud, cfgetobaud)
+
+baud_t
+__cfgetibaud (const struct termios *termios_p)
+{
+ return __cfgetispeed (termios_p);
+}
+libc_hidden_def (__cfgetibaud)
+weak_alias (__cfgetibaud, cfgetibaud)
+
+int
+__cfsetobaud (struct termios *termios_p, baud_t baud)
+{
+ return __cfsetospeed (termios_p, baud);
+}
+libc_hidden_def (__cfsetobaud)
+weak_alias (__cfsetobaud, cfsetobaud)
+
+int
+__cfsetibaud (struct termios *termios_p, baud_t baud)
+{
+ return __cfsetispeed (termios_p, baud);
+}
+libc_hidden_def (__cfsetibaud)
+weak_alias (__cfsetibaud, cfsetibaud)
--- /dev/null
+/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <https://www.gnu.org/licenses/>. */
+
+#include <termios.h>
+#include <errno.h>
+#include <stddef.h>
+
+/* Set both the input and output baud rates stored in *TERMIOS_P to BAUD. */
+int
+__cfsetbaud (struct termios *termios_p, baud_t baud)
+{
+ return __cfsetspeed (termios_p, baud);
+}
+libc_hidden_def (__cfsetbaud)
+weak_alias (__cfsetbaud, cfsetbaud)
/* Set both the input and output baud rates stored in *TERMIOS_P to SPEED. */
int
-cfsetspeed (struct termios *termios_p, speed_t speed)
+__cfsetspeed (struct termios *termios_p, speed_t speed)
{
int rv;
- rv = cfsetospeed (termios_p, speed);
+ rv = __cfsetospeed (termios_p, speed);
if (rv)
return rv;
- return cfsetispeed (termios_p, speed);
+ return __cfsetispeed (termios_p, speed);
}
+libc_hidden_def (__cfsetspeed)
+weak_alias (__cfsetspeed, cfsetspeed)
/* Return the output baud rate stored in *TERMIOS_P. */
speed_t
-cfgetospeed (const struct termios *termios_p)
+__cfgetospeed (const struct termios *termios_p)
{
return termios_p->__ospeed;
}
+libc_hidden_def (__cfgetospeed)
+weak_alias (__cfgetospeed, cfgetospeed)
/* Return the input baud rate stored in *TERMIOS_P. */
speed_t
-cfgetispeed (const struct termios *termios_p)
+__cfgetispeed (const struct termios *termios_p)
{
return termios_p->__ispeed;
}
+libc_hidden_def (__cfgetispeed)
+weak_alias (__cfgetispeed, cfgetispeed)
/* Set the output baud rate stored in *TERMIOS_P to SPEED. */
int
-cfsetospeed (struct termios *termios_p, speed_t speed)
+__cfsetospeed (struct termios *termios_p, speed_t speed)
{
if (termios_p == NULL)
{
termios_p->__ospeed = speed;
return 0;
}
-libc_hidden_def (cfsetospeed)
+libc_hidden_def (__cfsetospeed)
+weak_alias (__cfsetospeed, cfsetospeed)
/* Set the input baud rate stored in *TERMIOS_P to SPEED. */
int
-cfsetispeed (struct termios *termios_p, speed_t speed)
+__cfsetispeed (struct termios *termios_p, speed_t speed)
{
if (termios_p == NULL)
{
termios_p->__ispeed = speed;
return 0;
}
-libc_hidden_def (cfsetispeed)
+libc_hidden_def (__cfsetispeed)
+weak_alias (__cfsetispeed, cfsetispeed)
#ifdef __USE_MISC
/* Set both the input and output baud rates in *TERMIOS_OP to SPEED. */
extern int cfsetspeed (struct termios *__termios_p, speed_t __speed) __THROW;
-#endif
+/* Interfaces that are explicitly numeric representations of baud rates */
+typedef speed_t baud_t;
+
+/* Return the output baud rate stored in *TERMIOS_P. */
+extern baud_t cfgetobaud (const struct termios *__termios_p) __THROW;
+
+/* Return the input baud rate stored in *TERMIOS_P. */
+extern baud_t cfgetibaud (const struct termios *__termios_p) __THROW;
+
+/* Set the output baud rate stored in *TERMIOS_P to BAUD. */
+extern int cfsetobaud (struct termios *__termios_p, baud_t __baud) __THROW;
+
+/* Set the input baud rate stored in *TERMIOS_P to BAUD. */
+extern int cfsetibaud (struct termios *__termios_p, baud_t __baud) __THROW;
+
+/* Set both the input and output baud rates in *TERMIOS_OP to BAUD. */
+extern int cfsetbaud (struct termios *__termios_p, baud_t __baud) __THROW;
+#endif
/* Put the state of FD into *TERMIOS_P. */
extern int tcgetattr (int __fd, struct termios *__termios_p) __THROW;