1b8a62b91Sopenharmony_ciuse crate::backend; 2b8a62b91Sopenharmony_ci#[cfg(not(any( 3b8a62b91Sopenharmony_ci target_os = "dragonfly", 4b8a62b91Sopenharmony_ci target_os = "freebsd", 5b8a62b91Sopenharmony_ci target_os = "haiku", 6b8a62b91Sopenharmony_ci target_os = "ios", 7b8a62b91Sopenharmony_ci target_os = "macos", 8b8a62b91Sopenharmony_ci target_os = "netbsd", 9b8a62b91Sopenharmony_ci target_os = "openbsd", 10b8a62b91Sopenharmony_ci target_os = "solaris", 11b8a62b91Sopenharmony_ci)))] 12b8a62b91Sopenharmony_cipub use backend::termios::types::B1000000; 13b8a62b91Sopenharmony_ci#[cfg(not(any( 14b8a62b91Sopenharmony_ci target_os = "dragonfly", 15b8a62b91Sopenharmony_ci target_os = "freebsd", 16b8a62b91Sopenharmony_ci target_os = "haiku", 17b8a62b91Sopenharmony_ci target_os = "ios", 18b8a62b91Sopenharmony_ci target_os = "macos", 19b8a62b91Sopenharmony_ci target_os = "netbsd", 20b8a62b91Sopenharmony_ci target_os = "openbsd", 21b8a62b91Sopenharmony_ci target_os = "solaris", 22b8a62b91Sopenharmony_ci)))] 23b8a62b91Sopenharmony_cipub use backend::termios::types::B1152000; 24b8a62b91Sopenharmony_ci#[cfg(not(any( 25b8a62b91Sopenharmony_ci target_os = "dragonfly", 26b8a62b91Sopenharmony_ci target_os = "freebsd", 27b8a62b91Sopenharmony_ci target_os = "haiku", 28b8a62b91Sopenharmony_ci target_os = "ios", 29b8a62b91Sopenharmony_ci target_os = "macos", 30b8a62b91Sopenharmony_ci target_os = "netbsd", 31b8a62b91Sopenharmony_ci target_os = "openbsd", 32b8a62b91Sopenharmony_ci target_os = "solaris", 33b8a62b91Sopenharmony_ci)))] 34b8a62b91Sopenharmony_cipub use backend::termios::types::B1500000; 35b8a62b91Sopenharmony_ci#[cfg(not(any( 36b8a62b91Sopenharmony_ci target_os = "dragonfly", 37b8a62b91Sopenharmony_ci target_os = "freebsd", 38b8a62b91Sopenharmony_ci target_os = "haiku", 39b8a62b91Sopenharmony_ci target_os = "ios", 40b8a62b91Sopenharmony_ci target_os = "macos", 41b8a62b91Sopenharmony_ci target_os = "netbsd", 42b8a62b91Sopenharmony_ci target_os = "openbsd", 43b8a62b91Sopenharmony_ci target_os = "solaris", 44b8a62b91Sopenharmony_ci)))] 45b8a62b91Sopenharmony_cipub use backend::termios::types::B2000000; 46b8a62b91Sopenharmony_ci#[cfg(not(any( 47b8a62b91Sopenharmony_ci target_arch = "sparc", 48b8a62b91Sopenharmony_ci target_arch = "sparc64", 49b8a62b91Sopenharmony_ci target_os = "dragonfly", 50b8a62b91Sopenharmony_ci target_os = "freebsd", 51b8a62b91Sopenharmony_ci target_os = "haiku", 52b8a62b91Sopenharmony_ci target_os = "ios", 53b8a62b91Sopenharmony_ci target_os = "macos", 54b8a62b91Sopenharmony_ci target_os = "netbsd", 55b8a62b91Sopenharmony_ci target_os = "openbsd", 56b8a62b91Sopenharmony_ci target_os = "solaris", 57b8a62b91Sopenharmony_ci)))] 58b8a62b91Sopenharmony_cipub use backend::termios::types::B2500000; 59b8a62b91Sopenharmony_ci#[cfg(not(any( 60b8a62b91Sopenharmony_ci target_arch = "sparc", 61b8a62b91Sopenharmony_ci target_arch = "sparc64", 62b8a62b91Sopenharmony_ci target_os = "dragonfly", 63b8a62b91Sopenharmony_ci target_os = "freebsd", 64b8a62b91Sopenharmony_ci target_os = "haiku", 65b8a62b91Sopenharmony_ci target_os = "ios", 66b8a62b91Sopenharmony_ci target_os = "macos", 67b8a62b91Sopenharmony_ci target_os = "netbsd", 68b8a62b91Sopenharmony_ci target_os = "openbsd", 69b8a62b91Sopenharmony_ci target_os = "solaris", 70b8a62b91Sopenharmony_ci)))] 71b8a62b91Sopenharmony_cipub use backend::termios::types::B3000000; 72b8a62b91Sopenharmony_ci#[cfg(not(any( 73b8a62b91Sopenharmony_ci target_arch = "sparc", 74b8a62b91Sopenharmony_ci target_arch = "sparc64", 75b8a62b91Sopenharmony_ci target_os = "dragonfly", 76b8a62b91Sopenharmony_ci target_os = "freebsd", 77b8a62b91Sopenharmony_ci target_os = "haiku", 78b8a62b91Sopenharmony_ci target_os = "ios", 79b8a62b91Sopenharmony_ci target_os = "macos", 80b8a62b91Sopenharmony_ci target_os = "netbsd", 81b8a62b91Sopenharmony_ci target_os = "openbsd", 82b8a62b91Sopenharmony_ci target_os = "solaris", 83b8a62b91Sopenharmony_ci)))] 84b8a62b91Sopenharmony_cipub use backend::termios::types::B3500000; 85b8a62b91Sopenharmony_ci#[cfg(not(any( 86b8a62b91Sopenharmony_ci target_arch = "sparc", 87b8a62b91Sopenharmony_ci target_arch = "sparc64", 88b8a62b91Sopenharmony_ci target_os = "dragonfly", 89b8a62b91Sopenharmony_ci target_os = "freebsd", 90b8a62b91Sopenharmony_ci target_os = "haiku", 91b8a62b91Sopenharmony_ci target_os = "ios", 92b8a62b91Sopenharmony_ci target_os = "macos", 93b8a62b91Sopenharmony_ci target_os = "netbsd", 94b8a62b91Sopenharmony_ci target_os = "openbsd", 95b8a62b91Sopenharmony_ci target_os = "solaris", 96b8a62b91Sopenharmony_ci)))] 97b8a62b91Sopenharmony_cipub use backend::termios::types::B4000000; 98b8a62b91Sopenharmony_ci#[cfg(not(any( 99b8a62b91Sopenharmony_ci target_os = "dragonfly", 100b8a62b91Sopenharmony_ci target_os = "haiku", 101b8a62b91Sopenharmony_ci target_os = "ios", 102b8a62b91Sopenharmony_ci target_os = "macos", 103b8a62b91Sopenharmony_ci target_os = "openbsd" 104b8a62b91Sopenharmony_ci)))] 105b8a62b91Sopenharmony_cipub use backend::termios::types::B460800; 106b8a62b91Sopenharmony_ci#[cfg(not(any( 107b8a62b91Sopenharmony_ci target_os = "dragonfly", 108b8a62b91Sopenharmony_ci target_os = "freebsd", 109b8a62b91Sopenharmony_ci target_os = "haiku", 110b8a62b91Sopenharmony_ci target_os = "illumos", 111b8a62b91Sopenharmony_ci target_os = "ios", 112b8a62b91Sopenharmony_ci target_os = "macos", 113b8a62b91Sopenharmony_ci target_os = "netbsd", 114b8a62b91Sopenharmony_ci target_os = "openbsd", 115b8a62b91Sopenharmony_ci target_os = "solaris", 116b8a62b91Sopenharmony_ci)))] 117b8a62b91Sopenharmony_cipub use backend::termios::types::B500000; 118b8a62b91Sopenharmony_ci#[cfg(not(any( 119b8a62b91Sopenharmony_ci target_os = "dragonfly", 120b8a62b91Sopenharmony_ci target_os = "freebsd", 121b8a62b91Sopenharmony_ci target_os = "haiku", 122b8a62b91Sopenharmony_ci target_os = "illumos", 123b8a62b91Sopenharmony_ci target_os = "ios", 124b8a62b91Sopenharmony_ci target_os = "macos", 125b8a62b91Sopenharmony_ci target_os = "netbsd", 126b8a62b91Sopenharmony_ci target_os = "openbsd", 127b8a62b91Sopenharmony_ci target_os = "solaris", 128b8a62b91Sopenharmony_ci)))] 129b8a62b91Sopenharmony_cipub use backend::termios::types::B576000; 130b8a62b91Sopenharmony_ci#[cfg(not(any( 131b8a62b91Sopenharmony_ci target_os = "dragonfly", 132b8a62b91Sopenharmony_ci target_os = "haiku", 133b8a62b91Sopenharmony_ci target_os = "ios", 134b8a62b91Sopenharmony_ci target_os = "macos", 135b8a62b91Sopenharmony_ci target_os = "openbsd" 136b8a62b91Sopenharmony_ci)))] 137b8a62b91Sopenharmony_cipub use backend::termios::types::B921600; 138b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 139b8a62b91Sopenharmony_cipub use backend::termios::types::BRKINT; 140b8a62b91Sopenharmony_ci#[cfg(not(any( 141b8a62b91Sopenharmony_ci target_os = "dragonfly", 142b8a62b91Sopenharmony_ci target_os = "freebsd", 143b8a62b91Sopenharmony_ci target_os = "fuchsia", 144b8a62b91Sopenharmony_ci target_os = "illumos", 145b8a62b91Sopenharmony_ci target_os = "ios", 146b8a62b91Sopenharmony_ci target_os = "macos", 147b8a62b91Sopenharmony_ci target_os = "netbsd", 148b8a62b91Sopenharmony_ci target_os = "openbsd", 149b8a62b91Sopenharmony_ci target_os = "redox", 150b8a62b91Sopenharmony_ci target_os = "solaris", 151b8a62b91Sopenharmony_ci)))] 152b8a62b91Sopenharmony_cipub use backend::termios::types::BS0; 153b8a62b91Sopenharmony_ci#[cfg(not(any( 154b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 155b8a62b91Sopenharmony_ci target_os = "dragonfly", 156b8a62b91Sopenharmony_ci target_os = "emscripten", 157b8a62b91Sopenharmony_ci target_os = "freebsd", 158b8a62b91Sopenharmony_ci target_os = "fuchsia", 159b8a62b91Sopenharmony_ci target_os = "illumos", 160b8a62b91Sopenharmony_ci target_os = "ios", 161b8a62b91Sopenharmony_ci target_os = "macos", 162b8a62b91Sopenharmony_ci target_os = "netbsd", 163b8a62b91Sopenharmony_ci target_os = "openbsd", 164b8a62b91Sopenharmony_ci target_os = "redox", 165b8a62b91Sopenharmony_ci target_os = "solaris", 166b8a62b91Sopenharmony_ci)))] 167b8a62b91Sopenharmony_cipub use backend::termios::types::BS1; 168b8a62b91Sopenharmony_ci#[cfg(not(any( 169b8a62b91Sopenharmony_ci target_os = "dragonfly", 170b8a62b91Sopenharmony_ci target_os = "freebsd", 171b8a62b91Sopenharmony_ci target_os = "illumos", 172b8a62b91Sopenharmony_ci target_os = "ios", 173b8a62b91Sopenharmony_ci target_os = "macos", 174b8a62b91Sopenharmony_ci target_os = "netbsd", 175b8a62b91Sopenharmony_ci target_os = "openbsd", 176b8a62b91Sopenharmony_ci target_os = "redox", 177b8a62b91Sopenharmony_ci target_os = "solaris", 178b8a62b91Sopenharmony_ci)))] 179b8a62b91Sopenharmony_cipub use backend::termios::types::BSDLY; 180b8a62b91Sopenharmony_ci#[cfg(not(any( 181b8a62b91Sopenharmony_ci target_os = "dragonfly", 182b8a62b91Sopenharmony_ci target_os = "freebsd", 183b8a62b91Sopenharmony_ci target_os = "haiku", 184b8a62b91Sopenharmony_ci target_os = "ios", 185b8a62b91Sopenharmony_ci target_os = "macos", 186b8a62b91Sopenharmony_ci target_os = "netbsd", 187b8a62b91Sopenharmony_ci target_os = "openbsd", 188b8a62b91Sopenharmony_ci target_os = "redox", 189b8a62b91Sopenharmony_ci)))] 190b8a62b91Sopenharmony_cipub use backend::termios::types::CBAUD; 191b8a62b91Sopenharmony_ci#[cfg(not(any( 192b8a62b91Sopenharmony_ci target_os = "dragonfly", 193b8a62b91Sopenharmony_ci target_os = "freebsd", 194b8a62b91Sopenharmony_ci target_os = "haiku", 195b8a62b91Sopenharmony_ci target_os = "illumos", 196b8a62b91Sopenharmony_ci target_os = "ios", 197b8a62b91Sopenharmony_ci target_os = "macos", 198b8a62b91Sopenharmony_ci target_os = "netbsd", 199b8a62b91Sopenharmony_ci target_os = "openbsd", 200b8a62b91Sopenharmony_ci target_os = "redox", 201b8a62b91Sopenharmony_ci target_os = "solaris", 202b8a62b91Sopenharmony_ci)))] 203b8a62b91Sopenharmony_cipub use backend::termios::types::CBAUDEX; 204b8a62b91Sopenharmony_ci#[cfg(not(any( 205b8a62b91Sopenharmony_ci target_os = "dragonfly", 206b8a62b91Sopenharmony_ci target_os = "emscripten", 207b8a62b91Sopenharmony_ci target_os = "freebsd", 208b8a62b91Sopenharmony_ci target_os = "haiku", 209b8a62b91Sopenharmony_ci target_os = "ios", 210b8a62b91Sopenharmony_ci target_os = "macos", 211b8a62b91Sopenharmony_ci target_os = "netbsd", 212b8a62b91Sopenharmony_ci target_os = "openbsd", 213b8a62b91Sopenharmony_ci target_os = "redox", 214b8a62b91Sopenharmony_ci)))] 215b8a62b91Sopenharmony_cipub use backend::termios::types::CIBAUD; 216b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 217b8a62b91Sopenharmony_cipub use backend::termios::types::CLOCAL; 218b8a62b91Sopenharmony_ci#[cfg(not(any( 219b8a62b91Sopenharmony_ci target_os = "dragonfly", 220b8a62b91Sopenharmony_ci target_os = "emscripten", 221b8a62b91Sopenharmony_ci target_os = "freebsd", 222b8a62b91Sopenharmony_ci target_os = "haiku", 223b8a62b91Sopenharmony_ci target_os = "illumos", 224b8a62b91Sopenharmony_ci target_os = "ios", 225b8a62b91Sopenharmony_ci target_os = "macos", 226b8a62b91Sopenharmony_ci target_os = "netbsd", 227b8a62b91Sopenharmony_ci target_os = "openbsd", 228b8a62b91Sopenharmony_ci target_os = "redox", 229b8a62b91Sopenharmony_ci target_os = "solaris", 230b8a62b91Sopenharmony_ci)))] 231b8a62b91Sopenharmony_cipub use backend::termios::types::CMSPAR; 232b8a62b91Sopenharmony_ci#[cfg(not(any( 233b8a62b91Sopenharmony_ci target_os = "dragonfly", 234b8a62b91Sopenharmony_ci target_os = "freebsd", 235b8a62b91Sopenharmony_ci target_os = "fuchsia", 236b8a62b91Sopenharmony_ci target_os = "illumos", 237b8a62b91Sopenharmony_ci target_os = "ios", 238b8a62b91Sopenharmony_ci target_os = "macos", 239b8a62b91Sopenharmony_ci target_os = "netbsd", 240b8a62b91Sopenharmony_ci target_os = "openbsd", 241b8a62b91Sopenharmony_ci target_os = "redox", 242b8a62b91Sopenharmony_ci target_os = "solaris", 243b8a62b91Sopenharmony_ci)))] 244b8a62b91Sopenharmony_cipub use backend::termios::types::CR0; 245b8a62b91Sopenharmony_ci#[cfg(not(any( 246b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 247b8a62b91Sopenharmony_ci target_os = "dragonfly", 248b8a62b91Sopenharmony_ci target_os = "emscripten", 249b8a62b91Sopenharmony_ci target_os = "freebsd", 250b8a62b91Sopenharmony_ci target_os = "fuchsia", 251b8a62b91Sopenharmony_ci target_os = "illumos", 252b8a62b91Sopenharmony_ci target_os = "ios", 253b8a62b91Sopenharmony_ci target_os = "macos", 254b8a62b91Sopenharmony_ci target_os = "netbsd", 255b8a62b91Sopenharmony_ci target_os = "openbsd", 256b8a62b91Sopenharmony_ci target_os = "redox", 257b8a62b91Sopenharmony_ci target_os = "solaris", 258b8a62b91Sopenharmony_ci)))] 259b8a62b91Sopenharmony_cipub use backend::termios::types::CR1; 260b8a62b91Sopenharmony_ci#[cfg(not(any( 261b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 262b8a62b91Sopenharmony_ci target_os = "dragonfly", 263b8a62b91Sopenharmony_ci target_os = "emscripten", 264b8a62b91Sopenharmony_ci target_os = "freebsd", 265b8a62b91Sopenharmony_ci target_os = "fuchsia", 266b8a62b91Sopenharmony_ci target_os = "illumos", 267b8a62b91Sopenharmony_ci target_os = "ios", 268b8a62b91Sopenharmony_ci target_os = "macos", 269b8a62b91Sopenharmony_ci target_os = "netbsd", 270b8a62b91Sopenharmony_ci target_os = "openbsd", 271b8a62b91Sopenharmony_ci target_os = "redox", 272b8a62b91Sopenharmony_ci target_os = "solaris", 273b8a62b91Sopenharmony_ci)))] 274b8a62b91Sopenharmony_cipub use backend::termios::types::CR2; 275b8a62b91Sopenharmony_ci#[cfg(not(any( 276b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 277b8a62b91Sopenharmony_ci target_os = "dragonfly", 278b8a62b91Sopenharmony_ci target_os = "emscripten", 279b8a62b91Sopenharmony_ci target_os = "freebsd", 280b8a62b91Sopenharmony_ci target_os = "fuchsia", 281b8a62b91Sopenharmony_ci target_os = "illumos", 282b8a62b91Sopenharmony_ci target_os = "ios", 283b8a62b91Sopenharmony_ci target_os = "macos", 284b8a62b91Sopenharmony_ci target_os = "netbsd", 285b8a62b91Sopenharmony_ci target_os = "openbsd", 286b8a62b91Sopenharmony_ci target_os = "redox", 287b8a62b91Sopenharmony_ci target_os = "solaris", 288b8a62b91Sopenharmony_ci)))] 289b8a62b91Sopenharmony_cipub use backend::termios::types::CR3; 290b8a62b91Sopenharmony_ci#[cfg(not(any( 291b8a62b91Sopenharmony_ci target_os = "dragonfly", 292b8a62b91Sopenharmony_ci target_os = "freebsd", 293b8a62b91Sopenharmony_ci target_os = "illumos", 294b8a62b91Sopenharmony_ci target_os = "ios", 295b8a62b91Sopenharmony_ci target_os = "macos", 296b8a62b91Sopenharmony_ci target_os = "netbsd", 297b8a62b91Sopenharmony_ci target_os = "openbsd", 298b8a62b91Sopenharmony_ci target_os = "redox", 299b8a62b91Sopenharmony_ci target_os = "solaris", 300b8a62b91Sopenharmony_ci)))] 301b8a62b91Sopenharmony_cipub use backend::termios::types::CRDLY; 302b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 303b8a62b91Sopenharmony_cipub use backend::termios::types::CREAD; 304b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] 305b8a62b91Sopenharmony_cipub use backend::termios::types::CRTSCTS; 306b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 307b8a62b91Sopenharmony_cipub use backend::termios::types::CS5; 308b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 309b8a62b91Sopenharmony_cipub use backend::termios::types::CS6; 310b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 311b8a62b91Sopenharmony_cipub use backend::termios::types::CS7; 312b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 313b8a62b91Sopenharmony_cipub use backend::termios::types::CS8; 314b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 315b8a62b91Sopenharmony_cipub use backend::termios::types::CSIZE; 316b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 317b8a62b91Sopenharmony_cipub use backend::termios::types::CSTOPB; 318b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 319b8a62b91Sopenharmony_cipub use backend::termios::types::ECHO; 320b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] 321b8a62b91Sopenharmony_cipub use backend::termios::types::ECHOCTL; 322b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 323b8a62b91Sopenharmony_cipub use backend::termios::types::ECHOE; 324b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 325b8a62b91Sopenharmony_cipub use backend::termios::types::ECHOK; 326b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] 327b8a62b91Sopenharmony_cipub use backend::termios::types::ECHOKE; 328b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 329b8a62b91Sopenharmony_cipub use backend::termios::types::ECHONL; 330b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] 331b8a62b91Sopenharmony_cipub use backend::termios::types::ECHOPRT; 332b8a62b91Sopenharmony_ci#[cfg(not(any( 333b8a62b91Sopenharmony_ci target_os = "emscripten", 334b8a62b91Sopenharmony_ci target_os = "haiku", 335b8a62b91Sopenharmony_ci target_os = "illumos", 336b8a62b91Sopenharmony_ci target_os = "ios", 337b8a62b91Sopenharmony_ci target_os = "macos", 338b8a62b91Sopenharmony_ci target_os = "redox", 339b8a62b91Sopenharmony_ci target_os = "solaris", 340b8a62b91Sopenharmony_ci)))] 341b8a62b91Sopenharmony_cipub use backend::termios::types::EXTA; 342b8a62b91Sopenharmony_ci#[cfg(not(any( 343b8a62b91Sopenharmony_ci target_os = "emscripten", 344b8a62b91Sopenharmony_ci target_os = "haiku", 345b8a62b91Sopenharmony_ci target_os = "illumos", 346b8a62b91Sopenharmony_ci target_os = "ios", 347b8a62b91Sopenharmony_ci target_os = "macos", 348b8a62b91Sopenharmony_ci target_os = "redox", 349b8a62b91Sopenharmony_ci target_os = "solaris", 350b8a62b91Sopenharmony_ci)))] 351b8a62b91Sopenharmony_cipub use backend::termios::types::EXTB; 352b8a62b91Sopenharmony_ci#[cfg(not(any( 353b8a62b91Sopenharmony_ci target_os = "haiku", 354b8a62b91Sopenharmony_ci target_os = "ios", 355b8a62b91Sopenharmony_ci target_os = "macos", 356b8a62b91Sopenharmony_ci target_os = "redox" 357b8a62b91Sopenharmony_ci)))] 358b8a62b91Sopenharmony_cipub use backend::termios::types::EXTPROC; 359b8a62b91Sopenharmony_ci#[cfg(not(any( 360b8a62b91Sopenharmony_ci target_os = "dragonfly", 361b8a62b91Sopenharmony_ci target_os = "freebsd", 362b8a62b91Sopenharmony_ci target_os = "fuchsia", 363b8a62b91Sopenharmony_ci target_os = "illumos", 364b8a62b91Sopenharmony_ci target_os = "ios", 365b8a62b91Sopenharmony_ci target_os = "macos", 366b8a62b91Sopenharmony_ci target_os = "netbsd", 367b8a62b91Sopenharmony_ci target_os = "openbsd", 368b8a62b91Sopenharmony_ci target_os = "redox", 369b8a62b91Sopenharmony_ci target_os = "solaris", 370b8a62b91Sopenharmony_ci)))] 371b8a62b91Sopenharmony_cipub use backend::termios::types::FF0; 372b8a62b91Sopenharmony_ci#[cfg(not(any( 373b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 374b8a62b91Sopenharmony_ci target_os = "dragonfly", 375b8a62b91Sopenharmony_ci target_os = "emscripten", 376b8a62b91Sopenharmony_ci target_os = "freebsd", 377b8a62b91Sopenharmony_ci target_os = "fuchsia", 378b8a62b91Sopenharmony_ci target_os = "illumos", 379b8a62b91Sopenharmony_ci target_os = "ios", 380b8a62b91Sopenharmony_ci target_os = "macos", 381b8a62b91Sopenharmony_ci target_os = "netbsd", 382b8a62b91Sopenharmony_ci target_os = "openbsd", 383b8a62b91Sopenharmony_ci target_os = "redox", 384b8a62b91Sopenharmony_ci target_os = "solaris", 385b8a62b91Sopenharmony_ci)))] 386b8a62b91Sopenharmony_cipub use backend::termios::types::FF1; 387b8a62b91Sopenharmony_ci#[cfg(not(any( 388b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 389b8a62b91Sopenharmony_ci target_os = "dragonfly", 390b8a62b91Sopenharmony_ci target_os = "freebsd", 391b8a62b91Sopenharmony_ci target_os = "illumos", 392b8a62b91Sopenharmony_ci target_os = "ios", 393b8a62b91Sopenharmony_ci target_os = "macos", 394b8a62b91Sopenharmony_ci target_os = "netbsd", 395b8a62b91Sopenharmony_ci target_os = "openbsd", 396b8a62b91Sopenharmony_ci target_os = "redox", 397b8a62b91Sopenharmony_ci target_os = "solaris", 398b8a62b91Sopenharmony_ci)))] 399b8a62b91Sopenharmony_cipub use backend::termios::types::FFDLY; 400b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] 401b8a62b91Sopenharmony_cipub use backend::termios::types::FLUSHO; 402b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 403b8a62b91Sopenharmony_cipub use backend::termios::types::HUPCL; 404b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 405b8a62b91Sopenharmony_cipub use backend::termios::types::ICRNL; 406b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 407b8a62b91Sopenharmony_cipub use backend::termios::types::IEXTEN; 408b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 409b8a62b91Sopenharmony_cipub use backend::termios::types::IGNBRK; 410b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 411b8a62b91Sopenharmony_cipub use backend::termios::types::IGNCR; 412b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 413b8a62b91Sopenharmony_cipub use backend::termios::types::IGNPAR; 414b8a62b91Sopenharmony_ci#[cfg(not(any( 415b8a62b91Sopenharmony_ci target_os = "haiku", 416b8a62b91Sopenharmony_ci target_os = "ios", 417b8a62b91Sopenharmony_ci target_os = "macos", 418b8a62b91Sopenharmony_ci target_os = "redox" 419b8a62b91Sopenharmony_ci)))] 420b8a62b91Sopenharmony_cipub use backend::termios::types::IMAXBEL; 421b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 422b8a62b91Sopenharmony_cipub use backend::termios::types::INLCR; 423b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 424b8a62b91Sopenharmony_cipub use backend::termios::types::INPCK; 425b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 426b8a62b91Sopenharmony_cipub use backend::termios::types::ISIG; 427b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 428b8a62b91Sopenharmony_cipub use backend::termios::types::ISTRIP; 429b8a62b91Sopenharmony_ci#[cfg(any( 430b8a62b91Sopenharmony_ci linux_raw, 431b8a62b91Sopenharmony_ci all( 432b8a62b91Sopenharmony_ci libc, 433b8a62b91Sopenharmony_ci any(target_os = "haiku", target_os = "illumos", target_os = "solaris"), 434b8a62b91Sopenharmony_ci ) 435b8a62b91Sopenharmony_ci))] 436b8a62b91Sopenharmony_cipub use backend::termios::types::IUCLC; 437b8a62b91Sopenharmony_ci#[cfg(not(any( 438b8a62b91Sopenharmony_ci target_os = "dragonfly", 439b8a62b91Sopenharmony_ci target_os = "emscripten", 440b8a62b91Sopenharmony_ci target_os = "freebsd", 441b8a62b91Sopenharmony_ci target_os = "haiku", 442b8a62b91Sopenharmony_ci target_os = "illumos", 443b8a62b91Sopenharmony_ci target_os = "ios", 444b8a62b91Sopenharmony_ci target_os = "macos", 445b8a62b91Sopenharmony_ci target_os = "netbsd", 446b8a62b91Sopenharmony_ci target_os = "openbsd", 447b8a62b91Sopenharmony_ci target_os = "redox", 448b8a62b91Sopenharmony_ci target_os = "solaris", 449b8a62b91Sopenharmony_ci)))] 450b8a62b91Sopenharmony_cipub use backend::termios::types::IUTF8; 451b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] 452b8a62b91Sopenharmony_cipub use backend::termios::types::IXANY; 453b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 454b8a62b91Sopenharmony_cipub use backend::termios::types::IXOFF; 455b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 456b8a62b91Sopenharmony_cipub use backend::termios::types::IXON; 457b8a62b91Sopenharmony_ci#[cfg(not(any( 458b8a62b91Sopenharmony_ci target_os = "dragonfly", 459b8a62b91Sopenharmony_ci target_os = "freebsd", 460b8a62b91Sopenharmony_ci target_os = "fuchsia", 461b8a62b91Sopenharmony_ci target_os = "illumos", 462b8a62b91Sopenharmony_ci target_os = "ios", 463b8a62b91Sopenharmony_ci target_os = "macos", 464b8a62b91Sopenharmony_ci target_os = "netbsd", 465b8a62b91Sopenharmony_ci target_os = "openbsd", 466b8a62b91Sopenharmony_ci target_os = "redox", 467b8a62b91Sopenharmony_ci target_os = "solaris", 468b8a62b91Sopenharmony_ci)))] 469b8a62b91Sopenharmony_cipub use backend::termios::types::NL0; 470b8a62b91Sopenharmony_ci#[cfg(not(any( 471b8a62b91Sopenharmony_ci target_os = "dragonfly", 472b8a62b91Sopenharmony_ci target_os = "freebsd", 473b8a62b91Sopenharmony_ci target_os = "fuchsia", 474b8a62b91Sopenharmony_ci target_os = "illumos", 475b8a62b91Sopenharmony_ci target_os = "ios", 476b8a62b91Sopenharmony_ci target_os = "macos", 477b8a62b91Sopenharmony_ci target_os = "netbsd", 478b8a62b91Sopenharmony_ci target_os = "openbsd", 479b8a62b91Sopenharmony_ci target_os = "redox", 480b8a62b91Sopenharmony_ci target_os = "solaris", 481b8a62b91Sopenharmony_ci)))] 482b8a62b91Sopenharmony_cipub use backend::termios::types::NL1; 483b8a62b91Sopenharmony_ci#[cfg(not(any( 484b8a62b91Sopenharmony_ci target_os = "dragonfly", 485b8a62b91Sopenharmony_ci target_os = "freebsd", 486b8a62b91Sopenharmony_ci target_os = "illumos", 487b8a62b91Sopenharmony_ci target_os = "ios", 488b8a62b91Sopenharmony_ci target_os = "macos", 489b8a62b91Sopenharmony_ci target_os = "netbsd", 490b8a62b91Sopenharmony_ci target_os = "openbsd", 491b8a62b91Sopenharmony_ci target_os = "redox", 492b8a62b91Sopenharmony_ci target_os = "solaris", 493b8a62b91Sopenharmony_ci)))] 494b8a62b91Sopenharmony_cipub use backend::termios::types::NLDLY; 495b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 496b8a62b91Sopenharmony_cipub use backend::termios::types::NOFLSH; 497b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 498b8a62b91Sopenharmony_cipub use backend::termios::types::OCRNL; 499b8a62b91Sopenharmony_ci#[cfg(not(any( 500b8a62b91Sopenharmony_ci target_os = "dragonfly", 501b8a62b91Sopenharmony_ci target_os = "freebsd", 502b8a62b91Sopenharmony_ci target_os = "ios", 503b8a62b91Sopenharmony_ci target_os = "macos", 504b8a62b91Sopenharmony_ci target_os = "netbsd", 505b8a62b91Sopenharmony_ci target_os = "openbsd", 506b8a62b91Sopenharmony_ci)))] 507b8a62b91Sopenharmony_cipub use backend::termios::types::OFDEL; 508b8a62b91Sopenharmony_ci#[cfg(not(any( 509b8a62b91Sopenharmony_ci target_os = "dragonfly", 510b8a62b91Sopenharmony_ci target_os = "freebsd", 511b8a62b91Sopenharmony_ci target_os = "ios", 512b8a62b91Sopenharmony_ci target_os = "macos", 513b8a62b91Sopenharmony_ci target_os = "netbsd", 514b8a62b91Sopenharmony_ci target_os = "openbsd", 515b8a62b91Sopenharmony_ci)))] 516b8a62b91Sopenharmony_cipub use backend::termios::types::OFILL; 517b8a62b91Sopenharmony_ci#[cfg(not(any( 518b8a62b91Sopenharmony_ci target_os = "dragonfly", 519b8a62b91Sopenharmony_ci target_os = "freebsd", 520b8a62b91Sopenharmony_ci target_os = "ios", 521b8a62b91Sopenharmony_ci target_os = "macos", 522b8a62b91Sopenharmony_ci target_os = "netbsd", 523b8a62b91Sopenharmony_ci target_os = "redox", 524b8a62b91Sopenharmony_ci)))] 525b8a62b91Sopenharmony_cipub use backend::termios::types::OLCUC; 526b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 527b8a62b91Sopenharmony_cipub use backend::termios::types::ONLCR; 528b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 529b8a62b91Sopenharmony_cipub use backend::termios::types::ONLRET; 530b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 531b8a62b91Sopenharmony_cipub use backend::termios::types::ONOCR; 532b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 533b8a62b91Sopenharmony_cipub use backend::termios::types::OPOST; 534b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 535b8a62b91Sopenharmony_cipub use backend::termios::types::PARENB; 536b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 537b8a62b91Sopenharmony_cipub use backend::termios::types::PARMRK; 538b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 539b8a62b91Sopenharmony_cipub use backend::termios::types::PARODD; 540b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "redox")))] 541b8a62b91Sopenharmony_cipub use backend::termios::types::PENDIN; 542b8a62b91Sopenharmony_ci#[cfg(not(any( 543b8a62b91Sopenharmony_ci target_os = "dragonfly", 544b8a62b91Sopenharmony_ci target_os = "fuchsia", 545b8a62b91Sopenharmony_ci target_os = "illumos", 546b8a62b91Sopenharmony_ci target_os = "ios", 547b8a62b91Sopenharmony_ci target_os = "macos", 548b8a62b91Sopenharmony_ci target_os = "netbsd", 549b8a62b91Sopenharmony_ci target_os = "openbsd", 550b8a62b91Sopenharmony_ci target_os = "redox", 551b8a62b91Sopenharmony_ci target_os = "solaris", 552b8a62b91Sopenharmony_ci)))] 553b8a62b91Sopenharmony_cipub use backend::termios::types::TAB0; 554b8a62b91Sopenharmony_ci#[cfg(not(any( 555b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 556b8a62b91Sopenharmony_ci target_os = "dragonfly", 557b8a62b91Sopenharmony_ci target_os = "emscripten", 558b8a62b91Sopenharmony_ci target_os = "freebsd", 559b8a62b91Sopenharmony_ci target_os = "fuchsia", 560b8a62b91Sopenharmony_ci target_os = "illumos", 561b8a62b91Sopenharmony_ci target_os = "ios", 562b8a62b91Sopenharmony_ci target_os = "macos", 563b8a62b91Sopenharmony_ci target_os = "netbsd", 564b8a62b91Sopenharmony_ci target_os = "openbsd", 565b8a62b91Sopenharmony_ci target_os = "redox", 566b8a62b91Sopenharmony_ci target_os = "solaris", 567b8a62b91Sopenharmony_ci)))] 568b8a62b91Sopenharmony_cipub use backend::termios::types::TAB1; 569b8a62b91Sopenharmony_ci#[cfg(not(any( 570b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 571b8a62b91Sopenharmony_ci target_os = "dragonfly", 572b8a62b91Sopenharmony_ci target_os = "emscripten", 573b8a62b91Sopenharmony_ci target_os = "freebsd", 574b8a62b91Sopenharmony_ci target_os = "fuchsia", 575b8a62b91Sopenharmony_ci target_os = "illumos", 576b8a62b91Sopenharmony_ci target_os = "ios", 577b8a62b91Sopenharmony_ci target_os = "macos", 578b8a62b91Sopenharmony_ci target_os = "netbsd", 579b8a62b91Sopenharmony_ci target_os = "openbsd", 580b8a62b91Sopenharmony_ci target_os = "redox", 581b8a62b91Sopenharmony_ci target_os = "solaris", 582b8a62b91Sopenharmony_ci)))] 583b8a62b91Sopenharmony_cipub use backend::termios::types::TAB2; 584b8a62b91Sopenharmony_ci#[cfg(not(any( 585b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 586b8a62b91Sopenharmony_ci target_os = "dragonfly", 587b8a62b91Sopenharmony_ci target_os = "emscripten", 588b8a62b91Sopenharmony_ci target_os = "fuchsia", 589b8a62b91Sopenharmony_ci target_os = "illumos", 590b8a62b91Sopenharmony_ci target_os = "ios", 591b8a62b91Sopenharmony_ci target_os = "macos", 592b8a62b91Sopenharmony_ci target_os = "netbsd", 593b8a62b91Sopenharmony_ci target_os = "openbsd", 594b8a62b91Sopenharmony_ci target_os = "redox", 595b8a62b91Sopenharmony_ci target_os = "solaris", 596b8a62b91Sopenharmony_ci)))] 597b8a62b91Sopenharmony_cipub use backend::termios::types::TAB3; 598b8a62b91Sopenharmony_ci#[cfg(not(any( 599b8a62b91Sopenharmony_ci target_os = "dragonfly", 600b8a62b91Sopenharmony_ci target_os = "ios", 601b8a62b91Sopenharmony_ci target_os = "macos", 602b8a62b91Sopenharmony_ci target_os = "netbsd", 603b8a62b91Sopenharmony_ci target_os = "openbsd", 604b8a62b91Sopenharmony_ci target_os = "illumos", 605b8a62b91Sopenharmony_ci target_os = "redox", 606b8a62b91Sopenharmony_ci target_os = "solaris", 607b8a62b91Sopenharmony_ci)))] 608b8a62b91Sopenharmony_cipub use backend::termios::types::TABDLY; 609b8a62b91Sopenharmony_ci#[cfg(not(any(target_os = "ios", target_os = "macos")))] 610b8a62b91Sopenharmony_cipub use backend::termios::types::TOSTOP; 611b8a62b91Sopenharmony_ci#[cfg(not(any( 612b8a62b91Sopenharmony_ci target_os = "dragonfly", 613b8a62b91Sopenharmony_ci target_os = "freebsd", 614b8a62b91Sopenharmony_ci target_os = "haiku", 615b8a62b91Sopenharmony_ci target_os = "illumos", 616b8a62b91Sopenharmony_ci target_os = "ios", 617b8a62b91Sopenharmony_ci target_os = "macos", 618b8a62b91Sopenharmony_ci target_os = "netbsd", 619b8a62b91Sopenharmony_ci target_os = "openbsd", 620b8a62b91Sopenharmony_ci target_os = "solaris", 621b8a62b91Sopenharmony_ci)))] 622b8a62b91Sopenharmony_cipub use backend::termios::types::VSWTC; 623b8a62b91Sopenharmony_ci#[cfg(not(any( 624b8a62b91Sopenharmony_ci target_os = "dragonfly", 625b8a62b91Sopenharmony_ci target_os = "freebsd", 626b8a62b91Sopenharmony_ci target_os = "fuchsia", 627b8a62b91Sopenharmony_ci target_os = "illumos", 628b8a62b91Sopenharmony_ci target_os = "ios", 629b8a62b91Sopenharmony_ci target_os = "macos", 630b8a62b91Sopenharmony_ci target_os = "netbsd", 631b8a62b91Sopenharmony_ci target_os = "openbsd", 632b8a62b91Sopenharmony_ci target_os = "redox", 633b8a62b91Sopenharmony_ci target_os = "solaris", 634b8a62b91Sopenharmony_ci)))] 635b8a62b91Sopenharmony_cipub use backend::termios::types::VT0; 636b8a62b91Sopenharmony_ci#[cfg(not(any( 637b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 638b8a62b91Sopenharmony_ci target_os = "dragonfly", 639b8a62b91Sopenharmony_ci target_os = "emscripten", 640b8a62b91Sopenharmony_ci target_os = "freebsd", 641b8a62b91Sopenharmony_ci target_os = "fuchsia", 642b8a62b91Sopenharmony_ci target_os = "illumos", 643b8a62b91Sopenharmony_ci target_os = "ios", 644b8a62b91Sopenharmony_ci target_os = "macos", 645b8a62b91Sopenharmony_ci target_os = "netbsd", 646b8a62b91Sopenharmony_ci target_os = "openbsd", 647b8a62b91Sopenharmony_ci target_os = "redox", 648b8a62b91Sopenharmony_ci target_os = "solaris", 649b8a62b91Sopenharmony_ci)))] 650b8a62b91Sopenharmony_cipub use backend::termios::types::VT1; 651b8a62b91Sopenharmony_ci#[cfg(not(any( 652b8a62b91Sopenharmony_ci all(libc, target_env = "musl"), 653b8a62b91Sopenharmony_ci target_os = "dragonfly", 654b8a62b91Sopenharmony_ci target_os = "freebsd", 655b8a62b91Sopenharmony_ci target_os = "illumos", 656b8a62b91Sopenharmony_ci target_os = "ios", 657b8a62b91Sopenharmony_ci target_os = "macos", 658b8a62b91Sopenharmony_ci target_os = "netbsd", 659b8a62b91Sopenharmony_ci target_os = "openbsd", 660b8a62b91Sopenharmony_ci target_os = "redox", 661b8a62b91Sopenharmony_ci target_os = "solaris", 662b8a62b91Sopenharmony_ci)))] 663b8a62b91Sopenharmony_cipub use backend::termios::types::VTDLY; 664b8a62b91Sopenharmony_ci#[cfg(any(linux_raw, all(libc, any(target_arch = "s390x", target_os = "haiku"))))] 665b8a62b91Sopenharmony_cipub use backend::termios::types::XCASE; 666b8a62b91Sopenharmony_ci#[cfg(not(any( 667b8a62b91Sopenharmony_ci target_os = "dragonfly", 668b8a62b91Sopenharmony_ci target_os = "freebsd", 669b8a62b91Sopenharmony_ci target_os = "haiku", 670b8a62b91Sopenharmony_ci target_os = "illumos", 671b8a62b91Sopenharmony_ci target_os = "ios", 672b8a62b91Sopenharmony_ci target_os = "macos", 673b8a62b91Sopenharmony_ci target_os = "netbsd", 674b8a62b91Sopenharmony_ci target_os = "openbsd", 675b8a62b91Sopenharmony_ci target_os = "redox", 676b8a62b91Sopenharmony_ci target_os = "solaris", 677b8a62b91Sopenharmony_ci)))] 678b8a62b91Sopenharmony_cipub use backend::termios::types::XTABS; 679b8a62b91Sopenharmony_cipub use backend::termios::types::{ 680b8a62b91Sopenharmony_ci B0, B110, B115200, B1200, B134, B150, B1800, B19200, B200, B230400, B2400, B300, B38400, B4800, 681b8a62b91Sopenharmony_ci B50, B57600, B600, B75, B9600, ICANON, VEOF, VEOL, VEOL2, VERASE, VINTR, VKILL, VMIN, VQUIT, 682b8a62b91Sopenharmony_ci VSTART, VSTOP, VSUSP, VTIME, 683b8a62b91Sopenharmony_ci}; 684b8a62b91Sopenharmony_ci#[cfg(not(target_os = "haiku"))] 685b8a62b91Sopenharmony_cipub use backend::termios::types::{VDISCARD, VLNEXT, VREPRINT, VWERASE}; 686b8a62b91Sopenharmony_ci 687b8a62b91Sopenharmony_ci/// Translate from a `Speed` code to a speed value `u32`. 688b8a62b91Sopenharmony_ci/// 689b8a62b91Sopenharmony_ci/// ```rust 690b8a62b91Sopenharmony_ci/// let speed = rustix::termios::speed_value(rustix::termios::B57600); 691b8a62b91Sopenharmony_ci/// assert_eq!(speed, Some(57600)); 692b8a62b91Sopenharmony_ci/// ``` 693b8a62b91Sopenharmony_cipub fn speed_value(speed: backend::termios::types::Speed) -> Option<u32> { 694b8a62b91Sopenharmony_ci match speed { 695b8a62b91Sopenharmony_ci backend::termios::types::B0 => Some(0), 696b8a62b91Sopenharmony_ci backend::termios::types::B50 => Some(50), 697b8a62b91Sopenharmony_ci backend::termios::types::B75 => Some(75), 698b8a62b91Sopenharmony_ci backend::termios::types::B110 => Some(110), 699b8a62b91Sopenharmony_ci backend::termios::types::B134 => Some(134), 700b8a62b91Sopenharmony_ci backend::termios::types::B150 => Some(150), 701b8a62b91Sopenharmony_ci backend::termios::types::B200 => Some(200), 702b8a62b91Sopenharmony_ci backend::termios::types::B300 => Some(300), 703b8a62b91Sopenharmony_ci backend::termios::types::B600 => Some(600), 704b8a62b91Sopenharmony_ci backend::termios::types::B1200 => Some(1200), 705b8a62b91Sopenharmony_ci backend::termios::types::B1800 => Some(1800), 706b8a62b91Sopenharmony_ci backend::termios::types::B2400 => Some(2400), 707b8a62b91Sopenharmony_ci backend::termios::types::B4800 => Some(4800), 708b8a62b91Sopenharmony_ci backend::termios::types::B9600 => Some(9600), 709b8a62b91Sopenharmony_ci backend::termios::types::B19200 => Some(19200), 710b8a62b91Sopenharmony_ci backend::termios::types::B38400 => Some(38400), 711b8a62b91Sopenharmony_ci backend::termios::types::B57600 => Some(57600), 712b8a62b91Sopenharmony_ci backend::termios::types::B115200 => Some(115_200), 713b8a62b91Sopenharmony_ci backend::termios::types::B230400 => Some(230_400), 714b8a62b91Sopenharmony_ci #[cfg(not(any( 715b8a62b91Sopenharmony_ci target_os = "dragonfly", 716b8a62b91Sopenharmony_ci target_os = "haiku", 717b8a62b91Sopenharmony_ci target_os = "ios", 718b8a62b91Sopenharmony_ci target_os = "macos", 719b8a62b91Sopenharmony_ci target_os = "openbsd" 720b8a62b91Sopenharmony_ci )))] 721b8a62b91Sopenharmony_ci backend::termios::types::B460800 => Some(460_800), 722b8a62b91Sopenharmony_ci #[cfg(not(any( 723b8a62b91Sopenharmony_ci target_os = "dragonfly", 724b8a62b91Sopenharmony_ci target_os = "freebsd", 725b8a62b91Sopenharmony_ci target_os = "haiku", 726b8a62b91Sopenharmony_ci target_os = "illumos", 727b8a62b91Sopenharmony_ci target_os = "ios", 728b8a62b91Sopenharmony_ci target_os = "macos", 729b8a62b91Sopenharmony_ci target_os = "netbsd", 730b8a62b91Sopenharmony_ci target_os = "openbsd", 731b8a62b91Sopenharmony_ci target_os = "solaris", 732b8a62b91Sopenharmony_ci )))] 733b8a62b91Sopenharmony_ci backend::termios::types::B500000 => Some(500_000), 734b8a62b91Sopenharmony_ci #[cfg(not(any( 735b8a62b91Sopenharmony_ci target_os = "dragonfly", 736b8a62b91Sopenharmony_ci target_os = "freebsd", 737b8a62b91Sopenharmony_ci target_os = "haiku", 738b8a62b91Sopenharmony_ci target_os = "illumos", 739b8a62b91Sopenharmony_ci target_os = "ios", 740b8a62b91Sopenharmony_ci target_os = "macos", 741b8a62b91Sopenharmony_ci target_os = "netbsd", 742b8a62b91Sopenharmony_ci target_os = "openbsd", 743b8a62b91Sopenharmony_ci target_os = "solaris", 744b8a62b91Sopenharmony_ci )))] 745b8a62b91Sopenharmony_ci backend::termios::types::B576000 => Some(576_000), 746b8a62b91Sopenharmony_ci #[cfg(not(any( 747b8a62b91Sopenharmony_ci target_os = "dragonfly", 748b8a62b91Sopenharmony_ci target_os = "haiku", 749b8a62b91Sopenharmony_ci target_os = "ios", 750b8a62b91Sopenharmony_ci target_os = "macos", 751b8a62b91Sopenharmony_ci target_os = "openbsd" 752b8a62b91Sopenharmony_ci )))] 753b8a62b91Sopenharmony_ci backend::termios::types::B921600 => Some(921_600), 754b8a62b91Sopenharmony_ci #[cfg(not(any( 755b8a62b91Sopenharmony_ci target_os = "dragonfly", 756b8a62b91Sopenharmony_ci target_os = "freebsd", 757b8a62b91Sopenharmony_ci target_os = "haiku", 758b8a62b91Sopenharmony_ci target_os = "ios", 759b8a62b91Sopenharmony_ci target_os = "macos", 760b8a62b91Sopenharmony_ci target_os = "netbsd", 761b8a62b91Sopenharmony_ci target_os = "openbsd", 762b8a62b91Sopenharmony_ci target_os = "solaris", 763b8a62b91Sopenharmony_ci )))] 764b8a62b91Sopenharmony_ci backend::termios::types::B1000000 => Some(1_000_000), 765b8a62b91Sopenharmony_ci #[cfg(not(any( 766b8a62b91Sopenharmony_ci target_os = "dragonfly", 767b8a62b91Sopenharmony_ci target_os = "freebsd", 768b8a62b91Sopenharmony_ci target_os = "haiku", 769b8a62b91Sopenharmony_ci target_os = "ios", 770b8a62b91Sopenharmony_ci target_os = "macos", 771b8a62b91Sopenharmony_ci target_os = "netbsd", 772b8a62b91Sopenharmony_ci target_os = "openbsd", 773b8a62b91Sopenharmony_ci target_os = "solaris", 774b8a62b91Sopenharmony_ci )))] 775b8a62b91Sopenharmony_ci backend::termios::types::B1152000 => Some(1_152_000), 776b8a62b91Sopenharmony_ci #[cfg(not(any( 777b8a62b91Sopenharmony_ci target_os = "dragonfly", 778b8a62b91Sopenharmony_ci target_os = "freebsd", 779b8a62b91Sopenharmony_ci target_os = "haiku", 780b8a62b91Sopenharmony_ci target_os = "ios", 781b8a62b91Sopenharmony_ci target_os = "macos", 782b8a62b91Sopenharmony_ci target_os = "netbsd", 783b8a62b91Sopenharmony_ci target_os = "openbsd", 784b8a62b91Sopenharmony_ci target_os = "solaris", 785b8a62b91Sopenharmony_ci )))] 786b8a62b91Sopenharmony_ci backend::termios::types::B1500000 => Some(1_500_000), 787b8a62b91Sopenharmony_ci #[cfg(not(any( 788b8a62b91Sopenharmony_ci target_os = "dragonfly", 789b8a62b91Sopenharmony_ci target_os = "freebsd", 790b8a62b91Sopenharmony_ci target_os = "haiku", 791b8a62b91Sopenharmony_ci target_os = "ios", 792b8a62b91Sopenharmony_ci target_os = "macos", 793b8a62b91Sopenharmony_ci target_os = "netbsd", 794b8a62b91Sopenharmony_ci target_os = "openbsd", 795b8a62b91Sopenharmony_ci target_os = "solaris", 796b8a62b91Sopenharmony_ci )))] 797b8a62b91Sopenharmony_ci backend::termios::types::B2000000 => Some(2_000_000), 798b8a62b91Sopenharmony_ci #[cfg(not(any( 799b8a62b91Sopenharmony_ci target_arch = "sparc", 800b8a62b91Sopenharmony_ci target_arch = "sparc64", 801b8a62b91Sopenharmony_ci target_os = "dragonfly", 802b8a62b91Sopenharmony_ci target_os = "freebsd", 803b8a62b91Sopenharmony_ci target_os = "haiku", 804b8a62b91Sopenharmony_ci target_os = "ios", 805b8a62b91Sopenharmony_ci target_os = "macos", 806b8a62b91Sopenharmony_ci target_os = "netbsd", 807b8a62b91Sopenharmony_ci target_os = "openbsd", 808b8a62b91Sopenharmony_ci target_os = "solaris", 809b8a62b91Sopenharmony_ci )))] 810b8a62b91Sopenharmony_ci backend::termios::types::B2500000 => Some(2_500_000), 811b8a62b91Sopenharmony_ci #[cfg(not(any( 812b8a62b91Sopenharmony_ci target_arch = "sparc", 813b8a62b91Sopenharmony_ci target_arch = "sparc64", 814b8a62b91Sopenharmony_ci target_os = "dragonfly", 815b8a62b91Sopenharmony_ci target_os = "freebsd", 816b8a62b91Sopenharmony_ci target_os = "haiku", 817b8a62b91Sopenharmony_ci target_os = "ios", 818b8a62b91Sopenharmony_ci target_os = "macos", 819b8a62b91Sopenharmony_ci target_os = "netbsd", 820b8a62b91Sopenharmony_ci target_os = "openbsd", 821b8a62b91Sopenharmony_ci target_os = "solaris", 822b8a62b91Sopenharmony_ci )))] 823b8a62b91Sopenharmony_ci backend::termios::types::B3000000 => Some(3_000_000), 824b8a62b91Sopenharmony_ci #[cfg(not(any( 825b8a62b91Sopenharmony_ci target_arch = "sparc", 826b8a62b91Sopenharmony_ci target_arch = "sparc64", 827b8a62b91Sopenharmony_ci target_os = "dragonfly", 828b8a62b91Sopenharmony_ci target_os = "freebsd", 829b8a62b91Sopenharmony_ci target_os = "haiku", 830b8a62b91Sopenharmony_ci target_os = "ios", 831b8a62b91Sopenharmony_ci target_os = "macos", 832b8a62b91Sopenharmony_ci target_os = "netbsd", 833b8a62b91Sopenharmony_ci target_os = "openbsd", 834b8a62b91Sopenharmony_ci target_os = "solaris", 835b8a62b91Sopenharmony_ci )))] 836b8a62b91Sopenharmony_ci backend::termios::types::B3500000 => Some(3_500_000), 837b8a62b91Sopenharmony_ci #[cfg(not(any( 838b8a62b91Sopenharmony_ci target_arch = "sparc", 839b8a62b91Sopenharmony_ci target_arch = "sparc64", 840b8a62b91Sopenharmony_ci target_os = "dragonfly", 841b8a62b91Sopenharmony_ci target_os = "freebsd", 842b8a62b91Sopenharmony_ci target_os = "haiku", 843b8a62b91Sopenharmony_ci target_os = "ios", 844b8a62b91Sopenharmony_ci target_os = "macos", 845b8a62b91Sopenharmony_ci target_os = "netbsd", 846b8a62b91Sopenharmony_ci target_os = "openbsd", 847b8a62b91Sopenharmony_ci target_os = "solaris", 848b8a62b91Sopenharmony_ci )))] 849b8a62b91Sopenharmony_ci backend::termios::types::B4000000 => Some(4_000_000), 850b8a62b91Sopenharmony_ci _ => None, 851b8a62b91Sopenharmony_ci } 852b8a62b91Sopenharmony_ci} 853