Skip to content

Commit 296b580

Browse files
authored
Merge pull request #4499 from tgross35/backport-hungarian-wax
[0.2] Backports
2 parents 9288ec0 + 264a539 commit 296b580

File tree

40 files changed

+103
-25
lines changed

40 files changed

+103
-25
lines changed

src/fuchsia/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,8 @@ s! {
292292
__dummy4: [c_char; 16],
293293
}
294294

295+
// FIXME(1.0): This should not implement `PartialEq`
296+
#[allow(unpredictable_function_pointer_comparisons)]
295297
pub struct sigaction {
296298
pub sa_sigaction: crate::sighandler_t,
297299
pub sa_mask: crate::sigset_t,

src/psp.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1415,6 +1415,8 @@ s! {
14151415
pub stack: [u32; 8],
14161416
}
14171417

1418+
// FIXME(1.0): This should not implement `PartialEq`
1419+
#[allow(unpredictable_function_pointer_comparisons)]
14181420
pub struct GeCallbackData {
14191421
pub signal_func: Option<extern "C" fn(id: i32, arg: *mut c_void)>,
14201422
pub signal_arg: *mut c_void,
@@ -1537,6 +1539,8 @@ s! {
15371539
pub stack_mpid: SceUid,
15381540
}
15391541

1542+
// FIXME(1.0): This should not implement `PartialEq`
1543+
#[allow(unpredictable_function_pointer_comparisons)]
15401544
pub struct SceKernelThreadInfo {
15411545
pub size: usize,
15421546
pub name: [u8; 32],
@@ -1611,6 +1615,8 @@ s! {
16111615
pub first_message: *mut c_void,
16121616
}
16131617

1618+
// FIXME(1.0): This should not implement `PartialEq`
1619+
#[allow(unpredictable_function_pointer_comparisons)]
16141620
pub struct SceKernelVTimerInfo {
16151621
pub size: usize,
16161622
pub name: [u8; 32],
@@ -1622,6 +1628,8 @@ s! {
16221628
pub common: *mut c_void,
16231629
}
16241630

1631+
// FIXME(1.0): This should not implement `PartialEq`
1632+
#[allow(unpredictable_function_pointer_comparisons)]
16251633
pub struct SceKernelThreadEventHandlerInfo {
16261634
pub size: usize,
16271635
pub name: [u8; 32],
@@ -1631,6 +1639,8 @@ s! {
16311639
pub common: *mut c_void,
16321640
}
16331641

1642+
// FIXME(1.0): This should not implement `PartialEq`
1643+
#[allow(unpredictable_function_pointer_comparisons)]
16341644
pub struct SceKernelAlarmInfo {
16351645
pub size: usize,
16361646
pub schedule: SceKernelSysClock,
@@ -1688,6 +1698,8 @@ s! {
16881698
pub size: usize,
16891699
}
16901700

1701+
// FIXME(1.0): This should not implement `PartialEq`
1702+
#[allow(unpredictable_function_pointer_comparisons)]
16911703
pub struct SceKernelCallbackInfo {
16921704
pub size: usize,
16931705
pub name: [u8; 32usize],
@@ -1787,6 +1799,8 @@ s! {
17871799
pub type_: UmdType,
17881800
}
17891801

1802+
// FIXME(1.0): This should not implement `PartialEq`
1803+
#[allow(unpredictable_function_pointer_comparisons)]
17901804
pub struct SceMpegRingbuffer {
17911805
pub packets: i32,
17921806
pub unk0: u32,

src/unix/bsd/apple/b64/x86_64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,8 @@ s! {
109109
_private: [crate::uintptr_t; 16], // FIXME(macos): keeping private for now
110110
}
111111

112+
// FIXME(1.0): This should not implement `PartialEq`
113+
#[allow(unpredictable_function_pointer_comparisons)]
112114
pub struct malloc_zone_t {
113115
_reserved1: *mut c_void,
114116
_reserved2: *mut c_void,

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,8 @@ s_no_extra_traits! {
520520
pub mc_fpregs: [[c_uint; 8]; 32],
521521
}
522522

523+
// FIXME(1.0): This should not implement `PartialEq`
524+
#[allow(unpredictable_function_pointer_comparisons)]
523525
pub struct ucontext_t {
524526
pub uc_sigmask: crate::sigset_t,
525527
pub uc_mcontext: mcontext_t,

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4662,7 +4662,7 @@ f! {
46624662
pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
46634663
if cmsg.is_null() {
46644664
return crate::CMSG_FIRSTHDR(mhdr);
4665-
};
4665+
}
46664666
let next =
46674667
cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) + _ALIGN(mem::size_of::<cmsghdr>());
46684668
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2295,7 +2295,7 @@ f! {
22952295
pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
22962296
if cmsg.is_null() {
22972297
return crate::CMSG_FIRSTHDR(mhdr);
2298-
};
2298+
}
22992299
let next =
23002300
cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) + _ALIGN(mem::size_of::<cmsghdr>());
23012301
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ impl siginfo_t {
630630
_pad: [c_int; SI_PAD],
631631
_pid: crate::pid_t,
632632
}
633-
(*(self as *const siginfo_t as *const siginfo_timer))._pid
633+
(*(self as *const siginfo_t).cast::<siginfo_timer>())._pid
634634
}
635635

636636
pub unsafe fn si_uid(&self) -> crate::uid_t {
@@ -643,7 +643,7 @@ impl siginfo_t {
643643
_pid: crate::pid_t,
644644
_uid: crate::uid_t,
645645
}
646-
(*(self as *const siginfo_t as *const siginfo_timer))._uid
646+
(*(self as *const siginfo_t).cast::<siginfo_timer>())._uid
647647
}
648648

649649
pub unsafe fn si_value(&self) -> crate::sigval {
@@ -657,7 +657,7 @@ impl siginfo_t {
657657
_uid: crate::uid_t,
658658
value: crate::sigval,
659659
}
660-
(*(self as *const siginfo_t as *const siginfo_timer)).value
660+
(*(self as *const siginfo_t).cast::<siginfo_timer>()).value
661661
}
662662
}
663663

@@ -1869,7 +1869,7 @@ f! {
18691869
pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
18701870
if cmsg.is_null() {
18711871
return crate::CMSG_FIRSTHDR(mhdr);
1872-
};
1872+
}
18731873
let next =
18741874
cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) + _ALIGN(mem::size_of::<cmsghdr>());
18751875
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;

src/unix/cygwin/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,8 @@ s! {
351351
pub cr2: u64,
352352
}
353353

354+
// FIXME(1.0): This should not implement `PartialEq`
355+
#[allow(unpredictable_function_pointer_comparisons)]
354356
pub struct sigevent {
355357
pub sigev_value: sigval,
356358
pub sigev_signo: c_int,

src/unix/haiku/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1533,7 +1533,7 @@ f! {
15331533
pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
15341534
if cmsg.is_null() {
15351535
return crate::CMSG_FIRSTHDR(mhdr);
1536-
};
1536+
}
15371537
let next = cmsg as usize
15381538
+ CMSG_ALIGN((*cmsg).cmsg_len as usize)
15391539
+ CMSG_ALIGN(mem::size_of::<cmsghdr>());

src/unix/haiku/native.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,11 +403,14 @@ s! {
403403
}
404404

405405
// kernel/image.h
406+
// FIXME(1.0): This should not implement `PartialEq`
407+
#[allow(unpredictable_function_pointer_comparisons)]
406408
pub struct image_info {
407409
pub id: image_id,
408410
pub image_type: c_int,
409411
pub sequence: i32,
410412
pub init_order: i32,
413+
// FIXME(1.0): these should be made optional
411414
pub init_routine: extern "C" fn(),
412415
pub term_routine: extern "C" fn(),
413416
pub device: crate::dev_t,

src/unix/hurd/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3445,7 +3445,7 @@ f! {
34453445
pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
34463446
if ((*cmsg).cmsg_len as usize) < mem::size_of::<cmsghdr>() {
34473447
return core::ptr::null_mut::<cmsghdr>();
3448-
};
3448+
}
34493449
let next = (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr;
34503450
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;
34513451
if (next.offset(1)) as usize > max

src/unix/linux_like/android/b32/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub type __u64 = c_ulonglong;
1212
pub type __s64 = c_longlong;
1313

1414
s! {
15+
// FIXME(1.0): This should not implement `PartialEq`
16+
#[allow(unpredictable_function_pointer_comparisons)]
1517
pub struct sigaction {
1618
pub sa_sigaction: crate::sighandler_t,
1719
pub sa_mask: crate::sigset_t,

src/unix/linux_like/android/b64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ s! {
1212
__val: [c_ulong; 1],
1313
}
1414

15+
// FIXME(1.0): This should not implement `PartialEq`
16+
#[allow(unpredictable_function_pointer_comparisons)]
1517
pub struct sigaction {
1618
pub sa_flags: c_int,
1719
pub sa_sigaction: crate::sighandler_t,

src/unix/linux_like/emscripten/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ s! {
158158
pub sem_flg: c_short,
159159
}
160160

161+
// FIXME(1.0): This should not implement `PartialEq`
162+
#[allow(unpredictable_function_pointer_comparisons)]
161163
pub struct sigaction {
162164
pub sa_sigaction: crate::sighandler_t,
163165
pub sa_mask: crate::sigset_t,
@@ -1365,7 +1367,7 @@ f! {
13651367
pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr {
13661368
if ((*cmsg).cmsg_len as usize) < mem::size_of::<cmsghdr>() {
13671369
return core::ptr::null_mut::<cmsghdr>();
1368-
};
1370+
}
13691371
let next = (cmsg as usize + super::CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr;
13701372
let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize;
13711373
if (next.offset(1)) as usize > max {

src/unix/linux_like/linux/gnu/b32/arm/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ use crate::{off64_t, off_t};
44
pub type wchar_t = u32;
55

66
s! {
7+
// FIXME(1.0): This should not implement `PartialEq`
8+
#[allow(unpredictable_function_pointer_comparisons)]
79
pub struct sigaction {
810
pub sa_sigaction: crate::sighandler_t,
911
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b32/csky/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ use crate::{off64_t, off_t};
44
pub type wchar_t = u32;
55

66
s! {
7+
// FIXME(1.0): This should not implement `PartialEq`
8+
#[allow(unpredictable_function_pointer_comparisons)]
79
pub struct sigaction {
810
pub sa_sigaction: crate::sighandler_t,
911
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b32/m68k/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ use crate::{off64_t, off_t};
44
pub type wchar_t = i32;
55

66
s! {
7+
// FIXME(1.0): This should not implement `PartialEq`
8+
#[allow(unpredictable_function_pointer_comparisons)]
79
pub struct sigaction {
810
pub sa_sigaction: crate::sighandler_t,
911
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b32/mips/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ s! {
163163
__f_spare: [c_int; 6],
164164
}
165165

166+
// FIXME(1.0): This should not implement `PartialEq`
167+
#[allow(unpredictable_function_pointer_comparisons)]
166168
pub struct sigaction {
167169
pub sa_flags: c_int,
168170
pub sa_sigaction: crate::sighandler_t,

src/unix/linux_like/linux/gnu/b32/powerpc.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ use crate::{off64_t, off_t};
44
pub type wchar_t = i32;
55

66
s! {
7+
// FIXME(1.0): This should not implement `PartialEq`
8+
#[allow(unpredictable_function_pointer_comparisons)]
79
pub struct sigaction {
810
pub sa_sigaction: crate::sighandler_t,
911
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,8 @@ s! {
108108
pub ss_size: size_t,
109109
}
110110

111+
// FIXME(1.0): This should not implement `PartialEq`
112+
#[allow(unpredictable_function_pointer_comparisons)]
111113
pub struct sigaction {
112114
pub sa_sigaction: crate::sighandler_t,
113115
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b32/sparc/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ use crate::{off64_t, off_t};
66
pub type wchar_t = i32;
77

88
s! {
9+
// FIXME(1.0): This should not implement `PartialEq`
10+
#[allow(unpredictable_function_pointer_comparisons)]
911
pub struct sigaction {
1012
pub sa_sigaction: crate::sighandler_t,
1113
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b32/x86/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ pub type wchar_t = i32;
55
pub type greg_t = i32;
66

77
s! {
8+
// FIXME(1.0): This should not implement `PartialEq`
9+
#[allow(unpredictable_function_pointer_comparisons)]
810
pub struct sigaction {
911
pub sa_sigaction: crate::sighandler_t,
1012
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ pub type __u64 = c_ulonglong;
1111
pub type __s64 = c_longlong;
1212

1313
s! {
14+
// FIXME(1.0): This should not implement `PartialEq`
15+
#[allow(unpredictable_function_pointer_comparisons)]
1416
pub struct sigaction {
1517
pub sa_sigaction: crate::sighandler_t,
1618
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ s! {
134134
__size: [c_ulong; 7],
135135
}
136136

137+
// FIXME(1.0): This should not implement `PartialEq`
138+
#[allow(unpredictable_function_pointer_comparisons)]
137139
pub struct sigaction {
138140
pub sa_sigaction: crate::sighandler_t,
139141
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b64/mips64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,8 @@ s! {
136136
__size: [c_ulong; 7],
137137
}
138138

139+
// FIXME(1.0): This should not implement `PartialEq`
140+
#[allow(unpredictable_function_pointer_comparisons)]
139141
pub struct sigaction {
140142
pub sa_flags: c_int,
141143
pub sa_sigaction: crate::sighandler_t,

src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ pub type __u64 = c_ulong;
1111
pub type __s64 = c_long;
1212

1313
s! {
14+
// FIXME(1.0): This should not implement `PartialEq`
15+
#[allow(unpredictable_function_pointer_comparisons)]
1416
pub struct sigaction {
1517
pub sa_sigaction: crate::sighandler_t,
1618
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,8 @@ s! {
143143
pub ss_size: size_t,
144144
}
145145

146+
// FIXME(1.0): This should not implement `PartialEq`
147+
#[allow(unpredictable_function_pointer_comparisons)]
146148
pub struct sigaction {
147149
pub sa_sigaction: crate::sighandler_t,
148150
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b64/s390x.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub type __u64 = u64;
1212
pub type __s64 = i64;
1313

1414
s! {
15+
// FIXME(1.0): This should not implement `PartialEq`
16+
#[allow(unpredictable_function_pointer_comparisons)]
1517
pub struct sigaction {
1618
pub sa_sigaction: crate::sighandler_t,
1719
__glibc_reserved0: c_int,

src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ pub type __u64 = c_ulonglong;
1111
pub type __s64 = c_longlong;
1212

1313
s! {
14+
// FIXME(1.0): This should not implement `PartialEq`
15+
#[allow(unpredictable_function_pointer_comparisons)]
1416
pub struct sigaction {
1517
pub sa_sigaction: crate::sighandler_t,
1618
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ pub type __u64 = c_ulonglong;
1212
pub type __s64 = c_longlong;
1313

1414
s! {
15+
// FIXME(1.0): This should not implement `PartialEq`
16+
#[allow(unpredictable_function_pointer_comparisons)]
1517
pub struct sigaction {
1618
pub sa_sigaction: crate::sighandler_t,
1719
pub sa_mask: crate::sigset_t,

src/unix/linux_like/linux/gnu/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,8 @@ s! {
366366
__pad: i32,
367367
#[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))]
368368
pub tv_nsec: c_long,
369+
#[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))]
370+
pub tv_nsec: i64,
369371
#[cfg(all(gnu_time_bits64, target_endian = "little"))]
370372
__pad: i32,
371373
}

0 commit comments

Comments
 (0)