u-fix-rustix-for-sparc64
authorDebian Rust Maintainers <pkg-rust-maintainers@alioth-lists.debian.net>
Mon, 26 Jun 2023 21:16:27 +0000 (22:16 +0100)
committerJeremy Bícha <jbicha@ubuntu.com>
Mon, 26 Jun 2023 21:16:27 +0000 (22:16 +0100)
Gbp-Pq: Name u-fix-rustix-for-sparc64.patch

vendor/rustix/src/imp/libc/process/types.rs
vendor/rustix/src/imp/libc/termios/types.rs
vendor/rustix/src/imp/linux_raw/termios/types.rs
vendor/rustix/src/termios/constants.rs
vendor/rustix/src/termios/mod.rs
vendor/rustix/tests/time/y2038.rs

index 60d629d810c28440f4beb1e3f4e7b7a43f415a20..a320d991531a31bf3e3574064cb4a735a14d2768 100644 (file)
@@ -199,7 +199,12 @@ pub enum Signal {
         target_os = "openbsd",
         all(
             any(target_os = "android", target_os = "linux"),
-            any(target_arch = "mips", target_arch = "mips64"),
+            any(
+                target_arch = "mips",
+                target_arch = "mips64",
+                target_arch = "sparc",
+                target_arch = "sparc64"
+            ),
         )
     )))]
     Stkflt = c::SIGSTKFLT,
@@ -276,7 +281,12 @@ impl Signal {
                 target_os = "openbsd",
                 all(
                     any(target_os = "android", target_os = "linux"),
-                    any(target_arch = "mips", target_arch = "mips64"),
+                    any(
+                        target_arch = "mips",
+                        target_arch = "mips64",
+                        target_arch = "sparc",
+                        target_arch = "sparc64"
+                    ),
                 )
             )))]
             c::SIGSTKFLT => Some(Self::Stkflt),
index 7e672875501155cdecf12c9ed15725e595ec5cbd..d30a53ee6352a38f0810d929eee3b763604a9f7d 100644 (file)
@@ -704,6 +704,8 @@ pub const B2000000: Speed = c::B2000000;
 
 /// `B2500000`
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
@@ -715,6 +717,8 @@ pub const B2500000: Speed = c::B2500000;
 
 /// `B3000000`
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
@@ -726,6 +730,8 @@ pub const B3000000: Speed = c::B3000000;
 
 /// `B3500000`
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
@@ -737,6 +743,8 @@ pub const B3500000: Speed = c::B3500000;
 
 /// `B4000000`
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
index ce883245505a10ff43ba1e1ed89938eb657a19ff..88db4e1c96ab2c51cde03addff860e22d1f0e747 100644 (file)
@@ -338,15 +338,19 @@ pub const B1500000: Speed = linux_raw_sys::general::B1500000;
 pub const B2000000: Speed = linux_raw_sys::general::B2000000;
 
 /// `B2500000`
+#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))]
 pub const B2500000: Speed = linux_raw_sys::general::B2500000;
 
 /// `B3000000`
+#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))]
 pub const B3000000: Speed = linux_raw_sys::general::B3000000;
 
 /// `B3500000`
+#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))]
 pub const B3500000: Speed = linux_raw_sys::general::B3500000;
 
 /// `B4000000`
+#[cfg(not(any(target_arch = "sparc", target_arch = "sparc64",)))]
 pub const B4000000: Speed = linux_raw_sys::general::B4000000;
 
 /// `CSIZE`
index 5c10c12ed9daea0bb4c9c74d5fcba058d7e70d10..be04dc78e91df7ec70e5940bbc9ef1391dbbd251 100644 (file)
@@ -45,6 +45,8 @@ pub use imp::termios::types::B2000000;
 )))]
 pub use imp::termios::types::B2500000;
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
@@ -54,6 +56,8 @@ pub use imp::termios::types::B2500000;
 )))]
 pub use imp::termios::types::B3000000;
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
@@ -63,6 +67,8 @@ pub use imp::termios::types::B3000000;
 )))]
 pub use imp::termios::types::B3500000;
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
@@ -74,6 +80,8 @@ pub use imp::termios::types::B4000000;
 #[cfg(not(any(target_os = "ios", target_os = "macos", target_os = "openbsd")))]
 pub use imp::termios::types::B460800;
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "illumos",
@@ -688,6 +696,8 @@ pub fn speed_value(speed: imp::termios::types::Speed) -> Option<u32> {
         )))]
         imp::termios::types::B2500000 => Some(2_500_000),
         #[cfg(not(any(
+            target_arch = "sparc",
+            target_arch = "sparc64",
             target_os = "dragonfly",
             target_os = "freebsd",
             target_os = "ios",
@@ -697,6 +707,8 @@ pub fn speed_value(speed: imp::termios::types::Speed) -> Option<u32> {
         )))]
         imp::termios::types::B3000000 => Some(3_000_000),
         #[cfg(not(any(
+            target_arch = "sparc",
+            target_arch = "sparc64",
             target_os = "dragonfly",
             target_os = "freebsd",
             target_os = "ios",
@@ -706,6 +718,8 @@ pub fn speed_value(speed: imp::termios::types::Speed) -> Option<u32> {
         )))]
         imp::termios::types::B3500000 => Some(3_500_000),
         #[cfg(not(any(
+            target_arch = "sparc",
+            target_arch = "sparc64",
             target_os = "dragonfly",
             target_os = "freebsd",
             target_os = "ios",
index 79f2f6b388a1e24b96f25daa5be6efc19a606dce..338a31c62ea617f53ea5b3b13c21e63c86e413ef 100644 (file)
@@ -44,6 +44,8 @@ pub use constants::B1500000;
 )))]
 pub use constants::B2000000;
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
@@ -53,6 +55,8 @@ pub use constants::B2000000;
 )))]
 pub use constants::B2500000;
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
@@ -62,6 +66,8 @@ pub use constants::B2500000;
 )))]
 pub use constants::B3000000;
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
@@ -71,6 +77,8 @@ pub use constants::B3000000;
 )))]
 pub use constants::B3500000;
 #[cfg(not(any(
+    target_arch = "sparc",
+    target_arch = "sparc64",
     target_os = "dragonfly",
     target_os = "freebsd",
     target_os = "ios",
index 45a073d19ea94dbffbd36ee97ffcb8694dff32b5..9934cbd3032f1294afe5701c0c7889704f50f274 100644 (file)
@@ -14,6 +14,7 @@
 #[cfg(not(all(target_env = "musl", target_pointer_width = "32")))]
 #[cfg(not(all(target_os = "android", target_pointer_width = "32")))]
 #[cfg(not(all(target_os = "emscripten", target_pointer_width = "32")))]
+#[cfg(not(all(target_os = "linux", target_arch = "sparc")))]
 #[test]
 fn test_y2038() {
     use rustix::time::{Secs, Timespec};